
#Title[WUu̐p{v]
#Text[]
#ScriptVersion[2]


script_enemy_main{let name="WUu̐p{v";
let csd = GetCurrentScriptDirectory;

    let imgBoss   = csd ~ "Boss.png";
    let frame     =  0;
    let angleBase = 90;
let angle2 = 0;
        let count;//eoԊu𐧌䂷邽߂̕ϐ;
	let count2;//eoԊu𐧌䂷邽߂̕ϐ;
	let cx;//ϐcxɐ^񒆂̍W;
	let kari=1;
        let angle=90;
let count3;
let count4;
let wIni    = 120;
let angle3=120;
let angle4=240;

//ʒu
let xIni = GetCenterX;
let yIni = GetClipMaxY - 32;


 @Initialize {CutIn(KOUMA, name, "", 0, 0, 0, 0);
        SetLife(1);
        SetTimer(30);
        SetScore(9000000);
SetEnemyMarker(false);
ForbidShot(true);
MagicCircle(false);
SetInvincibility(175);
SetDamageRate(0, 0);
SetMovePosition02(GetCenterX, GetClipMinY + 120, wIni);
TMain;
SetDurableSpellCard();}
count=0;
count2=0;
count3=0;
@MainLoop {
count3++;
//if(count3==120){TConcentration;}
if(count3>=230){

frame++;
if(frame==8){
CreateShotA(1,rand(GetX-30,GetX+30),rand(GetY-5,GetY+5),0);
SetShotDataA(1,0,2.3,rand(0,360),0,0,2,ORANGE31);
SetShotDataA(1,rand(0,150),0,NULL,0.1,0,0,WHITE31);
SetShotDataA(1,rand(150,200),NULL,rand(0,360),0.1,rand(0.01,0.05),rand(2,5),BLUE31);
FireShot(1)}
if(frame==8){
CreateShotA(2,rand(GetX-30,GetX+30),rand(GetY-5,GetY+5),0);
SetShotDataA(2,0,2.3,rand(0,360),0,0,2,PURPLE05);
SetShotDataA(2,rand(0,150),0,NULL,0.1,0,0,WHITE05);
SetShotDataA(2,rand(150,200),NULL,rand(0,360),0.1,rand(0.01,0.05),rand(2,5),RED05);
FireShot(2)}
if(frame==8){
CreateShotA(3,rand(GetX-30,GetX+30),rand(GetY-5,GetY+5),0);
SetShotDataA(3,0,2.3,rand(0,360),0,0,2,AQUA21);
SetShotDataA(3,rand(0,150),0,NULL,0.1,0,0,WHITE21);
SetShotDataA(3,rand(150,200),NULL,rand(0,360),0.1,rand(0.01,0.05),rand(2,5),GREEN21);
FireShot(3)}
if(frame==8){
CreateShotA(4,rand(GetX-30,GetX+30),rand(GetY-5,GetY+5),0);
SetShotDataA(4,0,2.3,rand(0,360),0,0,2,GREEN01);
SetShotDataA(4,rand(0,150),0,NULL,0.1,0,0,WHITE01);
SetShotDataA(4,rand(150,200),NULL,rand(0,360),0.1,rand(0.01,0.05),rand(2,5),YELLOW01);
FireShot(4)}
if(frame==8){
CreateShotA(5,rand(GetX-30,GetX+30),rand(GetY-5,GetY+5),0);
SetShotDataA(5,0,2.3,rand(0,360),0,0,2,YELLOW32);
SetShotDataA(5,rand(0,150),0,NULL,0.1,0,0,WHITE32);
SetShotDataA(5,rand(150,200),NULL,rand(0,360),0.1,rand(0.01,0.05),rand(2,5),AQUA32);
FireShot(5)}
if(frame==8){
CreateShotA(6,rand(GetX-30,GetX+30),rand(GetY-5,GetY+5),0);
SetShotDataA(6,0,2.3,rand(0,360),0,0,2,BLUE22);
SetShotDataA(6,rand(0,150),0,NULL,0.1,0,0,WHITE22);
SetShotDataA(6,rand(150,200),NULL,rand(0,360),0.1,rand(0.01,0.05),rand(2,5),PURPLE22);
FireShot(6)}
if(frame==8){
CreateShotA(7,rand(GetX-30,GetX+30),rand(GetY-5,GetY+5),0);
SetShotDataA(7,0,2.3,rand(0,360),0,0,2,RED04);
SetShotDataA(7,rand(0,150),0,NULL,0.1,0,0,WHITE04);
SetShotDataA(7,rand(150,200),NULL,rand(0,360),0.1,rand(0.01,0.05),rand(2,5),ORANGE04);
FireShot(7);
frame=0;}

//ȉAړXNvg
count++;
if(count==100)
{SetMovePosition02(rand(100,400),rand(GetClipMinY + 80,GetClipMinY + 140),rand(25,65));count = 0;}
SetCollisionA(GetX(),GetY(),32);
SetCollisionB(GetX(),GetY(),24);}}

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



task TMain{
yield;
standBy;}
sub standBy{
SetMovePosition02(GetCenterX, GetClipMinY + 120, wIni);}

task TConcentration{concentration;}
sub concentration {
    let wConc = 60;
    Concentration02(wConc);
    wait(wConc);}

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