#東方弾幕風 #Title[式神「橙」] #Text[八雲藍のスペル劣化コピー] #PlayLevel[EXTRA] #Player[FREE] #ScriptVersion[2] script_enemy_main { let imgBoss = "script\img\ExRumia.png"; let imgChen = "script\img\ExRumia.png"; @Initialize { SetX(GetCenterX); SetY(GetClipMinY + 120); SetLife(4000); SetScore(1500000); SetTimer(80); LoadGraphic(imgBoss); LoadGraphic(imgChen); SetTexture(imgBoss); SetText("式神「橙」"); SetGraphicRect(0, 0, 64, 64); COLLISION; setChen; shot; } @MainLoop { yield; } @DrawLoop { if(GetSpeedX==0){SetGraphicRect(0,0,64,64);} else if(GetSpeedX>=0){SetGraphicRect(192,0,256,64);} else{SetGraphicRect(128,0,192,64);} DrawGraphic(GetX,GetY); if(OnBomb){//ボム中は透明になる SetAlpha(0); }else{ SetAlpha(255); } } @Finalize { DeleteGraphic(imgBoss); DeleteGraphic(imgChen); } task setChen{ yield; SetInvincibility(300); wait(100); SetMovePosition03(GetCenterX, GetClipMinY+60, 8,3); CreateEnemyFromScript("Chen",GetX+1,GetY,0,0,0); } task COLLISION{ loop{ if(OnBomb){//ボム中は当たり判定を無くす SetDamageRate(0,0); }else{ SetDamageRate(100,0); SetCollisionA(GetX,GetY,24); } //SetCollisionB(GetX,GetY,24); wait(1); } } task shot{ yield; wait(260); loop{ let HPwait=40+GetEnemyLife/100;//体力が少ないほど弾を撃つ間隔を短くする(体力発狂) allshot(GetAngleToPlayer,1.8,12,RED12); wait(HPwait); } } function allshot(angle,speed,span,color){ let way=360/span; loop(way){ CreateShot01(GetX,GetY,speed,angle,color,0); angle+=span; } } function wait(let wait) { loop (wait) {yield;} } } script_enemy Chen{ let imgChen = "script\img\ExRumia.png"; let x_angle=0; let z_angle=0; let y_swich=0; let color=RED22; @Initialize { SetLife(100); SetDamageRateEx(0, 0, 25, 25); SetTexture(imgChen); SetGraphicRect(0, 0, 63, 63); SetGraphicScale(0.5,0.5);//画像の拡大率を50%にする main; Chen_spin; } @MainLoop { SetCollisionA(GetX, GetY, 24); SetCollisionB(GetX, GetY, 16); if(y_swich==0){color= RED22;}//下に動いている時は赤い蝶弾を撃つ if(y_swich==1){color=BLUE22;}//上に動いている時は青い蝶弾を撃つ yield; } @DrawLoop { DrawGraphic(GetX, GetY); } task main{ wait(20); move; } task move{//橙が動くよ! let x=GetClipMaxX-10;//敵は右に動きます let y=GetY+rand(30,120);//敵はある程度下に動きます if(GetX>GetCenterX){//但し敵が真ん中より右側にいる場合は左に動きます x=GetClipMinX+10; x_angle=180; } if(y_swich==1){y=GetY-rand(30,180);}//底辺に着いた場合上に動くようになります if(yGetClipMaxY-10){//但し下限を下回る場合下限で止まり次から上に動くようになります y=GetClipMaxY-10; y_swich=1; } SetMovePosition03(x, y, 10,5); wait(85); shot; } task shot{//自機方向には撃ってこない高速弾 let angle=GetAngleToPlayer+54; loop(22){ CreateShot01(GetX,GetY,5,angle,color,0); CreateShot01(GetX,GetY,7,angle,color,0); angle+=12; } shot2; } task shot2{//全方位弾×2 let angle=rand(0,11); allshot(angle,1.5,12,color); allshot(angle, 2,12,color); main; } task Chen_spin{//ひたすらくるくる回るよ! wait(30); loop{ z_angle+=60; SetGraphicAngle(x_angle,0,z_angle); wait(2); } } function allshot(angle,speed,span,color){ let way=360/span; loop(way){ CreateShot01(GetX,GetY,speed,angle,color,10); angle+=span; } } function wait(let wait) { loop (wait) {yield;} } }