#TouhouDanmakufu
#Title [Non 2]
#ScriptVersion[2]


script_enemy_main {

     #include_function "lib\SHOT_REPLACE\shot_replace.dnh"

     let frame = 0;
     let angle = 60;
     let angle2 = 60;
     let angle3 = 0;
    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(5000);
        SetEnemyMarker(true);
        SetTimer(50);
        SetDurableSpellCard;
        MagicCircle(false);
        shotinit;
	CreateItem(ITEM_BOMB, GetX, GetY);

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

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

        if(frame==20){

		loop(60){
			CreateShot01(GetX + 45*cos(angle2), GetY + 45*sin(angle2), 3, angle, WHITEI52, 0);
			angle += 360/60;
		}

		loop(70){
			CreateShot01(GetX + 45*cos(angle), GetY + 45*sin(angle), 5, angle2, WHITE52, 0);
			angle2 += 360/70;
		}


		angle2 -= 30;
 		angle += 30;
   


        frame = 0;

        }

       
         frame++;
         angle3++;
 }
     
     

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

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