
#Title[Eirin's First Nonspell, Lunatic]
#Text[Bullets.]
#Player[FREE]
#ScriptVersion[2]
#BGM[.\mu\bgm.mp3]

script_enemy_main {
#include_function ".\Eirininclude.txt";
let numb = 0;
let one = 1;
let angle3 = 0;
let time = 0;
	@Initialize{
	InitializeAction;
	LoadMusic(bgm);
	
	LoadSE(shot3);
	LoadSE(time1);
	LoadSE(ping);
	LoadGraphic(imageFile);
	LoadSE(time2);
	LoadSE(wtf);
	shotinit;
	LoadSE(charge);
	LoadSE(shot);
	LoadSE(laser);
	DeleteSE("se\seEnemyExplode01.wav");
	LoadSE(familiarspawn);
	LoadGraphic(imglifebar); 
	SetLife(6000);
	LoadSE(shot2);
	SetTimer(52);
	SetEnemyMarker(true);
	SetInvincibility(180);
	SetDamageRate(150, 125);
	SetMovePosition03(GetCenterX, GetClipMinY + 120, 10, 2);
	SetAction(ACT_MOVE, 90+60);
	LoadGraphic(SP);
	LoadGraphic(MC);
	attack1;
	attack3;
	attack2;
	attack4;
	
	SetShotAutoDeleteClip(10, 10, 10, 10);
	}
task attack3{
wait(120+60);
loop{
time++;
wait(1);
}
}

task attack1{
loop{
wait(360+60);
one=one*-1;
}
}

task attack4{
wait(180+60);
loop{
loop(120){
CreateShotA(1, GetX, GetY, 10);
SetShotDataA(1, 0, 1.45, angle3, 0, -0.01, 0, BLUE50);
SetShotKillTime(1, 260);
FireShot(1);
angle3+=360/120;
}
wait(120);

}
} 

task attack2{
let i = 0;
angle = rand(0, 360);
numb = 1;
wait(100+60);
SetAction(ACT_SHOT_B, 1029102920);
wait(20);
loop{
PlaySE(shot4);
	loop(13){
		CreateShot01(GetX, GetY, 1.5, angle, BLUEI12, 10);
		angle+=360/13;

}
angle+=4.16*one;
wait(4);
PlaySE(shot4);
if(time<120){
loop(13){
		CreateShot01(GetX, GetY, 1.5, angle, BLUEI12, 10);
		angle+=360/13;

}
}
if(time>=120){
loop(13){
		CreateShotA(1, GetX, GetY, 10);
		SetShotDataA(1, 0, 1.5, angle, 0, 0, 1.5, BLUEI12);
		SetShotDataA(1, 70, NULL, NULL, 0, -0.02, 0, NULL);
		SetShotDataA(1, 130, NULL, rand(85, 95), 0, 0.02, 2, BLUE12);
		FireShot(1);
		angle+=360/13;
		}
}
angle+=4.16*one;


wait(4);


}
}



}