
script_enemy_main
{
	#include_script".\..\..\EnemyBossSystem.txt";
	#include_script".\Murasa_AnimeLib.txt";
	
	tex_enemy=filedir~"Murasa_Main.png";
	tex_spellbg=filedir~"Murasa_SpellBG.png";
	bg_rect=[0,0,640,480];
	
	@Initialize
	{
		point=420;
		SetLife(700);
		SetTimer(54);
		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);
		SetSpellCard("亡霊「七人ミサキ」",41);
		wait(120);
		let r=1;
		if(rand_int(0,1)){r=-r;}
		loop
		{
			SetAction(ACT_SHOT_A,600);
			
			local
			{
				let sx=[0,-50,50,-100,100,-150,150];
				let sy=[60,40,40,20,20,0,0];
				ascent(a in 0..7)
				{
					CreateEnemyFromFile(GetCurrentScriptDirectory~"Murasa_Familier02.txt",cenX+sx[a],GetY+sy[a],0,0,a);
					SetTargeting(cenX+sx[a],GetY+sy[a],0.5,90,1);
					wait(5);
				}
			}
			loop(800)
			{
				if(GetEnemyNum==1){break;}
				yield;
			}
			wait(100);
			r=-r;
		}
	}
}