#TouhouDanmakufu
#Title [Spell 1]
#ScriptVersion[2]


script_enemy_main {

     #include_function "lib\SHOT_REPLACE\shot_replace.dnh"

     let frame = 0;
     let angle = 60;
     let angle2 = 62;
     let angle3 = 64;
    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(1000);
	SetDamageRate(25, 15);
        SetEnemyMarker(true);
        CutIn(KOUMA, " Just Rings", "script\img\Reisen.png", 0, 0, 200, 500);
        SetScore(123456);
        SetTimer(50);
        SetDurableSpellCard;
        MagicCircle(false);
        shotinit;

        LoadGraphic("script\img\Reisen.png");
        SetTexture("script\img\Reisen.png");
        SetGraphicRect(0, 0, 400, 533);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 24);
        SetCollisionB(GetX, GetY, 24);
        let a = 0;

        if(frame==30){

		loop(26){
			CreateShot01(GetX + 10*cos(angle), GetY + 10*sin(angle), 3, angle, BLUE52, 0);
			angle += 360/26;
		}

		loop(26){
			CreateShot01(GetX + 20*cos(angle2), GetY + 20*sin(angle2), 3, angle2, PURPLEI52, 0);
			angle2 += 360/26;
		}

		loop(26){
			CreateShot01(GetX + 30*cos(angle3), GetY + 30*sin(angle3), 3, angle3, RED52, 0);
			angle3 += 360/26;
		}

		angle += 6;
		angle2 += 6;
		angle3 += 6;


        frame = 0;
        }
       
         frame++;
 }
     
     

    @DrawLoop {
        DrawGraphic(GetX, GetY);
	SetGraphicScale(0.25, 0.25);
    }

    @Finalize{
        DeleteGraphic("script\img\ExRumia.png");
     }
}