
script_enemy_main
{
	#include_script".\..\..\EnemyBossSystem.txt";
	#include_script".\Utsuho_AnimeLib.txt";
	
	tex_enemy=filedir~"Utsuho_Main.png";
	
	@Initialize
	{
		SetLife(5000);
		SetTimer(49);
		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+150,0,0,0,0,100);
		SetAction(ACT_MOVE,100);
		wait(120);
		let r=1;
		if(rand_int(0,1)){r=-r;}
		SetAction(ACT_SUN,60*60);
		let i=0;
		let j=rand(0,360);
		let lp=0;
		loop
		{
			local
			{
				let way=48;
				let wide=360;
				let leng=[50,30];
				let ip=[i,-i];
				let ag=j;
				while(ag<j+wide)
				{
					let speed=2.6;
					let angle=ag+i;
					let gra=[9,11];
					let delay=10;
					
					let g=0;
					while(angle<=ag+i+181)
					{
						let sx=GetX+leng[0]*cos(ag+ip[g]*1.2);
						let sy=(GetY-30)+leng[1]*sin(ag+ip[g]);
						CreateShotA(1,sx,sy,delay);
						SetShotDataA(1,0,0,angle,0,speed/120,speed,gra[g]);
						FireShot(1);
						g++;
						angle+=180;
					}
					ag+=360/way;
				}
			}
			i+=-35*r;
			j+=4*r;
			lp++;
			wait(35);
		}
	}
	
}

#include_script".\Utsuho_SunShot.txt"
