1251 lines
28 KiB
Plaintext
1251 lines
28 KiB
Plaintext
let texEnm = "script/game/resourceLib/EnmTexture.png";
|
|
LoadTextureEx(texEnm, true, true);
|
|
|
|
/*
|
|
|
|
Enemy Waves (Ground):
|
|
|
|
Small:
|
|
|
|
Lilypod with 4 frogs on it, firing aimed bullets
|
|
Lilypad with a COOL frog firing spirals
|
|
|
|
Large:
|
|
|
|
Hut when destroyed releases 6 frog enemies that fly upwards and start moving towards the player
|
|
|
|
Enemy Waves (Flying):
|
|
|
|
Small:
|
|
|
|
3 lines of small fairies firing aimed bullets
|
|
Horizontal wave of fairies firing aimed fans, followed by horizontal wave firing aimed rings
|
|
Fairies coming from both sides, firing falling bullet lines
|
|
2 tightly-knit lines of small fairies firing aimed fans, alongside a large fairy firing rings
|
|
|
|
Large:
|
|
|
|
Two fairies firing line-rings, one following the other
|
|
One giant fairy on spaceship firing aimed line-fans and light rings
|
|
2 giant fairies firing aimed line fans only, one following the other
|
|
|
|
*/
|
|
|
|
int smallEnemyHitbox = 75;
|
|
int largeEnemyHitbox = 110;
|
|
int popcornHitbox = 75;
|
|
|
|
float smallEnemyHP = 50;
|
|
float largeEnemyHP = 240;
|
|
float largeEnemyAltHP = 180;
|
|
float popcornHP = 50;
|
|
|
|
float smallEnemyScale = 0.7;
|
|
float largeEnemyScale = 1;
|
|
float popcornScale = 0.7;
|
|
|
|
function <int> CreateFan (int parent, int way, int graphic, int stack,
|
|
float ang, float angspace, float spd1, float spd2, float scaleBullet,
|
|
int type, bool reflect){
|
|
|
|
int objPattern = ObjPatternShot_Create();
|
|
|
|
ObjPatternShot_SetParentObject(objPattern, parent);
|
|
|
|
//if(ObjEnemyBossScene_GetInfo(GetEnemyBossSceneObjectID(), INFO_CURRENT_LIFE) == 0){Obj_Delete(objPattern); return;}
|
|
|
|
ObjPatternShot_SetPatternType(objPattern, type); // PATTERN_FAN or PATTERN_FAN_AIMED
|
|
ObjPatternShot_SetShotType(objPattern, OBJ_SHOT);
|
|
ObjPatternShot_SetInitialBlendMode(objPattern, BLEND_ALPHA);
|
|
|
|
ObjPatternShot_SetShotCount(objPattern, way, stack);
|
|
ObjPatternShot_SetSpeed(objPattern, spd1, spd2);
|
|
ObjPatternShot_SetAngle(objPattern, ang, angspace);
|
|
|
|
ObjPatternShot_SetBasePointOffset(objPattern, 0, 0);
|
|
//ObjPatternShot_SetDelay(objPattern, 15);
|
|
ObjPatternShot_SetGraphic(objPattern, graphic);
|
|
|
|
//Shoot2;
|
|
let arrayPattern = ObjPatternShot_FireReturn(objPattern);
|
|
|
|
ascent(i in -1..length(arrayPattern)-1){
|
|
_BulletRescale(arrayPattern[i], scaleBullet, true, 1);
|
|
_Delay(arrayPattern[i], 10);
|
|
//Obj_SetRenderPriorityI(arrayPattern[i], 51);
|
|
}
|
|
|
|
async{
|
|
wait(300);
|
|
Obj_Delete(objPattern);
|
|
return;
|
|
}
|
|
|
|
return objPattern;
|
|
|
|
}
|
|
|
|
// Overload
|
|
|
|
function <int> CreateFan (int parent, int way, int graphic, int stack,
|
|
float ang, float angspace, float spd1, float spd2, float scaleBullet,
|
|
float xOffset, float yOffset,
|
|
int type, bool reflect){
|
|
|
|
int objPattern = ObjPatternShot_Create();
|
|
|
|
ObjPatternShot_SetParentObject(objPattern, parent);
|
|
|
|
//if(ObjEnemyBossScene_GetInfo(GetEnemyBossSceneObjectID(), INFO_CURRENT_LIFE) == 0){Obj_Delete(objPattern); return;}
|
|
|
|
ObjPatternShot_SetPatternType(objPattern, type); // PATTERN_FAN or PATTERN_FAN_AIMED
|
|
ObjPatternShot_SetShotType(objPattern, OBJ_SHOT);
|
|
ObjPatternShot_SetInitialBlendMode(objPattern, BLEND_ALPHA);
|
|
|
|
ObjPatternShot_SetShotCount(objPattern, way, stack);
|
|
ObjPatternShot_SetSpeed(objPattern, spd1, spd2);
|
|
ObjPatternShot_SetAngle(objPattern, ang, angspace);
|
|
|
|
ObjPatternShot_SetBasePointOffset(objPattern, xOffset, yOffset);
|
|
//ObjPatternShot_SetDelay(objPattern, 15);
|
|
ObjPatternShot_SetGraphic(objPattern, graphic);
|
|
|
|
//Shoot2;
|
|
let arrayPattern = ObjPatternShot_FireReturn(objPattern);
|
|
|
|
ascent(i in -1..length(arrayPattern)-1){
|
|
_BulletRescale(arrayPattern[i], scaleBullet, true, 1);
|
|
_Delay(arrayPattern[i], 10);
|
|
//Obj_SetRenderPriorityI(arrayPattern[i], 51);
|
|
}
|
|
|
|
async{
|
|
wait(300);
|
|
Obj_Delete(objPattern);
|
|
return;
|
|
}
|
|
|
|
return objPattern;
|
|
|
|
}
|
|
|
|
task _SmallFairyFallingLine(
|
|
int renderPriority,
|
|
float enmX, enmY, spdMove, angMove, int graphicBullet,
|
|
int numLine, float maxspeedBullet, float delayLine, float delayBullet, float scaleBullet
|
|
){
|
|
|
|
// Spawns enemy.
|
|
|
|
int enm = _CreateEnemy(
|
|
enmX, enmY, enmX, enmY, 5,
|
|
smallEnemyScale, smallEnemyScale,
|
|
smallEnemyHP, smallEnemyHitbox, 0,
|
|
texEnm,
|
|
768, 0, 1024, 256);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderPriority);
|
|
|
|
ObjMove_SetSpeed(enm, spdMove);
|
|
ObjMove_SetAngle(enm, angMove);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
wait(5);
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
wait(5);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
if(ObjMove_GetX(enm) < STG_WIDTH && ObjMove_GetX(enm) > 0){
|
|
|
|
loop(numLine){
|
|
|
|
int bullet = CreateShotA2(ObjMove_GetX(enm), ObjMove_GetY(enm), 0, 90, maxspeedBullet/30, maxspeedBullet, graphicBullet, 10);
|
|
|
|
_BulletRescale(bullet, scaleBullet, true, 1);
|
|
_Delay(bullet, 10);
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);}
|
|
else{
|
|
Shoot1;
|
|
}
|
|
|
|
wait(delayBullet);
|
|
|
|
}
|
|
|
|
wait(delayLine);
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, true,
|
|
5, 3,
|
|
10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1,
|
|
120, smallEnemyHitbox*2
|
|
);
|
|
|
|
}
|
|
|
|
task _SmallFairyAimedFan(
|
|
int renderPriority,
|
|
float enmX, float enmY, float spdMove, float angMove, int graphicBullet, float angspaceFan,
|
|
float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet
|
|
){
|
|
|
|
// Spawns enemy.
|
|
|
|
int enm = _CreateEnemy(
|
|
enmX, enmY, enmX, enmY, 5,
|
|
smallEnemyScale, smallEnemyScale,
|
|
smallEnemyHP, smallEnemyHitbox, 0,
|
|
texEnm,
|
|
256, 0, 512, 256);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderPriority);
|
|
|
|
ObjMove_SetSpeed(enm, spdMove);
|
|
ObjMove_SetAngle(enm, angMove);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
wait(5);
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
wait(5);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
if(ObjMove_GetY(enm) < 10*STG_HEIGHT/12-100 && ObjMove_GetY(enm) > STG_HEIGHT/9){
|
|
|
|
int bullet = CreateFan(enm, widthFan, graphicBullet, stackFan,
|
|
0, angspaceFan, speedFan1, speedFan2, scaleBullet,
|
|
PATTERN_FAN_AIMED, false);
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);}
|
|
else{
|
|
Shoot1;
|
|
}
|
|
|
|
wait(delayFan);
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, true,
|
|
5, 3,
|
|
10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1,
|
|
120, smallEnemyHitbox*2
|
|
);
|
|
|
|
}
|
|
|
|
|
|
task _SmallFairyRing(
|
|
int renderPriority, int graphicBullet,
|
|
float enmX, enmY,
|
|
int denseRing, float delayRing, float speedRing,
|
|
float spdMove, angMove, scaleBullet
|
|
){
|
|
|
|
// Spawns enemy.
|
|
|
|
int enm = _CreateEnemy(
|
|
enmX, enmY, enmX, enmY, 5,
|
|
smallEnemyScale, smallEnemyScale,
|
|
smallEnemyHP, smallEnemyHitbox, 0,
|
|
texEnm,
|
|
768, 0, 1024, 256);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderPriority);
|
|
|
|
ObjMove_SetSpeed(enm, spdMove);
|
|
ObjMove_SetAngle(enm, angMove);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
wait(5);
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
wait(5);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
if(ObjMove_GetX(enm) < STG_WIDTH && ObjMove_GetX(enm) > 0){
|
|
|
|
ascent(i in -1..denseRing){
|
|
|
|
int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, GetAngleToPlayer(enm)+i*360/denseRing, graphicBullet, 10);
|
|
|
|
_BulletRescale(bullet, scaleBullet, true, 1);
|
|
_Delay(bullet, 10);
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);}
|
|
else{
|
|
Shoot1;
|
|
}
|
|
|
|
}
|
|
|
|
wait(delayRing);
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, true,
|
|
5, 3,
|
|
10+(GetCommonDataPtr(RANK_PTR, 1)-1)*2, 6+(GetCommonDataPtr(RANK_PTR, 1)-1)*1,
|
|
120, smallEnemyHitbox*2
|
|
);
|
|
|
|
}
|
|
|
|
task _CreateFrog(
|
|
int renderPriority, int[] rect, int graphicBullet,
|
|
float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan,
|
|
float frogX, frogY, speedMoveFrog, scaleBullet
|
|
){
|
|
|
|
int enm = _CreateEnemy(
|
|
frogX, frogY, frogX, frogY, 5,
|
|
popcornScale, popcornScale,
|
|
popcornHP, popcornHitbox, 0,
|
|
texEnm,
|
|
rect[0], rect[1], rect[2], rect[3]);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderPriority);
|
|
|
|
ObjMove_SetSpeed(enm, speedMoveFrog);
|
|
ObjMove_SetAngle(enm, 90);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
wait(15);
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
wait(5);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
if(ObjMove_GetY(enm) < 10*STG_HEIGHT/12-100 && ObjMove_GetY(enm) > STG_HEIGHT/9){
|
|
|
|
int bullet = CreateFan(enm, widthFan, graphicBullet, stackFan,
|
|
0, angspaceFan, speedFan1, speedFan2, scaleBullet,
|
|
PATTERN_FAN_AIMED, false);
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);}
|
|
else{Shoot2;}
|
|
|
|
wait(delayFan);
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, false,
|
|
4, 8,
|
|
7+round((GetCommonDataPtr(RANK_PTR, 1)-1)*1.25), 15+(GetCommonDataPtr(RANK_PTR, 1)-1)*2,
|
|
120, popcornHitbox*2
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
task _CreateKingFrog(
|
|
int renderPriority, int[] rect, int graphicBullet,
|
|
float angSpiral, float delaySpiral, float speedSpiral,
|
|
float frogX, frogY, speedMoveFrog, scaleBullet
|
|
){
|
|
|
|
int enm = _CreateEnemy(
|
|
frogX, frogY, frogX, frogY, 5,
|
|
largeEnemyScale, largeEnemyScale,
|
|
largeEnemyHP, largeEnemyHitbox, 0,
|
|
texEnm,
|
|
rect[0], rect[1], rect[2], rect[3]);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderPriority);
|
|
|
|
ObjMove_SetSpeed(enm, speedMoveFrog);
|
|
ObjMove_SetAngle(enm, 90);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
async{
|
|
|
|
if(GetCommonData("Ground Loops Cleared", 0) % 2 == 0 && GetCommonData("Ground Loops Cleared", 0) != 0){
|
|
|
|
int sigil = _Create2DImage(texEnm, [0, 1024, 512, 1536]);
|
|
ObjRender_SetAlpha(sigil, 240);
|
|
Obj_SetRenderPriorityI(sigil, Obj_GetRenderPriorityI(enm)-1);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
ObjRender_SetPosition(sigil, ObjMove_GetX(enm), ObjMove_GetY(enm), 1);
|
|
ObjRender_SetAngleZ(sigil, ObjRender_GetAngleZ(sigil)+3);
|
|
yield;
|
|
}
|
|
|
|
Obj_Delete(sigil);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async{
|
|
|
|
float x, y;
|
|
|
|
wait(60-GetCommonDataPtr(RANK_PTR, 1)*4);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
x = ObjMove_GetX(enm);
|
|
y = ObjMove_GetY(enm);
|
|
yield;
|
|
}
|
|
|
|
if(
|
|
(-128 < x && x < STG_WIDTH+128)
|
|
&&
|
|
(-128 < y && y < STG_HEIGHT+128)
|
|
)
|
|
{
|
|
DeleteShotInCircle(TYPE_SHOT, TYPE_ITEM, x, y, 384);
|
|
ObjSound_Play(bossBoom);
|
|
if(GetCommonData("Ground Loops Cleared", 0) % 2 == 0 && GetCommonData("Ground Loops Cleared", 0) != 0){CreateExtendItem(EXTEND_SPELL, x, y);}
|
|
TExplosionA(x, y, 10, 0.5);
|
|
}
|
|
|
|
}
|
|
|
|
wait(60-GetCommonDataPtr(RANK_PTR, 1)*4);
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
wait(5);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
if(ObjMove_GetY(enm) < 11*STG_HEIGHT/12 && ObjMove_GetY(enm) > STG_HEIGHT/12){
|
|
|
|
SpawnSpiral(0, 1);
|
|
wait(delaySpiral * 360/angSpiral);
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
task SpawnSpiral(float angStart, int spinDir){
|
|
|
|
async{
|
|
ascent(i in -1..360/angSpiral){
|
|
int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedSpiral, angStart+i*spinDir*angSpiral, graphicBullet, 10);
|
|
int bullet2 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedSpiral, angStart+(180+angStart)-i*spinDir*angSpiral, graphicBullet, 10);
|
|
if(Obj_IsDeleted(enm)){Obj_Delete(bullet); Obj_Delete(bullet2); break;}
|
|
else{
|
|
|
|
Shoot2;
|
|
_BulletRescale(bullet, scaleBullet, true, 1); _BulletRescale(bullet2, scaleBullet, true, 1);
|
|
_Delay(bullet, 10); _Delay(bullet2, 10);
|
|
|
|
}
|
|
wait(delaySpiral);
|
|
}
|
|
}
|
|
|
|
async{
|
|
ascent(i in -1..360/angSpiral){
|
|
int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedSpiral, angStart+i*-spinDir*angSpiral, graphicBullet, 10);
|
|
int bullet2 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedSpiral, angStart+(180+angStart)-i*-spinDir*angSpiral, graphicBullet, 10);
|
|
if(Obj_IsDeleted(enm)){Obj_Delete(bullet); Obj_Delete(bullet2); break;}
|
|
else{
|
|
|
|
Shoot2;
|
|
_BulletRescale(bullet, scaleBullet, true, 1); _BulletRescale(bullet2, scaleBullet, true, 1);
|
|
_Delay(bullet, 10); _Delay(bullet2, 10);
|
|
|
|
}
|
|
wait(delaySpiral);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, false,
|
|
8, 14,
|
|
round(15+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.25), round(20+(GetCommonDataPtr(RANK_PTR, 1)-1)*2),
|
|
180, largeEnemyHitbox*2.5
|
|
);
|
|
|
|
//ObjEnemy_SetDamageRate(enm, 100, 150);
|
|
|
|
}
|
|
|
|
|
|
task _LilypodWithKingFrog(
|
|
int renderFrog, int graphicBullet,
|
|
float lilyX, float lilyY,
|
|
float angSpiral, float delaySpiral, float speedSpiral, float scaleBullet,
|
|
float speedMove
|
|
){
|
|
|
|
float offsetX = 80;
|
|
float offsetY = 70;
|
|
|
|
int lilypad = _CreateEnemy(
|
|
false,
|
|
lilyX, lilyY, lilyX, lilyY, 5,
|
|
1, 1,
|
|
999, 0, 0,
|
|
texEnm,
|
|
1536, 256, 2048, 768);
|
|
|
|
Obj_SetRenderPriorityI(lilypad, renderFrog-4);
|
|
|
|
ObjMove_SetSpeed(lilypad, speedMove);
|
|
ObjMove_SetAngle(lilypad, 90);
|
|
|
|
ObjEnemy_SetDamageRate(lilypad, 0, 0);
|
|
|
|
wait(15-GetCommonDataPtr(RANK_PTR, 1)-1);
|
|
|
|
ObjEnemy_SetAutoDelete(lilypad, true);
|
|
|
|
async{
|
|
|
|
_CreateKingFrog(
|
|
renderFrog, [1024, 768, 1280, 1024], graphicBullet,
|
|
angSpiral, delaySpiral, speedSpiral,
|
|
lilyX, lilyY, speedMove, scaleBullet
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _CreateLilyFairy(
|
|
int renderPriority, int[] rect, int graphicBullet,
|
|
float delayBullet, float speedBullet, float acceltimeBullet,
|
|
float frogX, frogY, speedMoveFrog, scaleBullet
|
|
){
|
|
|
|
// Enemy has NO GRAPHIC
|
|
|
|
int enm = _CreateEnemy(
|
|
frogX, frogY, frogX, frogY, 5,
|
|
largeEnemyScale, largeEnemyScale,
|
|
smallEnemyHP, largeEnemyHitbox, 0,
|
|
texEnm,
|
|
0, 0, 0, 0);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderPriority);
|
|
|
|
ObjMove_SetSpeed(enm, speedMoveFrog);
|
|
ObjMove_SetAngle(enm, 90);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
async{
|
|
|
|
async{
|
|
|
|
float x = 0, y = 0;
|
|
|
|
wait(max(25, 60-GetCommonData("Rank", 1)*5));
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
x = ObjMove_GetX(enm);
|
|
y = ObjMove_GetY(enm);
|
|
yield;
|
|
}
|
|
|
|
if(
|
|
(-128 < x && x < STG_WIDTH+128)
|
|
&&
|
|
(-128 < y && y < STG_HEIGHT+128)
|
|
)
|
|
{
|
|
DeleteShotInCircle(TYPE_SHOT, TYPE_ITEM, x, y, 384);
|
|
ObjSound_Play(bossBoom);
|
|
//if(GetCommonData("Ground Loops Cleared", 0) % 2 == 0 && GetCommonData("Ground Loops Cleared", 0) != 0){CreateExtendItem(EXTEND_SPELL, x, y);}
|
|
TExplosionA(x, y, 10, 0.5);
|
|
}
|
|
|
|
}
|
|
|
|
wait(max(25, 60-GetCommonData("Rank", 1)*5));
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
wait(5);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
if(ObjMove_GetY(enm) < 11*STG_HEIGHT/12 && ObjMove_GetY(enm) > STG_HEIGHT/12){
|
|
|
|
float xspd = rand(-(2+GetCommonDataPtr(RANK_PTR, 1)*0.5), 2+GetCommonDataPtr(RANK_PTR, 1)*0.5);
|
|
int bullet = CreateShotB2(ObjMove_GetX(enm), ObjMove_GetY(enm), xspd, -speedBullet, 0, speedBullet/(acceltimeBullet/2), xspd, speedBullet*1.5, graphicBullet, 10);
|
|
|
|
if(Obj_IsDeleted(enm)){Obj_Delete(bullet); break;}
|
|
|
|
else{
|
|
|
|
Shoot1;
|
|
_BulletRescale(bullet, scaleBullet, true, 1);
|
|
_Delay(bullet, 10);
|
|
|
|
}
|
|
|
|
wait(delayBullet);
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, false,
|
|
4, 6,
|
|
round(5+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.25), round(8+(GetCommonDataPtr(RANK_PTR, 1)-1)*2),
|
|
180, largeEnemyHitbox*2.5
|
|
);
|
|
|
|
}
|
|
|
|
return enm;
|
|
//ObjEnemy_SetDamageRate(enm, 100, 150);
|
|
|
|
}
|
|
|
|
|
|
task _LilyWithFairy(
|
|
int renderFrog, int graphicBullet,
|
|
float lilyX, lilyY, speedMove,
|
|
float delayBullet, float speedBullet, float acceltimeBullet, float scaleBullet
|
|
){
|
|
|
|
float offsetX = 80;
|
|
float offsetY = 70;
|
|
|
|
int lilypad = _CreateEnemy(
|
|
false,
|
|
lilyX, lilyY, lilyX, lilyY, 5,
|
|
0.75, 0.75,
|
|
largeEnemyAltHP, 0, 0,
|
|
texEnm,
|
|
2304, 0, 2880, 512);
|
|
|
|
Obj_SetRenderPriorityI(lilypad, renderFrog-4);
|
|
|
|
ObjMove_SetSpeed(lilypad, speedMove);
|
|
ObjMove_SetAngle(lilypad, 90);
|
|
|
|
ObjEnemy_SetDamageRate(lilypad, 0, 0);
|
|
|
|
wait(15-GetCommonDataPtr(RANK_PTR, 1)-1);
|
|
|
|
ObjEnemy_SetAutoDelete(lilypad, true);
|
|
|
|
async{
|
|
|
|
float x = 0, y = 0;
|
|
|
|
wait(60);
|
|
|
|
while(ObjEnemy_GetInfo(lilypad, INFO_LIFE) > 0){
|
|
x = ObjMove_GetX(lilypad);
|
|
y = ObjMove_GetY(lilypad);
|
|
yield;
|
|
}
|
|
|
|
DeleteShotInCircle(TYPE_SHOT, TYPE_ITEM, x, y, 384);
|
|
ObjSound_Play(bossBoom);
|
|
//if(GetCommonData("Ground Loops Cleared", 0) % 2 == 0 && GetCommonData("Ground Loops Cleared", 0) != 0){CreateExtendItem(EXTEND_SPELL, x, y);}
|
|
TExplosionA(x, y, 10, 0.5);
|
|
|
|
}
|
|
|
|
async{
|
|
|
|
int fairy = _CreateLilyFairy(
|
|
renderFrog, [0, 0, 0, 0], graphicBullet,
|
|
delayBullet, speedBullet, acceltimeBullet,
|
|
lilyX, lilyY, speedMove, scaleBullet
|
|
);
|
|
|
|
float x = 0, y = 0;
|
|
|
|
while(!Obj_IsDeleted(fairy)){
|
|
x = ObjMove_GetX(fairy);
|
|
y = ObjMove_GetY(fairy);
|
|
yield;
|
|
}
|
|
|
|
if(
|
|
(-128 < x && x < STG_WIDTH+128)
|
|
&&
|
|
(-128 < y && y < STG_HEIGHT+128)
|
|
)
|
|
|
|
{
|
|
_PostDeath();
|
|
|
|
ObjMove_AddPatternA2(lilypad, 0, -speedMove*2, NO_CHANGE, speedMove/30, speedMove*1.25, 0);
|
|
ObjSprite2D_SetSourceRect(lilypad, 2304, 512, 2880, 1024);
|
|
_HandleEnemyWellbeing(lilypad, largeEnemyHitbox*2, 0);
|
|
ObjEnemy_SetDamageRate(lilypad, 100, 100);
|
|
}
|
|
|
|
}
|
|
|
|
task _PostDeath(){
|
|
|
|
async{
|
|
float spinRate = 9;
|
|
int i = 0;
|
|
while(!Obj_IsDeleted(lilypad)){
|
|
ObjRender_SetAngleZ(lilypad, ObjRender_GetAngleZ(lilypad)+spinRate);
|
|
spinRate = Interpolate_Decelerate(9, 4, i/240);
|
|
i = max(240, i+1);
|
|
yield;
|
|
}
|
|
}
|
|
|
|
ObjMove_AddPatternA2(lilypad, 0, -speedMove*3, NO_CHANGE, speedMove/15, speedMove*1.25, 0);
|
|
ObjSprite2D_SetSourceRect(lilypad, 2304, 512, 2880, 1024);
|
|
Obj_SetRenderPriorityI(lilypad, 41);
|
|
|
|
wait(90);
|
|
|
|
_HandleEnemyWellbeing(lilypad, largeEnemyHitbox*2, 0);
|
|
ObjEnemy_SetDamageRate(lilypad, 100, 100);
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
lilypad, false,
|
|
6, 12,
|
|
round(12+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.25), round(14+(GetCommonDataPtr(RANK_PTR, 1)-1)),
|
|
180, largeEnemyHitbox*3
|
|
);
|
|
|
|
}
|
|
|
|
task _LilypodWith4Frogs(
|
|
int renderFrog, int graphicBullet,
|
|
float lilyX, float lilyY,
|
|
float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet,
|
|
float speedMove
|
|
){
|
|
|
|
float offsetX = 80;
|
|
float offsetY = 70;
|
|
|
|
int lilypad = _CreateEnemy(
|
|
false,
|
|
lilyX, lilyY, lilyX, lilyY, 5,
|
|
1, 1,
|
|
999, 0, 0,
|
|
texEnm,
|
|
1536, 256, 2048, 768);
|
|
|
|
Obj_SetRenderPriorityI(lilypad, renderFrog-4);
|
|
|
|
ObjMove_SetSpeed(lilypad, speedMove);
|
|
ObjMove_SetAngle(lilypad, 90);
|
|
|
|
ObjEnemy_SetDamageRate(lilypad, 0, 0);
|
|
|
|
wait(5);
|
|
|
|
ObjEnemy_SetAutoDelete(lilypad, true);
|
|
|
|
async{
|
|
|
|
_CreateFrog(
|
|
renderFrog, [[1024, 512, 1280, 768], [1280, 512, 1536, 768]][rand_int(0, 1)], graphicBullet,
|
|
angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan,
|
|
lilyX+offsetX, lilyY+offsetY, speedMove, scaleBullet
|
|
);
|
|
_CreateFrog(
|
|
renderFrog, [[1024, 512, 1280, 768], [1280, 512, 1536, 768]][rand_int(0, 1)], graphicBullet,
|
|
angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan,
|
|
lilyX-offsetX, lilyY+offsetY, speedMove, scaleBullet
|
|
);
|
|
|
|
_CreateFrog(
|
|
renderFrog-1, [[1024, 512, 1280, 768], [1280, 512, 1536, 768]][rand_int(0, 1)], graphicBullet,
|
|
angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan,
|
|
lilyX+offsetX, lilyY-offsetY, speedMove, scaleBullet
|
|
);
|
|
_CreateFrog(
|
|
renderFrog-1, [[1024, 512, 1280, 768], [1280, 512, 1536, 768]][rand_int(0, 1)], graphicBullet,
|
|
angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan,
|
|
lilyX-offsetX, lilyY-offsetY, speedMove, scaleBullet
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
task _LilypodWith2Frog(
|
|
int renderFrog, int graphicBullet,
|
|
float lilyX, float lilyY,
|
|
float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet,
|
|
float speedMove
|
|
){
|
|
|
|
int lilypad = _CreateEnemy(
|
|
false,
|
|
lilyX, lilyY, lilyX, lilyY, 5,
|
|
0.75, 0.75,
|
|
999, 0, 0,
|
|
texEnm,
|
|
1536, 256, 2048, 768);
|
|
|
|
Obj_SetRenderPriorityI(lilypad, renderFrog-4);
|
|
|
|
ObjMove_SetSpeed(lilypad, speedMove);
|
|
ObjMove_SetAngle(lilypad, 90);
|
|
|
|
ObjEnemy_SetDamageRate(lilypad, 0, 0);
|
|
|
|
wait(5);
|
|
|
|
ObjEnemy_SetAutoDelete(lilypad, true);
|
|
|
|
async{
|
|
|
|
_CreateFrog(
|
|
renderFrog, [1280, 512, 1536, 768], graphicBullet,
|
|
angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan,
|
|
lilyX-60, lilyY, speedMove, scaleBullet
|
|
);
|
|
_CreateFrog(
|
|
renderFrog, [1280, 512, 1536, 768], graphicBullet,
|
|
angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan,
|
|
lilyX+60, lilyY, speedMove, scaleBullet
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
task _LilypodWith1Frog(
|
|
int renderFrog, int graphicBullet,
|
|
float lilyX, float lilyY,
|
|
float angspaceFan, float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet,
|
|
float speedMove
|
|
){
|
|
|
|
int lilypad = _CreateEnemy(
|
|
false,
|
|
lilyX, lilyY, lilyX, lilyY, 5,
|
|
0.6, 0.6,
|
|
999, 0, 0,
|
|
texEnm,
|
|
1536, 256, 2048, 768);
|
|
|
|
Obj_SetRenderPriorityI(lilypad, renderFrog-4);
|
|
|
|
ObjMove_SetSpeed(lilypad, speedMove);
|
|
ObjMove_SetAngle(lilypad, 90);
|
|
|
|
ObjEnemy_SetDamageRate(lilypad, 0, 0);
|
|
|
|
wait(1);
|
|
|
|
ObjEnemy_SetAutoDelete(lilypad, true);
|
|
|
|
async{
|
|
|
|
_CreateFrog(
|
|
renderFrog, [1280, 512, 1536, 768], graphicBullet,
|
|
angspaceFan, speedFan1, speedFan2, widthFan, stackFan, delayFan,
|
|
lilyX, lilyY, speedMove, scaleBullet
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Leave this for the boss.
|
|
|
|
task _CreateRybbShip(
|
|
int renderShip, int graphicBullet,
|
|
float shipX, shipY,
|
|
float speedRing, speedLine, int delayLine, delayRing, angleRing, denseLine, delayBullet, float scaleBullet,
|
|
float speedMove
|
|
){
|
|
|
|
int ship = _CreateEnemy(
|
|
false,
|
|
shipX, shipY, shipX, shipY, 5,
|
|
1, 1,
|
|
999, 0, 0,
|
|
texEnm,
|
|
1280, 1024, 2048, 1536);
|
|
|
|
Obj_SetRenderPriorityI(ship, renderShip-1);
|
|
|
|
ObjMove_SetSpeed(ship, speedMove);
|
|
ObjMove_SetAngle(ship, 90);
|
|
|
|
ObjEnemy_SetDamageRate(ship, 0, 0);
|
|
|
|
wait(15);
|
|
|
|
ObjEnemy_SetAutoDelete(ship, true);
|
|
|
|
// Create enemy
|
|
|
|
async{
|
|
|
|
int enm = _CreateEnemy(
|
|
shipX, shipY, shipX, shipY, 5,
|
|
largeEnemyScale, largeEnemyScale,
|
|
largeEnemyHP, largeEnemyHitbox, 0,
|
|
texEnm,
|
|
0, 256, 256, 512);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderShip);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
wait(15);
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
float x, y, curxShip, curyShip;
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0 && !Obj_IsDeleted(ship)){
|
|
x = ObjMove_GetX(enm);
|
|
y = ObjMove_GetY(enm);
|
|
curxShip = ObjMove_GetX(ship);
|
|
curyShip = ObjMove_GetY(ship);
|
|
|
|
ObjMove_SetPosition(enm, curxShip, curyShip-128);
|
|
|
|
yield;
|
|
}
|
|
|
|
DeleteShotInCircle(TYPE_SHOT, TYPE_ITEM, x, y, 512);
|
|
|
|
}
|
|
|
|
async{
|
|
|
|
wait(5);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
if(ObjMove_GetY(enm) < 11*STG_HEIGHT/12 && ObjMove_GetY(enm) > STG_HEIGHT/12){
|
|
|
|
ascent(i in -1..360/angleRing){
|
|
int bullet = CreateShotA1(ObjMove_GetX(enm)+rand(-45, 45), ObjMove_GetY(enm)+rand(-30, 30), speedRing, GetAngleToPlayer(enm)+i*angleRing, graphicBullet, 10);
|
|
if(Obj_IsDeleted(enm)){Obj_Delete(bullet); break;}
|
|
|
|
else{
|
|
|
|
Shoot1;
|
|
_BulletRescale(bullet, scaleBullet, true, 1);
|
|
_Delay(bullet, 10);
|
|
|
|
}
|
|
}
|
|
|
|
wait(delayRing);
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, true,
|
|
6, 10,
|
|
round(9+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.1), round(16+(GetCommonDataPtr(RANK_PTR, 1)-1)*1.4),
|
|
180, largeEnemyHitbox*2.5
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
// VARIABLES
|
|
|
|
task _LargeFairyAimedFan(
|
|
int renderPriority, bool checkBomb,
|
|
float enmX, float enmY, float spdMove, float angMove, int graphicBullet, float angspaceFan,
|
|
float speedFan1, float speedFan2, int widthFan, int stackFan, int delayFan, float scaleBullet
|
|
){
|
|
|
|
// Spawns enemy.
|
|
|
|
int enm = _CreateEnemy(
|
|
enmX, enmY, enmX, enmY, 5,
|
|
largeEnemyScale, largeEnemyScale,
|
|
largeEnemyAltHP, largeEnemyHitbox, 0,
|
|
texEnm,
|
|
0, 256, 256, 512);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderPriority);
|
|
|
|
ObjMove_SetSpeed(enm, spdMove);
|
|
ObjMove_SetAngle(enm, angMove);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
async{
|
|
|
|
if(checkBomb && GetCommonData("Flying Loops Cleared", 0) % 4 == 0 && GetCommonData("Flying Loops Cleared", 0) != 0){
|
|
|
|
int sigil = _Create2DImage(texEnm, [0, 1024, 512, 1536]);
|
|
ObjRender_SetAlpha(sigil, 240);
|
|
Obj_SetRenderPriorityI(sigil, Obj_GetRenderPriorityI(enm)-1);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
ObjRender_SetPosition(sigil, ObjMove_GetX(enm), ObjMove_GetY(enm), 1);
|
|
ObjRender_SetAngleZ(sigil, ObjRender_GetAngleZ(sigil)+3);
|
|
yield;
|
|
}
|
|
|
|
Obj_Delete(sigil);
|
|
|
|
}
|
|
}
|
|
|
|
async{
|
|
float x = 0, y = 0;
|
|
wait(max(10, 30-GetCommonData("Rank", 0)*5));
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
x = ObjMove_GetX(enm);
|
|
y = ObjMove_GetY(enm);
|
|
yield;
|
|
}
|
|
|
|
if(
|
|
(-128 < x && x < STG_WIDTH+128)
|
|
&&
|
|
(-128 < y && y < STG_HEIGHT+128)
|
|
)
|
|
|
|
{
|
|
DeleteShotInCircle(TYPE_SHOT, TYPE_ITEM, x, y, 256);
|
|
ObjSound_Play(bossBoom);
|
|
if(checkBomb){if(GetCommonData("Flying Loops Cleared", 0) % 4 == 0 && GetCommonData("Flying Loops Cleared", 0) != 0){CreateExtendItem(EXTEND_SPELL, x, y);}}
|
|
TExplosionA(x, y, 10, 0.5);
|
|
}
|
|
|
|
}
|
|
|
|
wait(max(10, 30-GetCommonData("Rank", 0)*5));
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
wait(5);
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
if(ObjMove_GetY(enm) < 10*STG_HEIGHT/12-100 && ObjMove_GetY(enm) > STG_HEIGHT/10){
|
|
|
|
int bullet = CreateFan(enm, widthFan, graphicBullet, stackFan,
|
|
0, angspaceFan, speedFan1, speedFan2, scaleBullet,
|
|
PATTERN_FAN_AIMED, false);
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);}
|
|
else{
|
|
Shoot1;
|
|
}
|
|
|
|
wait(delayFan);
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, true,
|
|
15, 6,
|
|
round(20+(GetCommonDataPtr(RANK_PTR, 1)-1)*2.25), round(12+(GetCommonDataPtr(RANK_PTR, 1)-1)*2),
|
|
180, largeEnemyHitbox*2
|
|
);
|
|
|
|
//ObjEnemy_SetDamageRate(enm, 100, 150);
|
|
|
|
}
|
|
|
|
task _LargeDragonGuy(
|
|
int renderPriority, int[] rect,
|
|
float enmX, float enmY, float spdMove, float angMove, int timeDecel, int timeStay, int graphicBullet,
|
|
int stackLine, float angOffset, float denseRing, float speedBullet, int delayRing, float scaleBullet
|
|
){
|
|
|
|
// Spawns enemy.
|
|
|
|
int enm = _CreateEnemy(
|
|
enmX, enmY, enmX, enmY, 5,
|
|
largeEnemyScale*1.1, largeEnemyScale*1.1,
|
|
largeEnemyHP*1.25, largeEnemyHitbox*1.1, 0,
|
|
texEnm,
|
|
rect[0], rect[1], rect[2], rect[3]);
|
|
|
|
Obj_SetRenderPriorityI(enm, renderPriority);
|
|
|
|
ObjMove_SetSpeed(enm, spdMove*2);
|
|
ObjMove_SetAngle(enm, angMove);
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
async{
|
|
|
|
ObjMove_AddPatternA2(enm, 0, NO_CHANGE, NO_CHANGE, -spdMove*2/timeDecel, 0, 0);
|
|
wait(30+timeStay);
|
|
ObjMove_AddPatternA2(enm, 0, NO_CHANGE, NO_CHANGE, spdMove/timeDecel, spdMove, 0);
|
|
|
|
}
|
|
|
|
async{
|
|
float x = 0, y = 0;
|
|
|
|
wait(max(10, 30-GetCommonData("Rank", 0)*5));
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
x = ObjMove_GetX(enm);
|
|
y = ObjMove_GetY(enm);
|
|
yield;
|
|
}
|
|
|
|
if(
|
|
(-128 < x && x < STG_WIDTH+128)
|
|
&&
|
|
(-128 < y && y < STG_HEIGHT+128)
|
|
)
|
|
|
|
{
|
|
DeleteShotAll(TYPE_SHOT, TYPE_ITEM);
|
|
ObjSound_Play(bossBoom);
|
|
TExplosionA(x, y, 10, 0.5);
|
|
}
|
|
|
|
}
|
|
|
|
wait(max(10, 30-GetCommonData("Rank", 0)*5));
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
async{
|
|
|
|
//wait(5);
|
|
float baseAng = GetAngleToPlayer(enm);
|
|
int delay = 0;
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
int delay = 10;
|
|
|
|
if(ObjMove_GetY(enm) < 10*STG_HEIGHT/12-100 && ObjMove_GetY(enm) > 1*STG_HEIGHT/12-100){
|
|
|
|
ascent(i in 0..stackLine){
|
|
ascent(j in 0..denseRing){
|
|
int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedBullet, baseAng+j*360/denseRing, graphicBullet, delay);
|
|
|
|
_BulletRescale(bullet, scaleBullet, true, 1);
|
|
_Delay(bullet, 10+delay);
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);}
|
|
else{
|
|
Shoot2;
|
|
}
|
|
}
|
|
delay += 3;
|
|
}
|
|
|
|
wait(delayRing);
|
|
baseAng += angOffset;
|
|
|
|
}
|
|
|
|
else{yield;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_EnemyItemDrop(
|
|
enm, true,
|
|
15, 6,
|
|
round(20+(GetCommonDataPtr(RANK_PTR, 1)-1)*2.25), round(12+(GetCommonDataPtr(RANK_PTR, 1)-1)*2),
|
|
210, largeEnemyHitbox*3
|
|
);
|
|
|
|
//ObjEnemy_SetDamageRate(enm, 100, 150);
|
|
|
|
}
|
|
|
|
task _WaitForAutoDelete(int shot, int timeWait){
|
|
ObjShot_SetAutoDelete(shot, false);
|
|
wait(timeWait);
|
|
ObjShot_SetAutoDelete(shot, true);
|
|
} |