
script_enemy_main
{
	#include_script".\..\..\EnemyBossSystem.txt";
	#include_script".\Utsuho_AnimeLib.txt";
	
	tex_enemy=filedir~"Utsuho_Main.png";
	
	@Initialize
	{
		SetLife(3000);
		SetTimer(39);
		EnemyBossInitialize;
		SetAnimetion(tex_enemy);
	}
	@MainLoop{EnemyBossMainLoopSystem(50,invincible);yield;}
	@DrawLoop{EnemyBossDrawLoop;}
	@Finalize{EnemyBossFinalize;}
	
	
	
	task MainThread_Standard{}
	task MainThread_Advanced{}
	
	task MainThread_Unlimited
	{
		yield;
		SetMovePositionHermite(cenX,minY+120,0,0,0,0,100);
		SetAction(ACT_MOVE,100);
		wait(120);
		let r=1;
		if(rand_int(0,1)){r=-r;}
		loop
		{
			SetAction(ACT_SUN,200);
			
			let p=rand(0,360);
			let lp=0;
			loop(60)
			{
				let way=36;
				let speed=12;
				let angle=p;
				let gra=43;
				let delay=0;
				while(angle<p+360)
				{
					let v=13;
					let sx=GetX+v*cos(angle);
					let sy=(GetY-30)+v*sin(angle);
					CreateShot02(sx,sy,0,angle,speed/60,speed,gra,delay);
					angle+=360/way;
				}
				if(lp>50){p+=360/way/2;}
				lp++;
				wait(2);
			}
			
			let sp=0;
			loop(3)
			{
				let way=24;
				let p=GetAngleToPlayer;
				let speed=8-sp;
				let angle=p;
				let gra=49;
				let delay=10;
				while(angle<p+360)
				{
					CreateShot02(GetX,GetY,0,angle,speed/100,speed,gra,delay);
					angle+=360/way;
				}
				sp+=3;
				wait(10);
			}
			SetMovePositionHermite(cenX+rand(-80,80),minY+rand(110,130),0,0,0,0,100);
			SetAction(ACT_MOVE,100);
			wait(100);
		}
	}
	
}

#include_script".\Utsuho_SunShot.txt"
