#TouhouDanmakufu
#Title [Fin]
#ScriptVersion[2]


script_enemy_main {

     #include_function "lib\SHOT_REPLACE\shot_replace.dnh"

     let frame = 0;
     let frame2 = 0;
     let angle = 10;
     let angle2 = -40;
     let angle3 = 64;
    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(1000);
        SetDamageRate(25, 15);
        SetEnemyMarker(true);
        CutIn(KOUMA, " Equillibrium ", "script\img\Reisen.png", 0, 0, 200, 500);
        SetScore(123456);
        SetTimer(60);
        SetDurableSpellCard;
        MagicCircle(true);
        SetEffectForZeroLife(180, 200, 1);
        LastSpell;
	
        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);

	if(frame2==10){
		loop(30){
			CreateShot01(GetX + 60*cos(angle2), GetY + 60*sin(angle2), 6.5, angle2, WHITEI52, 0);
			angle2 += 360/30;
		}

	angle += 1;
	angle2 += rand(1, 359);
	frame2 = 0;	
						
	}

                     frame++;
	  frame2++;
    }

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

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