
#Title[EirinN4_L]
#Text[EirinN4_L]
#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 two = 1;
let angle2 = 0; 
let time = 0;
let blah = 0;
	@Initialize{
	InitializeAction;
	LoadSE(shot3);
	LoadSE(time1);
	LoadSE(ping);
	LoadGraphic(imageFile);
	LoadSE(time2);
	LoadSE(wtf);
	shotinit;
	LoadSE(charge);
	LoadSE(shot);
	CreateItem(ITEM_1UP, GetX, GetY);
	LoadSE(laser);
	DeleteSE("se\seEnemyExplode01.wav");
	LoadSE(familiarspawn);
	LoadGraphic(imglifebar); 
	SetLife(6000);
	LoadSE(shot2);
	SetAction(ACT_MOVE, 90);
	SetTimer(52);
	SetEnemyMarker(true);
	SetInvincibility(420);
	SetDamageRate(200, 125);
	SetMovePosition03(GetCenterX, GetClipMinY + 120, 10, 2);
	LoadGraphic(SP);
	LoadGraphic(MC);
	attack1;
	attack2;
	attack3;
	SetShotAutoDeleteClip(30, 30, 30, 30);
	}

task attack1{
wait(540);
loop{
SetAction(ACT_SHOT_B, 120);
PlaySE(laser);
angle = GetAngleToPlayer;
loop(26){
	CreateLaserA(1, GetX, GetY, 10, 50, GREEN60, 120);
	SetLaserDataA(1, 0, angle, 0, 25, 0, 0);
	SetShotKillTime(1, 121);
	FireShot(1);
	angle+=360/26;
	}
wait(90);
PlaySE(ping);
	loop(26){
ascent(i in 0..25){
	CreateShot01(GetX, GetY, 0.75+(i/5), angle, GREEN22, 10);
	}
	angle+=360/26;
	}
wait(120);	
ExMoveFar;
wait(240);
}
}


task attack2{
wait(90);
PlaySE(charge);
Concentration01(120);
SetAction(ACT_SHOT_A, 120);
wait(120);
loop{
	PlaySE(shot4);
	loop(3){
		CreateShot01(GetX, GetY, 1.5, angle2, RED03, 10);
		angle2+=360/3;
		}
angle2+=14.52;
wait(10);
}
}

task attack3{
wait(420);
loop{
	PlaySE(shot);
	loop(70){
		CreateShotA(1, GetX, GetY, 10);
		SetShotDataA(1, 0, 5, angle3, -0.25, -0.35, 1.25, PURPLE12);
		SetShotDataA(1, 120, NULL, NULL, 0, -0.35, 1.25, PURPLE12);
		FireShot(1);
		
		angle3+=360/70;
		}
	wait(30);
angle3 = rand(0, 360);
PlaySE(shot3);
	loop(70){
		CreateShotA(1, GetX, GetY, 10);
		SetShotDataA(1, 0, 5, angle3, 0.25, -0.35, 1.25, BLUE12);
		SetShotDataA(1, 120, NULL, NULL, 0, -0.35, 1.25, BLUE12);
		FireShot(1);
		angle3+=360/70;
		}
	wait(30);
angle3 = rand(0, 360);
	
}
}




}