
	#Title[ncu؏O{v]
	#Text[܂ꐶ܂ꐶ܂
~܂邱Ƃm炸A
ݐݐ
B]
	#ScriptVersion[2]
	
	script_enemy_main
	{    let csd     = GetCurrentScriptDirectory;
let imgBoss   = csd ~ "Boss.png";

let name = "ncu؏O{v";
    let frame     =  0;
    let angleBase = 90;
let count;//eoԊu𐧌䂷邽߂̕ϐ;
	let count2;//eoԊu𐧌䂷邽߂̕ϐ;
	let cx;//ϐcxɐ^񒆂̍W;
	let angle_b=0;
	let kari=1;
        let angle=90;
let wIni    = 120;
//ʒu
let xIni = GetCenterX;
let yIni = GetClipMaxY - 32;
let count3;
		@Initialize
		{CutIn(YOUMU, name, "", 0, 0, 0, 0);

SetLife(2000);
        SetTimer(70);
        SetScore(9000000);
        SetDamageRate(70,50);
        LoadGraphic(imgBoss);
        SetTexture(imgBoss);
        SetGraphicRect(1, 1, 64, 64);
SetInvincibility(390);
SetDamageRate(40, 20);
SetMovePosition02(GetCenterX, GetClipMinY + 120, wIni);
count=0;
count2=0;
count3=0;
}
			
		@MainLoop
		{
SetCollisionA(GetX, GetY, 32);

 SetCollisionB(GetX, GetY, 16);
count3++;
if(count3==120){TConcentration;}
if(count3>=180){
frame++;
let angle=-30;
if(frame==30){
				let i=0;
				while(i<=0)
				{//(i=-20 ,0 ,20)3WAY
					//let shot1=1;
					CreateShotA(0,GetX,GetY,0);
SetShotDataA(0,0,1.5,90,0,0,3,RED03);
					let j=0;
					while(j<=0){
CreateShotA(1,0,0,0);
SetShotDataA(1,0,4,rand(-120,-60),0,0,3,WHITE21);

	
						let k=0;
						while(k<=0)
{CreateShotA(2,rand(-15,15),rand(-15,+15),0);
SetShotDataA(2,0,2,rand(45,135),0,-0.002,-4,ORANGE05);
AddShot(60,1,2,0);
CreateShotA(3,rand(-15,15),rand(-15,+15),0);
SetShotDataA(3,0,2.5,rand(45,135),0,-0.0005,-4,BLUE32);
AddShot(60,1,3,0);
CreateShotA(4,rand(-15,15),rand(-15,+15),0);
SetShotDataA(4,0,2,rand(45,135),0,-0.002,-4,GREEN04);
AddShot(60,1,4,0);
CreateShotA(5,rand(-15,15),rand(-15,+15),0);
SetShotDataA(5,0,2,rand(45,145),0,-0.002,-4,YELLOW23);
AddShot(60,1,5,0);
CreateShotA(6,rand(-15,15),rand(-15,+15),0);
SetShotDataA(6,0,2.1,rand(45,135),0,-0.001,-4,AQUA31);
AddShot(60,1,6,0);
loop(2){CreateShotA(7,rand(-15,15),rand(-15,+15),0);}
SetShotDataA(7,0,1.5,rand(45,135),0,-0.0012,-4,PURPLE22);
AddShot(60,1,7,0);
							k+=15;
						}
						SetShotKillTime(1,61);//ɏ
						AddShot(60,0,1,0);//shot1shot2ǉ(60t[shot2o)	
					j+=15;
					}
					SetShotKillTime(0,61);//ɏ
					FireShot(0);//e(shot1)𔭎
					i+=20;
				}
				frame=0;//eocount0ɂ
			
}

if(GetEnemyLife<=500){count++;
count2++;
if(count2==10){
CreateLaserA(8,416,rand(300,440),1200,20,WHITE12,40);
SetLaserDataA(8,0,rand(100,200),0,0,0,0);
SetShotKillTime(8,90);
FireShot(8);
}
if(count2==10){
CreateLaserA(9,32,rand(300,440),1200,20,WHITE12,40);
SetLaserDataA(9,0,rand(100,200),0,0,0,0);
SetShotKillTime(9,90);
FireShot(9);
count2=0;}
if(count==10){
				let i=0;
				while(i<=0)
				{//(i=-20 ,0 ,20)3WAY
					//let shot1=1;
					loop(2){CreateShotA(0,GetX,GetY,0);}
SetShotDataA(0,0,1.5,90,0,0,3,RED03);
					let j=0;
					while(j<=0){
loop(2){CreateShotA(1,0,0,0);
SetShotDataA(1,0,4,rand(-120,-60),0,0,3,WHITE21);}

	
						let k=0;
						while(k<=0)
{CreateShotA(2,rand(-15,15),rand(-15,+15),0);
SetShotDataA(2,0,2,rand(45,135),0,-0.002,-4,PURPLE05);
AddShot(30,1,2,0);
CreateShotA(3,rand(-15,15),rand(-15,+15),0);
SetShotDataA(3,0,2.4,rand(45,135),0,-0.0005,-4,YELLOW32);
AddShot(30,1,3,0);
CreateShotA(4,rand(-15,15),rand(-15,+15),0);
SetShotDataA(4,0,2,rand(45,135),0,-0.002,-4,AQUA04);
AddShot(30,1,4,0);
CreateShotA(5,rand(-15,15),rand(-15,+15),0);
SetShotDataA(5,0,2,rand(45,145),0,-0.002,-4,BLUE23);
AddShot(30,1,5,0);
CreateShotA(6,rand(-15,15),rand(-15,+15),0);
SetShotDataA(6,0,2.1,rand(45,135),0,-0.001,-4,GREEN31);
AddShot(30,1,6,0);
loop(3){CreateShotA(7,rand(-15,15),rand(-15,+15),0);}
SetShotDataA(7,0,1.5,rand(45,135),0,-0.0012,-4,ORANGE22);
AddShot(30,1,7,0);
							k+=15;
						}
						SetShotKillTime(1,31);//ɏ
						AddShot(60,0,1,0);//shot1shot2ǉ(60t[shot2o)	
					j+=15;
					}
					SetShotKillTime(0,61);//ɏ
					FireShot(0);//e(shot1)𔭎
					i+=20;
				}
				count=0;//eocount0ɂ
			}


}

}}
		


@DrawLoop {DrawGraphic(GetX, GetY);
}
@Finalize {DeleteGraphic(imgBoss);
CreateItem(ITEM_SCORE,GetX+rand(-100,100),GetY+rand(-50,50))
}

task TMain{

yield;

//TShot;
//TMove;

standBy;
//Tconcentration;
}
sub standBy{
SetMovePosition02(GetCenterX, GetClipMinY + 120, wIni);

SetInvincibility(180);
wait(180);
}

task TConcentration{
concentration;
}
sub concentration {
    let wConc = 60;

    Concentration01(wConc);
    wait(wConc);
}

function wait(wConc){
loop(wConc){yield;}

}
}

 