script_enemy_main{
	


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

		

		yield;
		
	}
	task DrawTask{
		Momizi;
	}
	task fire2{
		wait(100);
		loop{
			ascent(i in 0..10){
				CreateShot01(GetX,GetY,2.5,360/10*i,10,10);
			}
			wait(30);
			ascent(i in 0..10){
				CreateShot01(GetX,GetY,2.5,360/10*i,15,10);
			}
			wait(30);
		}
	}
	task mainTask{
		fire;
		fire2;
	}
	task dogRing{
	PlaySEEx(CSD~"se\tan00.wav");
	ascent(i in 0..30){
	CreateShotA(1,GetX,GetY,0);
	SetShotDataA(1,0,7,360/30*i,0,0,0,40);
	SetShotKillTime(1,10);
	FireShot(1);
	}
	wait(10);
	ascent(i in 0..50){
	let x = 70*sin(360/30*i);
	let y = 70*cos(360/30*i);
	CreateShot01(GetX+x,GetY+y,2,GetAngleToPlayer,40,0);
	}
	}
	task SPFinalize{
		CreateEnemyFromFile(CSD~"spell1.txt",GetX,GetY,0,0,0);
		
		loop(30){
		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(60);
	loop{
	dogRing;
	wait(60);
	dogRing;
	wait(20);
	dogRing;
	wait(60);
	dogRing;
	wait(20);dogRing;
	wait(20);dogRing;
	wait(20);dogRing;
	wait(20);dogRing;
	wait(60);
	yield;
	}
	}
	




}