2022-09-14 16:26:09 +00:00
|
|
|
#TouhouDanmakufu[Single]
|
|
|
|
#ScriptVersion[3]
|
|
|
|
#Title["Cirno Game"]
|
|
|
|
#Text["LETS GO BITCHES"]
|
|
|
|
#System["script/KevinSystem/Kevin_System.txt"]
|
|
|
|
|
|
|
|
// if you're zino reading this: bitch.
|
|
|
|
|
|
|
|
int rank = 1; // Increases through time
|
|
|
|
|
2022-09-18 13:50:17 +00:00
|
|
|
let RANK_PTR = LoadCommonDataValuePointer("Rank", 1);
|
|
|
|
|
2022-09-14 16:26:09 +00:00
|
|
|
let objScene = GetEnemyBossSceneObjectID();
|
|
|
|
let csd = GetCurrentScriptDirectory();
|
|
|
|
|
|
|
|
let bossObj;
|
|
|
|
|
|
|
|
float bossX = 0;
|
|
|
|
float bossY = 0;
|
|
|
|
float playerY = 0;
|
|
|
|
float playerX = 0;
|
|
|
|
|
|
|
|
let aniframe = 0;
|
|
|
|
let aniframe2 = 0;
|
|
|
|
|
|
|
|
let spellsnd = ObjSound_Create();
|
|
|
|
let bossdiesnd = ObjSound_Create();
|
|
|
|
|
|
|
|
int[] enmFly = [];
|
|
|
|
int[] enmGround = [];
|
|
|
|
|
|
|
|
int[] rankAvg = [];
|
|
|
|
|
2022-09-18 12:12:19 +00:00
|
|
|
let SYSTEMID_PTR_2 = LoadAreaCommonDataValuePointer("ScriptID", "SystemID", 0);
|
|
|
|
|
2022-09-14 16:26:09 +00:00
|
|
|
// Includes ahoy
|
|
|
|
|
|
|
|
#include "script/KevinSystem/Universal_Lib.txt"
|
|
|
|
#include "script/game/99Sec_EnmLib.dnh"
|
2022-09-18 12:12:19 +00:00
|
|
|
#include "script/KevinSystem/kevin_system/Lib_Const.dnh"
|
2022-09-14 16:26:09 +00:00
|
|
|
|
|
|
|
@Initialize {
|
|
|
|
|
|
|
|
//SetIntersectionVisualization(true);
|
|
|
|
|
|
|
|
SetAutoDeleteObject(true);
|
|
|
|
|
|
|
|
//difficultySelect = _InitDifficulty(difficultySelect);
|
|
|
|
|
|
|
|
//difficultySelect = 2; // debug
|
|
|
|
|
|
|
|
if(!IsCommonDataAreaExists("PIV")){
|
|
|
|
CreateCommonDataArea("PIV");
|
|
|
|
SetAreaCommonData("PIV", "currentvalue", 10000);
|
|
|
|
}
|
|
|
|
else{}
|
|
|
|
|
|
|
|
// Create the boss object itself
|
|
|
|
bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
|
|
|
|
ObjEnemy_Regist(bossObj);
|
|
|
|
|
|
|
|
ObjMove_SetPosition(bossObj, STG_WIDTH/2, -256);
|
|
|
|
ObjEnemy_SetMaximumDamage(bossObj, 0);
|
|
|
|
|
|
|
|
//_RenderBossDaiyousei(bossObj);
|
|
|
|
SetEnemyAutoDeleteClip(165, 257, 165, 256);
|
|
|
|
|
2022-09-18 12:12:19 +00:00
|
|
|
//testTask();
|
2022-09-14 16:26:09 +00:00
|
|
|
bossTask();
|
|
|
|
mainTask();
|
|
|
|
groundTask();
|
|
|
|
curEnmManage();
|
|
|
|
|
2022-09-18 12:12:19 +00:00
|
|
|
//SetCommonData("Rank", 9);
|
|
|
|
|
2022-09-14 16:26:09 +00:00
|
|
|
//_FadeInvincibility(bossObj, 150, 150, 1);
|
|
|
|
//endingnew();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Event {
|
|
|
|
|
|
|
|
alternative(GetEventType())
|
|
|
|
|
|
|
|
case(EV_REQUEST_LIFE) {
|
|
|
|
SetScriptResult(2500);
|
|
|
|
}
|
|
|
|
|
|
|
|
case(EV_REQUEST_IS_DURABLE_SPELL) {
|
|
|
|
SetScriptResult(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
case(EV_REQUEST_TIMER) {
|
|
|
|
SetScriptResult(99);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@MainLoop {
|
|
|
|
|
|
|
|
playerY = GetPlayerY();
|
|
|
|
playerX = GetPlayerX();
|
|
|
|
//The player position is ALWAYS UPDATED
|
|
|
|
|
|
|
|
bossX = ObjMove_GetX(bossObj);
|
|
|
|
bossY = ObjMove_GetY(bossObj);
|
|
|
|
|
|
|
|
ObjEnemy_SetIntersectionCircleToShot(bossObj, ObjMove_GetX(bossObj), ObjMove_GetY(bossObj), 180);
|
|
|
|
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Finalize {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
// This array contains ONLY FLYING ENEMIES
|
|
|
|
|
|
|
|
task curEnmManage(){
|
|
|
|
|
|
|
|
SetCommonData("Flying Loops Cleared", 0);
|
|
|
|
SetCommonData("Ground Loops Cleared", 0);
|
|
|
|
|
|
|
|
RankManagement();
|
|
|
|
|
|
|
|
int[] allEnm = [];
|
|
|
|
|
|
|
|
while(true){
|
|
|
|
enmGround = [];
|
|
|
|
enmFly = [];
|
|
|
|
allEnm = GetIntersectionRegistedEnemyID();
|
|
|
|
for each (int enm in ref allEnm){
|
|
|
|
if(Obj_GetRenderPriorityI(enm) <= 34){enmGround ~= [enm];}
|
|
|
|
else if(Obj_GetRenderPriorityI(enm) >= 35){enmFly ~= [enm];}
|
|
|
|
}
|
|
|
|
wait(30);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
task bossTask(){
|
|
|
|
|
|
|
|
wait(5);
|
|
|
|
|
|
|
|
while(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) > 23){yield;}
|
|
|
|
|
|
|
|
_CreateShadow();
|
|
|
|
|
|
|
|
while(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) > 20){yield;}
|
|
|
|
|
|
|
|
_BossEnter(
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
task _CreateShadow(){
|
|
|
|
|
|
|
|
int IFoundYouFaker = _Create2DImage(texEnm, [512, 1432, 1278, 2048]);
|
|
|
|
|
|
|
|
ObjRender_SetAlpha(IFoundYouFaker, 150);
|
|
|
|
ObjRender_SetScaleXYZ(IFoundYouFaker, 1.25);
|
|
|
|
Obj_SetRenderPriorityI(IFoundYouFaker, 49);
|
|
|
|
|
|
|
|
// I'LL MAKE YOU EAT THOSE WORDS
|
|
|
|
|
|
|
|
ascent(i in 0..180){
|
|
|
|
ObjRender_SetPosition(IFoundYouFaker, STG_WIDTH/2, Interpolate_Linear(STG_HEIGHT + 512, -512, i/180), 1);
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// If rank is at 4 or above, start regularly spawning big fairy enemies that clear the screen.
|
|
|
|
|
|
|
|
task bonusTask(){
|
|
|
|
|
|
|
|
wait(60);
|
|
|
|
|
|
|
|
while(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) > 20){
|
|
|
|
|
|
|
|
if(rank >= 5){
|
|
|
|
|
|
|
|
_LargeFairyAimedFan(
|
|
|
|
40, false,
|
|
|
|
playerX, -256, 6.25*(1.15+rank/8), 90, KEV_LEAF_PINK, [5, 5, 5, 5][clamp((rank/2)-1, 0, 3)],
|
|
|
|
7*(1.25+rank/12), 7*(1.25+rank/12)/1.2, [5, 5, 5, 5][clamp((rank/2)-1, 0, 3)], [3, 3, 4, 4][clamp((rank/2)-1, 0, 3)], 120, 0.9
|
|
|
|
);
|
|
|
|
|
|
|
|
alternative(rank)
|
|
|
|
|
|
|
|
case(5){wait(180);}
|
|
|
|
case(6){wait(150);}
|
|
|
|
case(7){wait(120);}
|
|
|
|
case(8){wait(100);}
|
|
|
|
case(9){wait(90);}
|
|
|
|
others{wait(90);}
|
|
|
|
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else{yield;}
|
|
|
|
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task _RenderBossDaiyousei(enemy){
|
|
|
|
|
|
|
|
int aniidle = 0;
|
|
|
|
|
|
|
|
ObjPrim_SetTexture(enemy, texEnm);
|
|
|
|
ObjSprite2D_SetSourceRect(enemy, 640, 640, 960, 960);
|
|
|
|
ObjSprite2D_SetDestCenter(enemy);
|
|
|
|
ObjRender_SetScaleXYZ(enemy, 0.75);
|
|
|
|
|
|
|
|
/*int nameText = CreateTextObject(
|
|
|
|
GetStgFrameWidth()*0.3, 200, 25,
|
|
|
|
"REMILIA SCARLET", "Origami Mommy",
|
|
|
|
0xFF5A5A, 0xFFFFFF,
|
|
|
|
0x791D1D, 3,
|
|
|
|
1
|
|
|
|
);
|
|
|
|
|
|
|
|
ObjRender_SetAngleZ(nameText, -90);
|
|
|
|
ObjText_SetFontBold(nameText, true);*/
|
|
|
|
|
|
|
|
//_BossMarker(enemy, tex, 512, 0, 768, 256, 0.45, 30);
|
|
|
|
|
|
|
|
while(!Obj_IsDeleted(enemy)){
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task _BossEnter(
|
|
|
|
/*int renderShip, int graphicBullet,
|
|
|
|
float shipX, shipY,
|
|
|
|
float speedRing, speedLine, angspaceLine, int delayLine, delayRing, denseRing, denseLine, wayLine, float scaleBullet,
|
|
|
|
float speedMove*/
|
|
|
|
){
|
|
|
|
|
|
|
|
int renderShip = 40;
|
|
|
|
int graphicBullet = KEV_BALL_ORANGE;
|
|
|
|
|
|
|
|
float shipX = STG_WIDTH/2;
|
|
|
|
float shipY = -256;
|
|
|
|
|
|
|
|
float speedRing, speedLine, angspaceLine;
|
|
|
|
int delayLine, delayRing, denseRing, denseLine, wayLine;
|
|
|
|
float scaleBullet = 0.6;
|
|
|
|
float speedMove = 0;
|
|
|
|
|
|
|
|
/*_BossEnter(
|
|
|
|
40, KEV_BALL_ORANGE,
|
|
|
|
STG_WIDTH/4, -256,
|
|
|
|
7.5*(1.5+rank/9), 7*(1.5+rank/9), 3.5*(1.15+rank/9), trunc(max(45, round(60-(rank/4)))), max(15, round(30-(rank/3))),
|
|
|
|
12+rank, 4+round(rank/2), [3, 5][clamp((rank/2)-1, 0, 1)], 0.6,
|
|
|
|
0
|
|
|
|
);*/
|
|
|
|
|
|
|
|
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_CancelMovement(ship);
|
|
|
|
ObjMove_SetDestAtFrame(ship, STG_WIDTH/2, STG_HEIGHT/4, 150, LERP_DECELERATE);
|
|
|
|
//ObjMove_SetAngle(ship, 90);
|
|
|
|
|
|
|
|
ObjEnemy_SetDamageRate(ship, 0, 0);
|
|
|
|
|
|
|
|
wait(5);
|
|
|
|
|
|
|
|
ObjEnemy_SetAutoDelete(ship, true);
|
|
|
|
|
|
|
|
// Create enemy
|
|
|
|
|
|
|
|
async{
|
|
|
|
while(true){
|
|
|
|
|
|
|
|
speedRing = 7.5*(1.25+rank/12);
|
|
|
|
speedLine = 7*(1.5+rank/9);
|
|
|
|
angspaceLine = 3.25*(1.1+rank/14);
|
|
|
|
|
|
|
|
delayLine = trunc(max(30, round(60-rank*3)));
|
|
|
|
delayRing = max(15, round(30-rank*2));
|
|
|
|
denseRing = 12+trunc(rank*1.25);
|
|
|
|
denseLine = 4+round(rank/2);
|
|
|
|
wayLine = [3, 5][clamp((rank/2)-1, 0, 1)];
|
|
|
|
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async{
|
|
|
|
|
|
|
|
int lifeMax = 4000;
|
|
|
|
|
|
|
|
int enm = _CreateEnemy(
|
|
|
|
shipX, shipY, shipX, shipY, 5,
|
|
|
|
0.8, 0.8,
|
|
|
|
lifeMax, largeEnemyHitbox, 0,
|
|
|
|
texEnm,
|
|
|
|
640, 640, 960, 960);
|
|
|
|
|
|
|
|
Obj_SetRenderPriorityI(enm, renderShip);
|
|
|
|
|
|
|
|
ObjEnemy_SetDamageRate(enm, 0, 0);
|
|
|
|
|
|
|
|
wait(15);
|
|
|
|
|
|
|
|
ObjEnemy_SetAutoDelete(enm, true);
|
|
|
|
|
|
|
|
async{
|
|
|
|
|
|
|
|
while(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMERF) > 0){yield;}
|
|
|
|
|
|
|
|
ObjEnemy_SetLife(enm, -1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
ObjEnemy_SetDamageRate(enm, Interpolate_Smoother(100, 60, rank/9), Interpolate_Smoother(75, 50, rank/9));
|
|
|
|
ObjMove_SetPosition(enm, curxShip, curyShip-96);
|
|
|
|
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
DeleteShotAll(TYPE_SHOT, TYPE_ITEM);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Ship
|
|
|
|
|
|
|
|
async{
|
|
|
|
|
|
|
|
wait(60);
|
|
|
|
|
|
|
|
function FireAimedLine(float xOffset, yOffset){
|
|
|
|
|
|
|
|
int bullet = CreateFan(ship, wayLine, KEV_LEAF_GREEN, denseLine,
|
|
|
|
0, angspaceLine, speedLine/1.35, speedLine, 0.9,
|
|
|
|
xOffset, yOffset,
|
|
|
|
PATTERN_FAN_AIMED, false);
|
|
|
|
|
|
|
|
//ObjPatternShot_SetBasePointOffset(bullet, xOffset, yOffset);
|
|
|
|
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet);}
|
|
|
|
else{
|
|
|
|
Shoot2;
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(delayLine);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
while(ObjEnemy_GetInfo(enm, INFO_LIFE) > 0){
|
|
|
|
|
|
|
|
if(ObjMove_GetY(enm) < 11*STG_HEIGHT/12 && ObjMove_GetY(enm) > STG_HEIGHT/12){
|
|
|
|
|
|
|
|
float xYass = 180;
|
|
|
|
float yYass = 120;
|
|
|
|
|
|
|
|
FireAimedLine(xYass, yYass);
|
|
|
|
|
|
|
|
FireAimedLine(-xYass, yYass);
|
|
|
|
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else{yield;}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Boss task
|
|
|
|
|
|
|
|
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 xYass = rand(-45, 45);
|
|
|
|
float yYass = rand(-30, 30);
|
|
|
|
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) > 3*lifeMax/4){
|
|
|
|
|
|
|
|
ascent(i in -1..denseRing){
|
|
|
|
int bullet = CreateShotA1(ObjMove_GetX(enm)+xYass, ObjMove_GetY(enm)+yYass, speedRing, GetAngleToPlayer(enm)+i*360/denseRing, graphicBullet, 10);
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet); break;}
|
|
|
|
|
|
|
|
else{
|
|
|
|
|
|
|
|
Shoot1;
|
|
|
|
_BulletRescale(bullet, scaleBullet, true, 1);
|
|
|
|
_Delay(bullet, 10);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(delayRing);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(ObjEnemy_GetInfo(enm, INFO_LIFE) > 2*lifeMax/4){
|
|
|
|
|
|
|
|
float curRank = rank;
|
|
|
|
|
|
|
|
ascent(i in 0..trunc(denseRing*5)){
|
|
|
|
|
|
|
|
int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, 30+i*1*1.1672*[12, 10, 9, 8][clamp(curRank/2, 0, 3)],graphicBullet, 10);
|
|
|
|
int bullet2 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, 30+180-i*1*1.1672*[12, 10, 9, 8][clamp(curRank/2, 0, 3)], graphicBullet, 10);
|
|
|
|
int bullet3 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, 30-i*1*1.1672*[12, 10, 9, 8][clamp(curRank/2, 0, 3)], graphicBullet, 10);
|
|
|
|
int bullet4 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, 30+180+i*1*1.1672*[12, 10, 9, 8][clamp(curRank/2, 0, 3)], graphicBullet, 10);
|
|
|
|
|
|
|
|
int[] arr = [bullet, bullet2, bullet3, bullet4];
|
|
|
|
|
|
|
|
for each (int bullet in ref arr){
|
|
|
|
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet); continue;}
|
|
|
|
else{
|
|
|
|
|
|
|
|
Shoot1;
|
|
|
|
_BulletRescale(bullet, scaleBullet, true, 1);
|
|
|
|
_Delay(bullet, 10); _Delay(bullet2, 10);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
wait(trunc(delayRing/5));
|
|
|
|
}
|
|
|
|
//wait(trunc(delayRing/10));
|
|
|
|
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else{
|
|
|
|
|
|
|
|
float curRank = rank;
|
|
|
|
|
|
|
|
ascent(i in 0..trunc(denseRing*5)){
|
|
|
|
|
|
|
|
int bullet = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, 90+i*1*1.1672*[12, 10, 9, 8][clamp(curRank/2, 0, 3)],graphicBullet, 10);
|
|
|
|
int bullet2 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, 90+180-i*1*1.1672*[12, 10, 9, 8][clamp(curRank/2, 0, 3)], graphicBullet, 10);
|
|
|
|
int bullet3 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, 90-i*1*1.1672*[12, 10, 9, 8][clamp(curRank/2, 0, 3)], graphicBullet, 10);
|
|
|
|
int bullet4 = CreateShotA1(ObjMove_GetX(enm), ObjMove_GetY(enm), speedRing, 90+180+i*1*1.1672*[12, 10, 9, 8][clamp(curRank/2, 0, 3)], graphicBullet, 10);
|
|
|
|
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){
|
|
|
|
Obj_Delete(bullet);
|
|
|
|
Obj_Delete(bullet2);
|
|
|
|
Obj_Delete(bullet3);
|
|
|
|
Obj_Delete(bullet4);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
int[] arr = [bullet, bullet2, bullet3, bullet4];
|
|
|
|
|
|
|
|
for each (int bullet in ref arr){
|
|
|
|
|
|
|
|
if(ObjEnemy_GetInfo(enm, INFO_LIFE) <= 0){Obj_Delete(bullet); continue;}
|
|
|
|
|
|
|
|
else{
|
|
|
|
|
|
|
|
ObjMove_SetAcceleration(bullet, -speedRing/150);
|
|
|
|
ObjMove_SetMaxSpeed(bullet, speedRing/5);
|
|
|
|
|
|
|
|
Shoot1;
|
|
|
|
_BulletRescale(bullet, scaleBullet*1.15, true, 1);
|
|
|
|
_Delay(bullet, 10); _Delay(bullet2, 10);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
wait(trunc(delayRing/5));
|
|
|
|
}
|
|
|
|
//wait(trunc(delayRing/10));
|
|
|
|
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else{yield;}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_BossExplosion(
|
|
|
|
enm, ship,
|
|
|
|
20, 30+rank*5,
|
|
|
|
60*15);
|
|
|
|
|
|
|
|
EndBonus(enm, ship);
|
|
|
|
|
|
|
|
_EnemyItemDrop(
|
|
|
|
enm, true,
|
|
|
|
30+rank*5, 25+rank*5,
|
|
|
|
30+rank*5, 25+rank*5,
|
|
|
|
60*15, largeEnemyHitbox*4
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
task _BossExplosion(
|
|
|
|
int ID, int IDship,
|
|
|
|
int minPoint, int maxPoint,
|
|
|
|
int maxTimer){
|
|
|
|
|
|
|
|
//wait(spawnTime+5);
|
|
|
|
float enmX = ObjMove_GetX(ID), enmY = ObjMove_GetY(ID);
|
|
|
|
float shipX = ObjMove_GetX(IDship), shipY = ObjMove_GetY(IDship);
|
|
|
|
int Bitch = ID;
|
|
|
|
float timer = 1;
|
|
|
|
float dmgCheck = 0;
|
|
|
|
|
|
|
|
_FadeInvincibility(ID, 150, 150, 1);
|
|
|
|
|
|
|
|
while(ObjEnemy_GetInfo(ID, INFO_LIFE) > 0){
|
|
|
|
|
|
|
|
enmX = ObjMove_GetX(ID); enmY = ObjMove_GetY(ID);
|
|
|
|
shipX = ObjMove_GetX(IDship); shipY = ObjMove_GetY(IDship);
|
|
|
|
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//NotifyEventAll(EV_DROP_POINT_ENEMY, [enmX, enmY], timer, maxTimer, minPoint, maxPoint);
|
|
|
|
|
|
|
|
ObjSound_Play(bossBoom);
|
2022-09-18 12:12:19 +00:00
|
|
|
NotifyEvent(GetCommonDataPtr(SYSTEMID_PTR_2, 0), EV_EXPLODE, [enmX, enmY]);
|
2022-09-14 16:26:09 +00:00
|
|
|
|
|
|
|
loop(30){
|
|
|
|
//LoadEx(bossBoom, "script/game/resourceLib/bigBoom.ogg", 30 * SFXVol);
|
|
|
|
ObjSound_Play(bossBoom);
|
2022-09-18 12:12:19 +00:00
|
|
|
NotifyEvent(GetCommonDataPtr(SYSTEMID_PTR_2, 0), EV_EXPLODE, [shipX+rand(-240, 240), shipY+rand(-150, 150)]);
|
2022-09-14 16:26:09 +00:00
|
|
|
wait(6);
|
|
|
|
}
|
|
|
|
|
|
|
|
ObjMove_SetDestAtFrame(IDship, shipX, STG_HEIGHT+512, 120, LERP_ACCELERATE);
|
|
|
|
|
|
|
|
float ang = ObjRender_GetAngleZ(IDship);
|
|
|
|
|
|
|
|
ascent(i in 0..120){
|
|
|
|
ObjRender_SetAngleZ(IDship, Interpolate_Accelerate(ang, ang+180, i/120));
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
//wait();
|
|
|
|
|
|
|
|
_EndShake(120, 120);
|
|
|
|
loop(120){
|
2022-09-18 12:12:19 +00:00
|
|
|
NotifyEvent(GetCommonDataPtr(SYSTEMID_PTR_2, 0), EV_EXPLODE, [shipX+rand(-240, 240), STG_HEIGHT+rand(0, -150)]);
|
2022-09-14 16:26:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ObjSound_Play(bossBoom);
|
|
|
|
Obj_Delete(IDship);
|
|
|
|
|
|
|
|
//_ScorePopup(float enmX, float enmY, int pointNum, int pivNum);
|
|
|
|
|
|
|
|
// NotifyEvent is faster than NotifyEventAll, considering how the item event will be called many times.
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
task EndBonus(int ID, int IDship){
|
|
|
|
|
|
|
|
while(ObjEnemy_GetInfo(ID, INFO_LIFE) > 0){
|
|
|
|
//WriteLog(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER));
|
|
|
|
//wait(30);
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
ObjEnemy_SetLife(bossObj, -1);
|
|
|
|
|
|
|
|
let timer = ObjEnemyBossScene_GetInfo(objScene, INFO_TIMERF);
|
2022-09-18 13:50:17 +00:00
|
|
|
//WriteLog(timer);
|
2022-09-14 16:26:09 +00:00
|
|
|
|
|
|
|
// Bonus Calculations:
|
|
|
|
|
|
|
|
// (Time Remaining + Ground Loops Cleared + Flying Loops Cleared + Average Rank) * PIV
|
|
|
|
|
|
|
|
function <void> _CreateBonusText(float x, y, fontSize, int colorBorder, string text){
|
|
|
|
|
|
|
|
int objText = CreateTextObject(
|
|
|
|
|
|
|
|
x, y, fontSize,
|
|
|
|
"", "Origami Mommy",
|
|
|
|
0xFFFFFF, 0xFFFFFF,
|
|
|
|
colorBorder, 4,
|
|
|
|
71
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
ObjText_SetHorizontalAlignment(objText, ALIGNMENT_CENTER);
|
|
|
|
|
|
|
|
TTextScroll(objText, text);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(120+120+240);
|
|
|
|
|
|
|
|
float rankAvgFinal = 0;
|
|
|
|
float rankSum = 0;
|
|
|
|
|
|
|
|
ascent(i in -1..length(rankAvg)-1){
|
|
|
|
rankSum += rankAvg[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
rankAvgFinal = rankSum/length(rankAvg);
|
|
|
|
|
|
|
|
_CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-180, 30, 0x397FFF, "TIME REMAINING: " ~ vtos("5.2f", timer/60));
|
2022-09-18 13:50:17 +00:00
|
|
|
_CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-140, 30, 0x00CC00, "GROUND ENEMIES DEFEATED: " ~ IntToString(GetCommonDataPtr(GROUNDENM_PTR, 0)));
|
|
|
|
_CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-100, 30, 0x8400CC, "FLYING ENEMIES DEFEATED: " ~ IntToString(GetCommonDataPtr(FLYINGENM_PTR, 0)));
|
2022-09-14 16:26:09 +00:00
|
|
|
_CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-60, 30, 0x3400CC, "AVERAGE RANK: " ~ vtos("5.2f", rankAvgFinal));
|
|
|
|
_CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2-20, 30, 0xCC00C8, "MULTIPLIER: " ~ vtos("5.2f", GetAreaCommonData("PIV", "currentvalue", 0)/10000));
|
|
|
|
|
|
|
|
_CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2+40, 30, 0xFFA300, "END BONUS:");
|
|
|
|
|
|
|
|
wait(120);
|
|
|
|
|
2022-09-18 13:50:17 +00:00
|
|
|
float multiplierBonus = timer/60 * 5 + GetCommonDataPtr(GROUNDENM_PTR, 0)/5 + GetCommonDataPtr(FLYINGENM_PTR, 0)/5 + rankAvgFinal * 5;
|
2022-09-14 16:26:09 +00:00
|
|
|
|
|
|
|
int scoreBonus = trunc ( (multiplierBonus * GetAreaCommonData("PIV", "currentvalue", 0)) / 10 ) * 10;
|
|
|
|
|
|
|
|
_CreateBonusText(STG_WIDTH/2, STG_HEIGHT/2+100, 60, 0xFFA300, DigitToCommaArray(scoreBonus));
|
|
|
|
AddScore(scoreBonus);
|
|
|
|
|
|
|
|
wait(60);
|
|
|
|
|
|
|
|
if(!IsReplay()){SetCommonData("Run Score", GetScore());}
|
|
|
|
else{SetCommonData("Run Score", 0);}
|
|
|
|
|
|
|
|
Obj_Delete(bossObj);
|
|
|
|
CloseScript(GetOwnScriptID());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
task RankManagement(){
|
|
|
|
|
|
|
|
//SetCommonData("Rank", 9);
|
|
|
|
//SetCommonData("Rank", 10);
|
|
|
|
// Rank increase
|
|
|
|
let textRank = CreateTextObject(
|
|
|
|
STG_WIDTH-15, STG_HEIGHT/11, 30,
|
|
|
|
"RANK:", "Origami Mommy",
|
|
|
|
0xFFFFFF, 0xFFFFFF,
|
|
|
|
0x1D89D5, 5,
|
|
|
|
71
|
|
|
|
);
|
|
|
|
|
|
|
|
ObjText_SetHorizontalAlignment(textRank, ALIGNMENT_RIGHT);
|
|
|
|
|
|
|
|
async{
|
|
|
|
while(true){
|
|
|
|
rank = GetCommonData("Rank", 1);
|
|
|
|
if(rank >= 9){ObjText_SetText(textRank, "RANK MAX");}
|
|
|
|
else{ObjText_SetText(textRank, "RANK " ~ IntToString(rank));}
|
|
|
|
//SetCommonData("Rank", 9);
|
|
|
|
wait(45);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async{
|
|
|
|
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0){
|
|
|
|
rankAvg ~= [rank];
|
|
|
|
wait(60);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-09-18 12:12:19 +00:00
|
|
|
task testTask(){
|
|
|
|
|
|
|
|
wait(15);
|
|
|
|
|
|
|
|
while(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) > 20){
|
|
|
|
|
|
|
|
//Wave4();
|
|
|
|
WaveGround1();
|
|
|
|
|
|
|
|
wait(15);
|
|
|
|
//SetCommonData("Rank", clamp(GetCommonData("Rank", 1)+1, 1, 9));
|
|
|
|
//SetCommonData("Ground Loops Cleared", GetCommonData("Ground Loops Cleared", 0)+1);
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-09-14 16:26:09 +00:00
|
|
|
task groundTask(){
|
|
|
|
|
|
|
|
wait(15);
|
|
|
|
while(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) > 20){
|
|
|
|
WaveGround1();
|
|
|
|
wait(max(0, 16-4*rank));
|
|
|
|
if(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) <= 20){break;}
|
|
|
|
WaveGround2();
|
|
|
|
wait(max(0, 16-4*rank));
|
|
|
|
if(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) <= 20){break;}
|
|
|
|
WaveGround3();
|
|
|
|
wait(max(0, 16-4*rank));
|
|
|
|
SetCommonData("Rank", clamp(GetCommonData("Rank", 1)+1, 1, 9));
|
|
|
|
SetCommonData("Ground Loops Cleared", GetCommonData("Ground Loops Cleared", 0)+1);
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
task mainTask {
|
|
|
|
|
|
|
|
wait(60);
|
|
|
|
|
|
|
|
bonusTask();
|
|
|
|
Flying();
|
|
|
|
|
|
|
|
task Flying(){
|
|
|
|
while(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) > 20){
|
|
|
|
Wave1();
|
|
|
|
//wait(max(0, 5-1*rank));
|
|
|
|
if(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) <= 20){break;}
|
|
|
|
Wave2();
|
|
|
|
//wait(max(0, 5-1*rank));
|
|
|
|
if(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) <= 20){break;}
|
|
|
|
//SetCommonData("Rank", clamp(GetCommonData("Rank", 1)+1, 1, 9));
|
|
|
|
Wave3();
|
|
|
|
//wait(max(0, 5-1*rank));
|
|
|
|
if(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) <= 20){break;}
|
|
|
|
Wave4();
|
|
|
|
//wait(max(0, 5-1*rank));
|
|
|
|
if(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) <= 20){break;}
|
|
|
|
Wave5();
|
|
|
|
//wait(max(0, 5-1*rank));
|
|
|
|
SetCommonData("Rank", clamp(GetCommonData("Rank", 1)+1, 1, 9));
|
|
|
|
SetCommonData("Flying Loops Cleared", GetCommonData("Flying Loops Cleared", 0)+1);
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function <void> GetReady(){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
Enemy Waves (Ground):
|
|
|
|
|
|
|
|
Small:
|
|
|
|
|
|
|
|
Lilypod with 6 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 (W1) DONE
|
|
|
|
Horizontal wave of fairies firing aimed fans, followed by horizontal wave firing aimed rings
|
|
|
|
Fairies coming from both sides, firing falling bullet lines DONE
|
|
|
|
2 tightly-knit lines of small fairies firing aimed fans, alongside a large fairy firing rings DONE
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
function <void> WaveGround1(){
|
|
|
|
|
|
|
|
_LilypodWith4Frogs(
|
|
|
|
34, KEV_BALL_GREEN,
|
|
|
|
STG_WIDTH/6, -256,
|
|
|
|
[4, 6, 9][clamp((rank/2)-1, 0, 2)], 7*(1.25+rank/10), 7*(1.25+rank/10)/4, [3, 5, 7][clamp((rank/2)-1, 0, 2)], 1, trunc(71.5-(1.5*rank)), 0.6,
|
|
|
|
4*(1.25+rank/9)
|
|
|
|
);
|
|
|
|
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
while(length(enmGround) > 1){yield;}
|
|
|
|
|
|
|
|
wait(max(0, 15-5*rank));
|
|
|
|
|
|
|
|
_LilypodWith4Frogs(
|
|
|
|
34, KEV_BALL_GREEN,
|
|
|
|
5*STG_WIDTH/6, -256,
|
|
|
|
[4, 6, 9][clamp((rank/2)-1, 0, 2)], 7*(1.25+rank/10), 7*(1.25+rank/10)/4, [3, 5, 7][clamp((rank/2)-1, 0, 2)], 1, trunc(71.5-(1.5*rank)), 0.6,
|
|
|
|
4*(1.25+rank/9)
|
|
|
|
);
|
|
|
|
|
|
|
|
wait(max(10, 20-5*rank));
|
|
|
|
|
|
|
|
while(length(enmGround) > 1){yield;}
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function <void> WaveGround2(){
|
|
|
|
|
|
|
|
int rankCount = rank;
|
|
|
|
|
|
|
|
_LilypodWithKingFrog(
|
|
|
|
34, KEV_BALL_GREEN,
|
|
|
|
STG_WIDTH/2, -256,
|
|
|
|
1.167*12-0.247*rankCount, trunc(5-(0.2*rank)), 6*(1+rank/10), 0.6,
|
|
|
|
4*(1.15+rank/9)
|
|
|
|
);
|
|
|
|
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
while(length(enmGround) > 0){yield;}
|
|
|
|
|
|
|
|
_LilypodWith4Frogs(
|
|
|
|
34, KEV_BALL_GREEN,
|
|
|
|
2*STG_WIDTH/6, -256,
|
|
|
|
[2.5, 4, 5.5][clamp((rank/2)-1, 0, 2)], 7*(1.25+rank/10), 7*(1.25+rank/10)/4, [1, 3, 3][clamp((rank/2)-1, 0, 2)], 1, trunc(71.5-(1.5*rank)), 0.6,
|
|
|
|
5*(1.25+rank/8)
|
|
|
|
);
|
|
|
|
_LilypodWith4Frogs(
|
|
|
|
34, KEV_BALL_GREEN,
|
|
|
|
4*STG_WIDTH/6, -256,
|
|
|
|
[4, 6, 9][clamp((rank/2)-1, 0, 2)], 7*(1.25+rank/10), 7*(1.25+rank/10)/4, [1, 3, 3][clamp((rank/2)-1, 0, 2)], 1, trunc(71.5-(1.5*rank)), 0.6,
|
|
|
|
5*(1.25+rank/8)
|
|
|
|
);
|
|
|
|
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
while(length(enmGround) > 0){yield;}
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function <void> WaveGround3(){
|
|
|
|
|
|
|
|
ascent(i in 0..4){
|
|
|
|
_LilypodWith2Frog(
|
|
|
|
34, KEV_BALL_GREEN,
|
|
|
|
(1+2*i)*STG_WIDTH/8, -256,
|
|
|
|
[3, 5, 7][clamp((rank/2)-1, 0, 2)], 7*(1.25+rank/10), 7*(1.25+rank/10)/4, 1, 1, trunc(61.5-(3*rank)), 0.6,
|
|
|
|
4.5*(1.1+rank/9)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(max(25, 75-8*rank));
|
|
|
|
|
|
|
|
ascent(i in 0..4){
|
|
|
|
_LilypodWith2Frog(
|
|
|
|
34, KEV_BALL_GREEN,
|
|
|
|
(1+2*i)*STG_WIDTH/8, -256,
|
|
|
|
[3, 5, 7][clamp((rank/2)-1, 0, 2)], 7*(1.25+rank/10), 7*(1.25+rank/10)/4, 1, 1, trunc(61.5-(3*rank)), 0.6,
|
|
|
|
4.5*(1.1+rank/9)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(max(25, 75-8*rank));
|
|
|
|
|
|
|
|
ascent(i in 0..4){
|
|
|
|
_LilypodWith2Frog(
|
|
|
|
34, KEV_BALL_GREEN,
|
|
|
|
(1+2*i)*STG_WIDTH/8, -256,
|
|
|
|
[3, 5, 7][clamp((rank/2)-1, 0, 2)], 7*(1.25+rank/10), 7*(1.25+rank/10)/4, 1, 1, trunc(61.5-(3*rank)), 0.6,
|
|
|
|
4.5*(1.1+rank/9)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(max(25, 75-8*rank));
|
|
|
|
|
|
|
|
while(length(enmGround) > 1){yield;}
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function Wave1(){
|
|
|
|
|
|
|
|
task SpawnLine(x){
|
|
|
|
ascent(i in -1..4){
|
|
|
|
_SmallFairyAimedFan(40-i,
|
|
|
|
x + rand(-45, 45), -128, 6.5*(1.15+rank/10), 90, KEV_LEAF_ORANGE, [0, 1.25, 2][clamp((rank/2)-1, 0, 2)],
|
|
|
|
8*(1+rank/8), 8*(1+rank/8)/4, [1, 2, 3, 3][clamp((rank/2)-1, 0, 3)], 1, round(30-(0.5*rank)), 0.9
|
|
|
|
);
|
|
|
|
wait(max(5, 10-rank));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SpawnLine(STG_WIDTH/6);
|
|
|
|
wait(max(5, 32-8*rank));
|
|
|
|
|
|
|
|
SpawnLine(3*STG_WIDTH/6);
|
|
|
|
wait(max(5, 32-8*rank));
|
|
|
|
|
|
|
|
SpawnLine(5*STG_WIDTH/6);
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
while(length(enmFly) > 1){yield;}
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function Wave2(){
|
|
|
|
|
|
|
|
async{
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
_SmallFairyAimedFan(40,
|
|
|
|
STG_WIDTH/8, -128, 7*(1.15+rank/7), 90, KEV_LEAF_PINK, [4, 6, 6.5, 7][clamp((rank/2)-1, 0, 3)],
|
|
|
|
8*(1.25+rank/9), 8*(1.25+rank/12)/4, [3, 3, 5, 5][clamp((rank/2)-1, 0, 3)], 1, trunc(81.5-(4.5*rank)), 0.9
|
|
|
|
);
|
|
|
|
_SmallFairyAimedFan(40,
|
|
|
|
7*STG_WIDTH/8, -128, 7*(1.15+rank/7), 90, KEV_LEAF_ORANGE, [4, 6, 6.5, 7][clamp((rank/2)-1, 0, 3)],
|
|
|
|
8*(1.25+rank/9), 8*(1.25+rank/12)/4, [3, 3, 5, 5][clamp((rank/2)-1, 0, 3)], 1, trunc(81.5-(4.5*rank)), 0.9
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
loop(3){
|
|
|
|
_SmallFairyFallingLine(
|
|
|
|
40,
|
|
|
|
-128, rand(STG_HEIGHT/9, STG_HEIGHT/8), 8.15*(1.2+rank/8), rand(-10, 10), KEV_BALL_ORANGE,
|
|
|
|
[3, 4, 5][clamp((rank/2)-1, 0, 2)], 7.5*(1.25+rank/10), max(12, 24-2*rank), [1, 2, 2][clamp((rank/2)-1, 0, 2)], 0.6
|
|
|
|
);
|
|
|
|
wait(max(10, 20-2*rank));
|
|
|
|
_SmallFairyFallingLine(
|
|
|
|
40,
|
|
|
|
STG_WIDTH+128, rand(STG_HEIGHT/9, STG_HEIGHT/8), 8.15*(1.2+rank/8), rand(170, 190), KEV_BALL_PINK,
|
|
|
|
[3, 4, 5][clamp((rank/2)-1, 0, 2)], 7.5*(1.25+rank/10), max(12, 24-2*rank), [1, 2, 2][clamp((rank/2)-1, 0, 2)], 0.6
|
|
|
|
);
|
|
|
|
wait(max(10, 20-2*rank));
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(max(15, 35-5*rank));
|
|
|
|
|
|
|
|
while(length(enmFly) > 1){yield;}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
function Wave3(){
|
|
|
|
|
|
|
|
_LargeFairyAimedFan(
|
|
|
|
40, true,
|
|
|
|
1*STG_WIDTH/7+60, -256, 6.25*(1.15+rank/8), 90, KEV_LEAF_PINK, [5, 6, 6.5, 7.25][clamp((rank/2)-1, 0, 3)],
|
|
|
|
8.45*(1.25+rank/12), 8.45*(1.25+rank/12)/1.2, [5, 5, 7, 9][clamp((rank/2)-1, 0, 3)], [3, 3, 4, 4][clamp((rank/2)-1, 0, 3)], 60-3*rank, 0.9
|
|
|
|
);
|
|
|
|
|
|
|
|
wait(max(15, 35-5*rank));
|
|
|
|
|
|
|
|
_LargeFairyAimedFan(
|
|
|
|
40, true,
|
|
|
|
6*STG_WIDTH/7-60, -256, 6.25*(1.15+rank/8), 90, KEV_LEAF_PINK, [5, 6, 6.5, 7.25][clamp((rank/2)-1, 0, 3)],
|
|
|
|
8.45*(1.25+rank/12), 8.45*(1.25+rank/12)/1.2, [5, 5, 7, 9][clamp((rank/2)-1, 0, 3)], [3, 3, 4, 4][clamp((rank/2)-1, 0, 3)], 60-3*rank, 0.9
|
|
|
|
);
|
|
|
|
|
|
|
|
wait(max(15, 35-5*rank));
|
|
|
|
|
|
|
|
while(length(enmFly) > 1){yield;}
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function Wave4(){
|
|
|
|
|
|
|
|
task SpawnLine(x){
|
|
|
|
ascent(i in -1..3){
|
|
|
|
_SmallFairyAimedFan(40-i,
|
|
|
|
x, -128, 6*(1.15+rank/9), 90, KEV_LEAF_PINK, [4, 5, 5.5, 6][clamp((rank/2)-1, 0, 3)],
|
|
|
|
7.5*(1.25+rank/12), 7.5*(1.25+rank/12)/4, [2, 2, 3, 3][clamp((rank/2)-1, 0, 3)], 1, 80-4*rank, 0.9
|
|
|
|
);
|
|
|
|
wait(15);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async{
|
|
|
|
SpawnLine(STG_WIDTH/6 + 0 * STG_WIDTH/8);
|
|
|
|
wait(max(5, 15-2*rank));
|
|
|
|
SpawnLine(STG_WIDTH/6 + 1 * STG_WIDTH/8);
|
|
|
|
wait(max(5, 15-2*rank));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async{
|
|
|
|
wait(max(25, 60-5*rank));
|
|
|
|
SpawnLine(5*STG_WIDTH/6 - 0 * STG_WIDTH/8);
|
|
|
|
wait(max(5, 15-2*rank));
|
|
|
|
SpawnLine(5*STG_WIDTH/6 - 1 *STG_WIDTH/8);
|
|
|
|
wait(max(5, 15-2*rank));
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(max(15, 45-8*rank));
|
|
|
|
|
|
|
|
while(length(enmFly) > 1){yield;}
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function Wave5(){
|
|
|
|
|
|
|
|
async{
|
|
|
|
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
loop(3){
|
|
|
|
|
|
|
|
_SmallFairyRing(
|
|
|
|
40, KEV_BALL_ORANGE,
|
|
|
|
STG_WIDTH+128, 2*STG_HEIGHT/8,
|
|
|
|
round(6+1.5*rank), trunc(51.5-(1.5*rank)), 6.5*(1.25+rank/10),
|
|
|
|
6*(1.15+rank/11), 180, 0.6
|
|
|
|
);
|
|
|
|
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
loop(6){
|
|
|
|
|
|
|
|
_SmallFairyAimedFan(40,
|
|
|
|
-128, STG_HEIGHT/8, 6*(1.15+rank/11), 0, KEV_LEAF_PINK, [3, 4, 4.25, 4.5][clamp((rank/2)-1, 0, 3)],
|
|
|
|
8*(1.25+rank/12), 8*(1.25+rank/12)/4, [1, 2, 3, 3][clamp((rank/2)-1, 0, 3)], 1, 60-3*rank, 0.9
|
|
|
|
);
|
|
|
|
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
wait(max(15, 30-5*rank));
|
|
|
|
|
|
|
|
while(length(enmFly) > 1){yield;}
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
task _EndShake(shaketime, intensity){
|
|
|
|
|
|
|
|
float baseintensity = intensity;
|
|
|
|
float shakeno = shaketime;
|
|
|
|
|
|
|
|
ascent(i in 0..shakeno){
|
|
|
|
Set2DCameraFocusX(GetStgFrameWidth/2 + rand(-intensity, intensity));
|
|
|
|
Set2DCameraFocusY(GetStgFrameHeight/2 + rand(-intensity, intensity));
|
|
|
|
intensity = Interpolate_Decelerate(0, baseintensity, 1-i/shakeno);
|
|
|
|
shaketime--;
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
while(shaketime > 0){yield;}
|
|
|
|
|
|
|
|
Set2DCameraFocusX(GetStgFrameWidth/2);
|
|
|
|
Set2DCameraFocusY(GetStgFrameHeight/2);
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
|