#TouhouDanmakufu
#Title [Spell 5]
#Text [WHY AHHHHHH]
#BackGround[User(.\Background.png, 1, 0)]
#PlayLevel[Insanity]
#ScriptVersion[2]
#Player[FREE]

script_enemy_main {

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

        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==8){

 	loop(20){

		CreateShot01(GetX + 60*cos(angle), GetY+ 60*sin(angle), 3, angle, RED11, 12);
                                     angle += 360/20;
	}

	angle += 8;
	frame = 0;
 	}
        
	if(frame2==12){

 	loop(20){

                CreateShot01(GetX + 60*cos(angle2), GetY + 60*sin(angle2), 3, angle2, YELLOW21, 12);
 				     angle2 += 360/20;
	   }
	
        angle2 -= 8;
        frame2 = 0;

        }

         frame++;
	 frame2++;
       
          
 }

      

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

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