
script_enemy_main
{
	#include_script".\..\..\EnemyBossSystem.txt";
	#include_script".\Ran_AnimeLib.txt";
	
	tex_enemy=filedir~"Ran_Main.png";
	
	@Initialize
	{
		SetLife(3000);
		SetTimer(40);
		EnemyBossInitialize;
		SetAnimetion(tex_enemy);
	}
	@MainLoop{EnemyBossMainLoopSystem(50,invincible);yield;}
	@DrawLoop{EnemyBossDrawLoop;}
	@Finalize{EnemyBossFinalize;}
	
	
	
	task MainThread_Standard{}
	
	task MainThread_Advanced
	{
		yield;
		SetMovePositionHermite(cenX,minY+100,0,0,0,0,100);
		SetAction(ACT_MOVE,100);
		SetRoll(100);
		wait(200);
		let r=1;
		if(rand_int(0,1)){r=-r;}
		let lp=0;
		loop
		{
			let i=0;
			loop(10)
			{
				let p=GetAngleToPlayer+i;
				let way=30;
				let speed=[5,4.5,2];
				let angle=p;
				let gra=[111,111,109];
				let delay=10;
				let limit=30;
				while(angle<p+360)
				{
					ascent(a in 0..length(speed))
					{
						CreateShot02(GetX,GetY,0,angle,speed[a]/limit,speed[a],gra[a],delay);
					}
					angle+=360/way;
				}
				i+=1*r;
				wait(8);
			}
			lp++;
			r=-r;
			wait(80);
			if(lp%2)
			{
				let wt=80;
				SetMovePositionHermite(cenX+rand(-60,60),minY+rand(90,120),0,0,0,0,wt);
				SetAction(ACT_MOVE,wt);
				SetRoll(wt);
			}
		}
	}
	task MainThread_Unlimited{}
	
}