script_enemy_main{
	
#include_function ".\Boss.txt"

let lol = 0;
	
	@Initialize{
	
		LoadUserShotData(CSD~"supershot.txt");
		Init(8000,9,"Momiji Inubashiri");		
		BossInit(true,54,0,false,[255,255,255],[255,64,64]);
		SetInvincibility(100);
		SetDamageRate(200,200);
		mainTask;
		SetMovePosition03(GetCenterX,GetCenterY-120,10,5);
		
		SetEnemyMarker(true);
		
		
	}
	@MainLoop{
		SPMainLoop;
	SetCollisionA(GetX,GetY,32);
	
		SetCollisionB(GetX,GetY,16);
		

		yield;
		
	}
	task DrawTask{
		Momizi;
	}
	task mainTask{
		fire;
		fire2;
	}
	task fire2{
		wait(100);
		loop{
			ascent(i in 0..30){
				CreateShot01(GetX,GetY,2.5,360/30*i,10,10);
			}
			wait(30);
			ascent(i in 0..30){
				CreateShot01(GetX,GetY,2.5,360/30*i,15,10);
			}
			wait(30);
		}
	}
	task SPFinalize{
		CreateEnemyFromFile(CSD~"spell2.txt",GetX,GetY,0,0,0);
		
		loop(32){
		let a = rand(0,360);
		let x = rand(30,60)*sin(a);
		let y = rand(30,60)*cos(a);
		CreateMOFItem("POINT",GetX+x,GetY+y);
		
		}
	}
	task fire{
	wait(100);
		loop{
			PlaySEEx(CSD~"se\tan01.wav");
			CreateShot01(rand(GetClipMinX,GetClipMaxX),GetClipMinY,3,90,229,0);
			wait(10);
			PlaySEEx(CSD~"se\tan01.wav");
			CreateShot01(rand(GetClipMinX,GetClipMaxX),GetClipMinY,3,90,230,0);
			wait(10);
		}
	}
	




}