#東方弾幕風
#Title[野符「武烈クライシス」]
#Text[永夜抄3面:慧音スペルのクローン]
#ScriptVersion[2]
script_enemy_main {
let name = "野符「武烈クライシス」";
let imgBoss = "script\img\ExRumia.png";
let xIni = GetCenterX;
let yIni = GetClipMinY + 128;
@Initialize {
CutIn(YOUMU, name, "", 0, 0, 0, 0);
SetLife(2000);
SetTimer(33);
SetScore(20000000);
SetDamageRate(5, 5);
LoadGraphic(imgBoss);
LoadGraphic(imgFam);
SetTexture(imgBoss);
setGraphicStop;
TMain;
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
yield;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(imgBoss);
DeleteGraphic(imgFam);
}
task TMain {
yield;
TRate;
standBy;
setFam;
}
task TRate {
wait(240);
SetDamageRate(60, 60);
}
sub standBy {
let wIni = 120 - wSetFam;
SetMovePosition02(xIni, yIni, wIni);
setGraphicMove;
SetInvincibility(wIni);
wait(wIni);
setGraphicPose;
}
sub setFam {
let xFamCenter = (GetCenterX - GetClipMinX) / 2;
let yFamCenter = yIni;
let angleFam = [0, 120, -120];
ascent(i in 0..3) {
CreateEnemyFromScript("Familiar", GetCenterX - xFamCenter, yFamCenter,
0, angleFam[i], 1);
}
ascent(i in 0..3) {
CreateEnemyFromScript("Familiar", GetCenterX + xFamCenter, yFamCenter,
0, angleFam[i] + 180, -1);
}
wait(wSetFam);
}
sub setGraphicStop { SetGraphicRect( 0, 0, 64, 64); }
sub setGraphicPose { SetGraphicRect( 64, 0, 128, 64); }
sub setGraphicLeft { SetGraphicRect(128, 0, 192, 64); }
sub setGraphicRight { SetGraphicRect(192, 0, 256, 64); }
sub setGraphicMove {
if(GetSpeedX < 0) {
setGraphicLeft;
} else {
setGraphicRight;
}
}
#include_function ".\野符「武烈クライシス」.h.txt"
}
script_enemy Familiar {
let xCenter = GetX;
let yCenter = GetY;
let r = 0;
let angBase = GetAngle;
let angle = 0;
let dir = GetArgument;
@Initialize {
SetLife(2000);
SetScore(10000);
SetDamageRate(50, 50);
SetTexture(imgFam);
setGraphicFast;
TMain;
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
yield;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
task TMain {
yield;
standBy;
}
sub standBy {
let dr = 32 / wSetFam;
let w = 210 / wSetFam;
loop(wSetFam) {
r += dr;
move(w);
yield;
}
}
function move(w) {
angle += w * dir;
SetX(xCenter + r * cos(angBase + angle));
SetY(yCenter + r * sin(angBase + angle));
SetGraphicAngle(0, 0, angle);
}
sub setGraphicFast { SetGraphicRect( 0, 0, 48, 48); }
#include_function ".\野符「武烈クライシス」.h.txt"
}