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


script_enemy_main {

     let ring = 0;
     let angle = 0;
     let angle1 = 60;
     let angle2 = 60;
     let frame = 0;
    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(1000);
        SetDamageRate(35,35);
        SetEnemyMarker(true);
        CutIn(YOUMU,"Crystallized Silver - Insanity", "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==8){
	
		CreateLaser01(GetX, GetY, 3.5, angle, 150, 10, PURPLE23, 10);
		CreateLaser01(GetX, GetY, 3.5, angle1, 150, 10, PURPLE23, 10);
	
	frame = 0;
                   angle += rand (6, 10);
		   angle1 -= rand (6, 10);
         }

         if(ring==45){
	loop(30){
	 	CreateShot02(GetX + 60*cos(angle2), GetY + 60*sin(angle2),  6.5, angle2+GetAngleToPlayer, 0.05, 4.5, WHITE04, 25);
		angle2 += 360/30;	
	}

	angle2+= 5;
	
	ring = 0;
                		
         }
        
         frame++;
         ring++;
          
 }

      

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

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