
#Title[EirinN2_L]
#Text[EirinN2_L]
#Player[FREE]
#ScriptVersion[2]
#BGM[.\mu\bgm.mp3]

script_enemy_main {
#include_function ".\Eirininclude.txt";
let numb = 0;
let one = 1;
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);
	LoadSE(laser);
	DeleteSE("se\seEnemyExplode01.wav");
	LoadSE(familiarspawn);
	LoadGraphic(imglifebar); 
	SetLife(6000);
	LoadSE(shot2);
	SetAction(ACT_MOVE, 90);
	SetTimer(52);
	SetEnemyMarker(true);
	SetInvincibility(180);
	SetDamageRate(175, 125);
	SetMovePosition03(GetCenterX, GetClipMinY + 120, 10, 2);
	LoadGraphic(SP);
	LoadGraphic(MC);
	attack1;
	attack2;
	CreateItem(ITEM_BOMB, GetX, GetY);
	
	SetShotAutoDeleteClip(20, 10, 20, 10);
	}

task attack1{
wait(240);
loop{
PlaySE(shot4);
loop(5){
	ascent(i in -2..2){
		CreateShot01(GetX, GetY, 1.5, angle2+i, GREEN12, 10);
		}
		angle2+=360/5;
		}
angle2+=11.5;
wait(15);
}
}

task attack2{
let i = 0;
angle = rand(0, 360);
numb = 1;
wait(100);
wait(20);
loop{
angle=GetAngleToPlayer;
time=0;
SetAction(ACT_SHOT_A, 120);
loop(32){
time+=3;
PlaySE(shot);
blah = rand(18, 24);
ascent(i in 0..24){
		
		CreateShotA(1, GetX, GetY, 10);
		if(two==1){
		SetShotDataA(1, 0, 7.5-(i/4), angle, 0, -0.05, 0, PURPLEI54);
		SetShotDataA(1, 210-time, NULL, NULL, (0.5+(i/rand(19.5, 22.5)))*one, 0, 0, NULL);
		SetShotDataA(1, 270-time, NULL, NULL, 0, 0.01, 2.5, PURPLEI54);
		SetShotDataA(1, 310-time-(i), NULL, NULL, 0, 0.01, 2.5, PURPLE54);
		FireShot(1);
		}
		
		if(two==-1){
		SetShotDataA(1, 0, 7.5-(i/4), angle, 0, -0.05, 0, REDI54);
		SetShotDataA(1, 210-time, NULL, NULL, (-0.5+(i/rand(-19.5, -22.5)))*one, 0, 0, NULL);
		SetShotDataA(1, 270-time, NULL, NULL, 0, 0.01, 2.5, REDI54);
		SetShotDataA(1, 310-time-(i), NULL, NULL, 0, 0.01, 2.5, RED54);
		FireShot(1);
		}
		
		}
two = two*-1;
angle+=360/32*one;
wait(3);
}

one=one*-1;
wait(120);
ExMove;
wait(270);


}
}



}