
script_enemy_main
{
	#include_script".\..\..\EnemyBossSystem.txt";
	#include_script".\Ran_AnimeLib.txt";
	
	tex_enemy=filedir~"Ran_Main.png";
	
	@Initialize
	{
		SetLife(4500);
		SetTimer(47);
		EnemyBossInitialize;
		SetAnimetion(tex_enemy);
	}
	@MainLoop{EnemyBossMainLoopSystem(50,invincible);yield;}
	@DrawLoop{EnemyBossDrawLoop;}
	@Finalize{EnemyBossFinalize;}
	
	
	
	task MainThread_Standard{}
	
	task MainThread_Advanced
	{
		yield;
		SetMovePositionHermite(cenX,minY+120,0,0,0,0,100);
		SetAction(ACT_MOVE,100);
		SetRoll(100);
		wait(200);
		let r=1;
		if(rand_int(0,1)){r=-r;}
		let i=rand(0,360);
		let lp=rand_int(0,360);
		loop
		{
			
			let wide=60;
			let way=4;
			let leng=25+25*cos(lp*8);
			let speed=3+0.5*sin(lp*8);
			let angleA=i;
			let gra=[105,110];
			let delay=10;
			let g=0;
			while(angleA<i+360)
			{
				
				let sx=GetX+leng*cos(angleA);
				let sy=GetY+leng*sin(angleA);
				let angleB=angleA-wide/2;
				while(angleB<=angleA+wide/2+0.1)
				{
					CreateShot01(sx,sy,speed,angleB,gra[g%length(gra)],delay);
					angleB+=wide/(way-1);
				}
				g++;
				angleA+=90;
			}
			wait(4);
			i+=19*cos(lp);
			lp++;
			if(!(lp%50))
			{
				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{}
	
}