
script_enemy_main
{
	#include_script".\..\..\EnemyBossSystem.txt";
	#include_script".\Daiyousei_AnimeLib.txt";
	
	tex_enemy=filedir~"DaiyouseiAnother_Main.png";
	
	@Initialize
	{
		SetLife(3700);
		SetTimer(49);
		EnemyBossInitialize;
		SetAnimetion(tex_enemy);
	}
	@MainLoop{EnemyBossMainLoopSystem(50,invincible);yield;}
	@DrawLoop{EnemyBossDrawLoop;}
	@Finalize{EnemyBossFinalize;}
	
	task MainThread_Standard{}

	
	task MainThread_Advanced
	{
		yield;
		SetMovePositionHermite(cenX,minY+140,0,0,0,0,100);
		SetAction(ACT_MOVE,100);
		wait(120);
		let r=1;
		if(rand_int(0,1)){r=-r;}
		loop
		{
			SetAction(ACT_SHOT_A,100);
			let p=rand(0,360);
			loop(2)
			{
				let way=11;
				let sx=GetX+7;
				let sy=GetY-35;
				let speed=6;
				let angle=p;
				let gra=[150,110];
				let delay=30;
				while(angle<p+360)
				{
					CreateShotA(1,sx,sy,delay);
					SetShotDataA(1,0,speed,angle,0,0,0,gra[0]);
					let i=190*r;
					let lp=0;
					let cnt=5;
					while(cnt<=150)
					{
						let angleB=angle+i;
						let speedB=[1.2,1.8];
						CreateShotA(2,0,0,0);
						SetShotDataA(2,0,0,angleB,0,speedB[lp%length(speedB)]/120,speedB[lp%length(speedB)],gra[1]);
						AddShot(cnt,1,2,0);
						i+=4*r;
						lp++;
						cnt+=2;
					}
					FireShot(1);
					angle+=360/way;
				}
				p+=180;
				r=-r;
				wait(40);
			}
			wait(100);
			SetMovePositionHermite(cenX+rand(-50,50),minY+rand(130,150),0,0,0,0,100);
			SetAction(ACT_MOVE,100);
			wait(230);
			r=-r;
		}
	}
	
	
	
	
	task MainThread_Unlimited{}
	
}