#TouhouDanmakufu
#Title [Spell 4]
#Text [DANCER]
#BackGround[User(.\Background.png, 1, 0)]
#PlayLevel[Hard]
#ScriptVersion[2]
#Player[FREE]


script_enemy_main {

     let angle2 = 0;
     let frame2 = 0;
     let spam = 0;
     let angle = 0;
     let frame = 0;
    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(1000);
        SetDamageRate(35, 35);
        SetEnemyMarker(true);
        CutIn(YOUMU, "Koopa Shuffle - Hard", "script\img\bowser_paper[1].png", 0, 0, 200, 600);
        SetScore(90000);
        SetTimer(50);
        SetDurableSpellCard;
        MagicCircle(true);

        LoadGraphic("script\img\bowser_paper[1].png");
        SetTexture("script\img\bowser_paper[1].png");
        SetGraphicRect(0, 0, 256, 256);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 24);
        SetCollisionB(GetX, GetY, 24);

        if(frame==40){

	CreateShot02(GetX, GetY, 6, GetAngleToPlayer,0.05, 3, YELLOW03, 12);	

	frame = 0;

 	}

	if(spam==6){
		
		CreateShot01(GetX, GetY, 4,rand(0, 360),RED22, 20);
		CreateShot01(GetX, GetY, 4,rand(0, 360),GREEN21, 20); 
		CreateShot01(GetX, GetY, 4,rand(0, 360),ORANGE23, 20);
                CreateShot01(GetX, GetY, 4,rand(0, 360),ORANGE23, 20);

 		spam = 0;
 
	}

	if(frame2==45){

	CreateShot01(GetX, GetY, 3.825, angle2, PURPLE03, 30);
	
	angle2 += 45;
	frame2 = 0;

 	}
        
         frame++;
	 spam++;
	 frame2++;
       
          
 }

      

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

    @Finalize{
        DeleteGraphic("script\img\bowser_paper[1].png");
     }
}
