#東方弾幕風 #Title[樹符「フォレストカーニバル」] #Text[弾幕風コンテスト第1回用] #ScriptVersion[2] script_enemy_main { let x=0; let y=0; let BossGrp = 0; let ty=100; let BossAngle = 90; //角度 let imgBoss="script\ExRumia\img\ExRumia.png"; @Initialize { SetX(-60); SetY(-60); SetMovePosition02(GetCenterX,100,30); SetLife(3000); SetInvincibility(180); LoadGraphic(imgBoss); attack; } @MainLoop { x=GetX; y=GetY; SetCollisionA(x,y,32); SetCollisionB(x,y,16); yield; } task attack{ loop(30){yield;} SpellStart; loop(90){yield;} let ang; let m=150;//向き while(1){ move; loop(30){yield;} SetColor(255,255,128); Concentration01(30); ascent(i in 1..12){ ascent(j in -1..2){ ascent(p in 0..8){ CreateShot01(x,y,i/2,BossAngle+j*6+p*45,ORANGE04,10); } } loop(3){yield;} } loop(30){yield;} ascent(t in 0..2){ ang=GetAngleToPlayer; ascent(j in 2..5){ ascent(i in 0..24){ CreateShotA(1,x,y,15); SetShotDataA(1,0,j,ang+i*15,0,-j/60,0,GREEN21); SetShotDataA(1,60,3,ang+i*15+m,0,0,0,NULL); FireShot(1); } } if(t==0){m=-m;} loop(60){yield;} } loop(60){yield;} } } task SpellStart{ SetText("樹符「フォレストカーニバル」"); SetTimer(60); SetScore(200000); } task move{ ty=rand(80,150); if(xGetClipMaxX-100 || x>GetPlayerX){ SetMovePosition02(x-100,ty,30); BossAngle = atan2(ty-y,-100); BossGrp = 2; }else{ SetMovePosition02(x+100,ty,30); BossAngle = atan2(ty-y,100); BossGrp = 3; } loop(30){yield;} BossGrp = 0; } @DrawLoop { SetTexture(imgBoss); SetGraphicRect(BossGrp*64 ,0 ,BossGrp*64+64 ,64); SetColor(255,255,255); DrawGraphic(x,y); } @Finalize { DeleteGraphic(imgBoss); } }