import "std.zh" import "ghost.zh" import "string.zh" import "ffcscript.zh" const int TIL_FLAPPYMOOSH = 52000; const int TIL_FLAPPYMOOSHHEAD = 52008; const int CS_FLAPPYMOOSH = 7; const int TIL_FLAPPYMOOSHPIPE = 52001; const int CS_FLAPPYMOOSHPIPE = 5; const int SFX_CHOOSE = 61; const int SFX_HIT = 62; const int SFX_DIE = 63; const int SPR_FIREBALL = 17; const int SPR_WIND = 13; const int SPR_EMPTY = 89; const int TIL_BANANA = 53059; int GameMode = 0; int Difficulty = 1; int Lives = 1; int Score = 0; int Gravity = 0.16; int JumpHeight = 3; int TerminalVelocity = 3.2; int Speed = 3; int ShotType = 1; ffc script PipeBG{ void run(){ int PipeX[3] = {256, 400}; int PipeY[3] = {Rand(32, 146), Rand(32, 146)}; while(true){ for(int i=0; i<2; i++){ PipeX[i]-=Speed; if(PipeX[i]<=-48){ PipeX[i] = 256; PipeY[i] = Rand(32, 146); } Screen->DrawTile(0, PipeX[i], PipeY[i]+24, TIL_FLAPPYMOOSHPIPE, 2, 11, CS_FLAPPYMOOSHPIPE, -1, -1, 0, 0, 0, 0, true, 128); Screen->DrawTile(0, PipeX[i], PipeY[i]-200, TIL_FLAPPYMOOSHPIPE+2, 2, 11, CS_FLAPPYMOOSHPIPE, -1, -1, 0, 0, 0, 0, true, 128); } Waitframe(); } } } ffc script PressStart{ void run(){ while(true){ if(Link->PressStart){ Game->PlaySound(SFX_CHOOSE); Screen->TriggerSecrets(); for(int i=0; i<30; i++){ WaitNoAction(); } Link->X = 256; } WaitNoAction(); } } } ffc script MooshFlakes{ void run(){ int FlakeX[50]; int FlakeY[50]; int FlakeXS[50]; int FlakeJump[50]; int FlakeR[50]; int FlakeRS[50]; for(int i=0; i<50; i++){ FlakeY[i] = 176; } int Counter = 0; while(true){ Counter++; bool NewFlake = false; for(int i=0; i<50; i++){ if(Counter>10&&!NewFlake&&FlakeY[i]>=176){ FlakeX[i] = Rand(0, 240); FlakeY[i] = -16; FlakeXS[i] = Rand(-10, 10); FlakeJump[i] = 0; FlakeR[i] = Rand(1, 360); FlakeRS[i] = Choose(-1, 1)*Rand(1, 5); NewFlake = false; Counter = 0; } FlakeX[i]+=FlakeXS[i]/5; FlakeY[i]-=FlakeJump[i]; FlakeJump[i] = Max(FlakeJump[i]-Gravity/2, -TerminalVelocity); FlakeR[i] = WrapDegrees(FlakeR[i]+FlakeRS[i]); Screen->DrawTile(0, FlakeX[i], FlakeY[i], TIL_FLAPPYMOOSH, 1, 1, CS_FLAPPYMOOSH, -1, -1, FlakeX[i], FlakeY[i], FlakeR[i], 0, true, 128); } Waitframe(); } } } ffc script Options{ void DrawMenu(int SStart, int SGameMode, int SDifficulty, int SLives, int SBack){ Screen->DrawString(2, 128, 80, FONT_Z1, 1, -1, TF_CENTERED, SStart, 128); Screen->DrawString(2, 128, 94, FONT_Z1, 1, -1, TF_CENTERED, SGameMode, 128); Screen->DrawString(2, 128, 108, FONT_Z1, 1, -1, TF_CENTERED, SDifficulty, 128); Screen->DrawString(2, 128, 122, FONT_Z1, 1, -1, TF_CENTERED, SLives, 128); Screen->DrawString(2, 128, 136, FONT_Z1, 1, -1, TF_CENTERED, SBack, 128); } void run(){ int SStart[] = "START"; int SGameMode[] = "GAME MODE "; int SDifficulty[19] = "DIFFICULTY "; SDifficulty[18] = NULL; int SLives[9] = "LIVES "; SLives[8] = NULL; int SBack[] = "BACK"; int SEasy[] = "EASY"; int SNormal[] = "NORMAL"; int SHard[] = "HARD"; int SWTF[] = "WTF"; strcatf(SGameMode, 65+GameMode, MF_CHAR); if(Difficulty==0)strcatf(SDifficulty, SEasy, MF_STRING); else if(Difficulty==1)strcatf(SDifficulty, SNormal, MF_STRING); else if(Difficulty==2)strcatf(SDifficulty, SHard, MF_STRING); else if(Difficulty==3)strcatf(SDifficulty, SWTF, MF_STRING); strcatf(SLives, Lives, MF_INT); int Selection = 0; while(true){ if(Link->PressUp){ Game->PlaySound(SFX_CURSOR); Selection--; if(Selection<0)Selection = 4; } else if(Link->PressDown){ Game->PlaySound(SFX_CURSOR); Selection++; if(Selection>4)Selection = 0; } else if(Link->PressStart){ Game->PlaySound(SFX_CHOOSE); for(int i=0; i<30; i++){ DrawMenu(SStart, SGameMode, SDifficulty, SLives, SBack); WaitNoAction(); } Link->Y = -16; } else if(Link->PressB){ Game->PlaySound(SFX_CHOOSE); for(int i=0; i<30; i++){ DrawMenu(SStart, SGameMode, SDifficulty, SLives, SBack); WaitNoAction(); } Link->X = -16; } if(Selection==0){ Screen->DrawString(2, 128, 80, FONT_Z1, 0x72, -1, TF_CENTERED, SStart, 128); if(Link->PressA){ Game->PlaySound(SFX_CHOOSE); for(int i=0; i<30; i++){ DrawMenu(SStart, SGameMode, SDifficulty, SLives, SBack); WaitNoAction(); } Link->Y = -16; } } else{ Screen->DrawString(2, 128, 80, FONT_Z1, 1, -1, TF_CENTERED, SStart, 128); } if(Selection==1){ if(Link->PressRight||Link->PressLeft){ int GMCap = 2; if(Link->PressRight){ Game->PlaySound(SFX_CURSOR); GameMode++; if(GameMode>GMCap)GameMode = 0; } else if(Link->PressLeft){ Game->PlaySound(SFX_CURSOR); GameMode--; if(GameMode<0)GameMode = GMCap; } SGameMode[10] = 0; strcatf(SGameMode, 65+GameMode, MF_CHAR); } Screen->DrawString(2, 128, 94, FONT_Z1, 0x72, -1, TF_CENTERED, SGameMode, 128); } else{ Screen->DrawString(2, 128, 94, FONT_Z1, 1, -1, TF_CENTERED, SGameMode, 128); } if(Selection==2){ if(Link->PressRight||Link->PressLeft){ if(Link->PressRight){ Game->PlaySound(SFX_CURSOR); Difficulty++; if(Difficulty>3)Difficulty = 0; } else if(Link->PressLeft){ Game->PlaySound(SFX_CURSOR); Difficulty--; if(Difficulty<0)Difficulty = 3; } remchr(SDifficulty, 11); if(Difficulty==0){ strcatf(SDifficulty, SEasy, MF_STRING); Gravity = 0.16; JumpHeight = 2; TerminalVelocity = 3.2; Speed = 1.5; ShotType = 0; } else if(Difficulty==1){ strcatf(SDifficulty, SNormal, MF_STRING); Gravity = 0.16; JumpHeight = 3; TerminalVelocity = 3.2; Speed = 3; ShotType = 1; } else if(Difficulty==2){ strcatf(SDifficulty, SHard, MF_STRING); Gravity = 0.24; JumpHeight = 4; TerminalVelocity = 4.8; Speed = 4; ShotType = 2; } else if(Difficulty==3){ strcatf(SDifficulty, SWTF, MF_STRING); Gravity = Rand(8, 32)/100; JumpHeight = Rand(1, 4); TerminalVelocity = Rand(24, 48)/10; Speed = Rand(1, 4); ShotType = Rand(0, 2); } } Screen->DrawString(2, 128, 108, FONT_Z1, 0x72, -1, TF_CENTERED, SDifficulty, 128); } else{ Screen->DrawString(2, 128, 108, FONT_Z1, 1, -1, TF_CENTERED, SDifficulty, 128); } if(Selection==3){ if(Link->PressRight||Link->PressLeft){ if(Link->PressRight){ Game->PlaySound(SFX_CURSOR); Lives++; if(Lives>5)Lives = 1; } else if(Link->PressLeft){ Game->PlaySound(SFX_CURSOR); Lives--; if(Lives<1)Lives = 5; } remchr(SLives, 6); strcatf(SLives, Lives, MF_INT); } Screen->DrawString(2, 128, 122, FONT_Z1, 0x72, -1, TF_CENTERED, SLives, 128); } else{ Screen->DrawString(2, 128, 122, FONT_Z1, 1, -1, TF_CENTERED, SLives, 128); } if(Selection==4){ Screen->DrawString(2, 128, 136, FONT_Z1, 0x72, -1, TF_CENTERED, SBack, 128); if(Link->PressA||Link->PressStart){ Game->PlaySound(SFX_CHOOSE); for(int i=0; i<30; i++){ DrawMenu(SStart, SGameMode, SDifficulty, SLives, SBack); WaitNoAction(); } Link->X = -16; } } else{ Screen->DrawString(2, 128, 136, FONT_Z1, 1, -1, TF_CENTERED, SBack, 128); } WaitNoAction(); } } } ffc script Flappy_Moosh{ void DrawLives(int NumLives){ for(int i=0; iFastTile(6, 8+10*i, 8, TIL_FLAPPYMOOSHHEAD, CS_FLAPPYMOOSH, 128); } } void run(){ Screen->D[0] = 0; int TargetScore; if(GameMode==0)TargetScore = 20; else if(GameMode==2)TargetScore = 0; int EnemyCooldown = -1; int ShotCooldown = 0; int Jump = 0; int PipeX[3] = {256, 400}; int PipeY[3] = {Rand(32, 146), Rand(32, 146)}; int CheckedLink[3]; Score = 0; int LivesLeft = Lives; int InvincibilityFrames; if(GameMode==2)Screen->Rectangle(0, 0, 0, 256, 176, 0, -1, 0, 0, 0, true, 128); while(true){ if(Score==TargetScore&&CountFFCsRunning(FFCS_STARS)==0&&GameMode!=1){ RunFFCScript(FFCS_STARS, 0); } if(InvincibilityFrames>0)InvincibilityFrames--; if(Link->PressA&&Jump<=2){ Jump = JumpHeight; } else if(Link->InputB&&GameMode!=1&&ShotCooldown==0&&Score>=TargetScore){ if(ShotType==0){ for(int i=-1; i<=1; i++){ lweapon l = CreateLWeaponAt(LW_SCRIPT1, Link->X, Link->Y); l->Angular = true; l->Angle = DegtoRad(-Jump*10+20*i); l->Damage = 4; l->Step = 300; l->UseSprite(SPR_FIREBALL); } ShotCooldown = 10; } else if(ShotType==1){ lweapon l = CreateLWeaponAt(LW_SCRIPT2, Link->X, Link->Y); l->Angular = true; l->Angle = DegtoRad(-Jump*10); l->Damage = 4; l->Step = 200; l->UseSprite(SPR_WIND); ShotCooldown = 20; } else if(ShotType==2){ lweapon l = CreateLWeaponAt(LW_SCRIPT3, Link->X, Link->Y); l->Angular = true; l->Angle = DegtoRad(-Jump*10); l->Damage = 8; l->Step = 450; l->Misc[15] = 1; l->UseSprite(SPR_EMPTY); ShotCooldown = 40; } } if(ShotCooldown>0)ShotCooldown--; Link->Y = Min(160, Max(0, Link->Y-Jump)); Jump = Max(Jump-Gravity, -TerminalVelocity); for(int i=0; i<2; i++){ if(GameMode!=2)PipeX[i]-=Speed; if(PipeX[i]<=-48&&(ScoreX>PipeX[i]+8&&CheckedLink[i]==0){ CheckedLink[i] = 1; Score++; } Screen->DrawTile(3, PipeX[i], PipeY[i]+24, TIL_FLAPPYMOOSHPIPE, 2, 11, CS_FLAPPYMOOSHPIPE, -1, -1, 0, 0, 0, 0, true, 128); Screen->DrawTile(3, PipeX[i], PipeY[i]-200, TIL_FLAPPYMOOSHPIPE+2, 2, 11, CS_FLAPPYMOOSHPIPE, -1, -1, 0, 0, 0, 0, true, 128); if(InvincibilityFrames==0&&(RectCollision(Link->X, Link->Y, Link->X+15, Link->Y+15, PipeX[i], PipeY[i]+24, PipeX[i]+31, PipeY[i]+200)||RectCollision(Link->X, Link->Y, Link->X+15, Link->Y+15, PipeX[i], PipeY[i]-200, PipeX[i]+32, PipeY[i]-48))){ Link->HP = 0; } } if(InvincibilityFrames%2==0)Screen->DrawTile(3, Link->X, Link->Y, TIL_FLAPPYMOOSH, 1, 1, 7, -1, -1, Link->X, Link->Y, -Jump*10, 0, true, 128); Screen->DrawInteger(3, 208, 8, FONT_Z1, 1, -1, -1, -1, Score, 0, 128); if(Link->Y==160)Link->HP = 0; if(Score>=TargetScore&&GameMode!=1){ if(Link->InputLeft)Link->X = Max(0, Link->X-1.5); else if(Link->InputRight)Link->X = Min(240, Link->X+1.5); if(EnemyCooldown==-1){ EnemyCooldown = 180; Game->PlayMIDI(2); } else if(EnemyCooldown>0)EnemyCooldown--; else if(EnemyCooldown==0){ int EnemyChoice = -1; if(Score=TargetScore+20&&Screen->D[0]==0){ EnemyChoice = 4; Screen->D[0] = 1; } else if(ScoreD[0]==2){ EnemyChoice = Rand(5, 7); } if(EnemyChoice==0){ int Args[8] = {256, Rand(0, 160), 8, 5, 177}; if(Link->YNumNPCs()<10){ npc m = CreateNPCAt(181, 256, Rand(0, 160)); } EnemyCooldown = 90; } else if(EnemyChoice==4){ npc n = CreateNPCAt(182, 224, 176); Game->PlayMIDI(3); } else if(EnemyChoice==5){ npc n = CreateNPCAt(183, Rand(120, 240), -16); EnemyCooldown = 60; } else if(EnemyChoice==6){ npc n = CreateNPCAt(184, 256, 32); EnemyCooldown = 180; } else if(EnemyChoice==7){ npc n = CreateNPCAt(185, 256, Rand(0, 144)); EnemyCooldown = 120; } } } if(Link->HP==0){ Link->HP = Link->MaxHP; if(LivesLeft>1&&Link->Y<160){ Game->PlaySound(SFX_HIT); LivesLeft--; InvincibilityFrames = 48; } else{ Game->PlaySound(SFX_DIE); Jump = JumpHeight; Link->CollDetection = false; int Rotate = 0; while(Link->Y<160){ Rotate+=5; for(int i=0; i<2; i++){ Screen->DrawTile(3, PipeX[i], PipeY[i]+24, TIL_FLAPPYMOOSHPIPE, 2, 11, CS_FLAPPYMOOSHPIPE, -1, -1, 0, 0, 0, 0, true, 128); Screen->DrawTile(3, PipeX[i], PipeY[i]-200, TIL_FLAPPYMOOSHPIPE+2, 2, 11, CS_FLAPPYMOOSHPIPE, -1, -1, 0, 0, 0, 0, true, 128); } Link->Y = Min(160, Max(0, Link->Y-Jump)); Jump = Max(Jump-Gravity, -TerminalVelocity); Screen->DrawTile(3, Link->X, Link->Y, TIL_FLAPPYMOOSH, 1, 1, 7, -1, -1, Link->X, Link->Y, -Jump*10+Rotate, 0, true, 128); Screen->DrawInteger(3, 208, 8, FONT_Z1, 1, -1, -1, -1, Score, 0, 128); WaitNoAction(); } if(Difficulty==3){ Gravity = Rand(8, 32)/100; JumpHeight = Rand(1, 4); TerminalVelocity = Rand(24, 48)/10; Speed = Rand(1, 4); ShotType = Rand(0, 2); } Link->CollDetection = true; Link->Warp(Game->GetCurDMap(), Game->GetCurDMapScreen()); } } DrawLives(LivesLeft); WaitNoAction(); } } } const int FFCS_CHAINSPAWN = 7; ffc script ChainSpawn{ void run(int X, int Y, int Pause, int Number, int NPCID){ this->X = X; this->Y = Y; for(int i=0; iX, this->Y); Waitframes(Pause); } } } void Points_Waitframe(ffc this, npc ghost, int Points){ if(!Ghost_Waitframe(this, ghost, true, false)){ Score+=Points; Quit(); } } ffc script ZigZagger{ void run(int enemyid){ npc ghost = Ghost_InitAutoGhost(this, enemyid); int initX = Ghost_X; int initY = Ghost_Y; Ghost_SetFlag(GHF_MOVE_OFFSCREEN); Ghost_Transform(this, ghost, -1, -1, 1, 1); Ghost_X = initX; Ghost_Y = initY; int Angle = ghost->Attributes[0]; int TX = Link->X; int TY = Link->Y; for(int i=0; i<50; i++){ Ghost_MoveAtAngle(180, 3, 0); Points_Waitframe(this, ghost, 1); } for(int i=0; i<40; i++){ Ghost_MoveAtAngle(Angle, 3, 0); Points_Waitframe(this, ghost, 1); } while(Ghost_X>-16){ Ghost_MoveAtAngle(180, 3, 0); Points_Waitframe(this, ghost, 1); } Ghost_HP = -1000; Ghost_Waitframe(this, ghost, true, true); } } const int SPR_SHADOWBLADE = 88; ffc script ShadowMan{ void run(int enemyid){ npc ghost = Ghost_InitAutoGhost(this, enemyid); Ghost_SetFlag(GHF_MOVE_OFFSCREEN); int Combo = ghost->Attributes[10]; Ghost_Transform(this, ghost, GH_INVISIBLE_COMBO, ghost->CSet, 2, 2); int Counter = 0; int Angle = 0; int Jump = 0; while(Ghost_Y<176){ Counter++; if(Counter%5==0){ eweapon e = FireEWeapon(EW_SCRIPT1, Ghost_X+8, Ghost_Y+8, DegtoRad(Angle-180), 200, ghost->WeaponDamage, SPR_SHADOWBLADE, 0, EWF_UNBLOCKABLE); } Screen->DrawCombo(2, Ghost_X, Ghost_Y-8, Combo, 2, 3, this->CSet, -1, -1, Ghost_X, Ghost_Y-8, Angle, -1, 0, true, 128); Angle+=Gravity*50; Jump = Max(Jump-Gravity, -TerminalVelocity); Ghost_Y-=Jump; Points_Waitframe(this, ghost, 3); } Ghost_HP = -1000; Ghost_Waitframe(this, ghost, true, true); } } ffc script Medusa_Head{ void run(int enemyid){ npc ghost = Ghost_InitAutoGhost(this, enemyid); int initY = Ghost_Y; Ghost_SetFlag(GHF_MOVE_OFFSCREEN); Ghost_Transform(this, ghost, -1, -1, 1, 1); int Counter = 0; while(Ghost_X>-16){ Counter+=4; Counter++; Ghost_X-=2; Ghost_Y = initY+24*Sin(Counter); Points_Waitframe(this, ghost, 2); } Ghost_HP = -1000; Ghost_Waitframe(this, ghost, true, true); } } ffc script Starship{ void run(int enemyid){ npc ghost = Ghost_InitAutoGhost(this, enemyid); Ghost_SetFlag(GHF_MOVE_OFFSCREEN); int Combo = ghost->Attributes[10]; Ghost_Transform(this, ghost, -1, -1, 1, 1); while(Ghost_X>-16){ if(Abs(Ghost_Y-Link->Y)<4){ Ghost_MoveAtAngle(180, 3, 0); Ghost_Data = Combo; } else if(Ghost_Y>Link->Y){ Ghost_MoveAtAngle(-135, 1, 0); Ghost_Data = Combo+1; } else if(Ghost_YY){ Ghost_MoveAtAngle(135, 1, 0); Ghost_Data = Combo+2; } Points_Waitframe(this, ghost, 1); } Ghost_HP = -1000; Ghost_Waitframe(this, ghost, true, true); } } const int CMB_BIRDO_CARPET = 898; const int SPR_BIRDO_EGG = 90; const int SPR_BIRDO_FIRE = 91; ffc script Birdo{ void Birdo_Waitframe(ffc this, npc ghost, int Points, bool DrawCarpet){ if(DrawCarpet)Screen->DrawCombo(2, Ghost_X-8, Ghost_Y+24, CMB_BIRDO_CARPET, 2, 1, 8, -1, -1, 0, 0, 0, -1, 0, true, 128); if(!Ghost_Waitframe(this, ghost, false, false)){ Score+=Points; ghost->HP = 1; Ghost_HP = 1; ghost->CollDetection = false; Ghost_Data = ghost->Attributes[10]+2; int Jump = 3; int Counter = 0; while(Ghost_Y<176){ Counter++; if(Counter%3==0){ lweapon l = CreateLWeaponAt(LW_SCRIPT10, Ghost_X+Rand(-8, 8), Ghost_Y+Rand(-8, 8)); l->UseSprite(23); l->CollDetection = false; l->DeadState = l->NumFrames*l->ASpeed; } Jump = Max(Jump-0.16, -3.2); Ghost_X--; Ghost_Y-=Jump; Ghost_Waitframe(this, ghost, true, true); } for(int i=0; i<180; i++){ if(i%5==0){ eweapon e = FireEWeapon(EW_SCRIPT10, Ghost_X, 160, DegtoRad(-90+Rand(-30, 30)), Rand(200, 400), ghost->WeaponDamage, SPR_BIRDO_FIRE, 0, EWF_UNBLOCKABLE); SetEWeaponMovement(e, EWM_VEER, DIR_DOWN, Gravity); } Ghost_Waitframe(this, ghost, true, true); } for(int i=0; i<120; i++){ Ghost_Waitframe(this, ghost, true, true); } Screen->D[0] = 2; this->Data = GH_INVISIBLE_COMBO; Ghost_Data = GH_INVISIBLE_COMBO; Ghost_ClearCombos(); Quit(); } } void run(int enemyid){ npc ghost = Ghost_InitAutoGhost(this, enemyid); Ghost_SetFlag(GHF_MOVE_OFFSCREEN); int Combo = ghost->Attributes[10]; Ghost_Transform(this, ghost, Combo, ghost->CSet, 1, 2); int InitHP = Ghost_HP; while(Ghost_HP>InitHP/2){ Ghost_X = 224; Ghost_Y = 176; Ghost_Data = Combo; int Jump = Rand(5, 7); int Step = Rand(0, 4)/2; while(Jump>0){ Jump = Max(Jump-0.16, -3.2); Ghost_X = Max(-16, Ghost_X-Step); Ghost_Y-=Jump; Birdo_Waitframe(this, ghost, 20, false); } Ghost_Data = Combo+1; int Attack = Choose(0, 0, 1); if(Attack==0){ for(int i=-2; i<=2; i++){ eweapon e = FireEWeapon(EW_SCRIPT10, Ghost_X, Ghost_Y, DegtoRad(180+30*i), 300, ghost->WeaponDamage, SPR_BIRDO_EGG, 0, EWF_UNBLOCKABLE); } } else if(Attack==1){ for(int i=0; i<3; i++){ eweapon e = FireEWeapon(EW_SCRIPT10, Ghost_X, Ghost_Y, DegtoRad(-90-30*i), 450, ghost->WeaponDamage, SPR_BIRDO_FIRE, 0, EWF_UNBLOCKABLE); SetEWeaponMovement(e, EWM_VEER, DIR_DOWN, Gravity); } } while(Ghost_Y<176){ Jump = Max(Jump-0.16, -3.2); Ghost_X = Max(-16, Ghost_X-Step); Ghost_Y-=Jump; Birdo_Waitframe(this, ghost, 20, false); } for(int i=0; i<30; i++){ Birdo_Waitframe(this, ghost, 20, false); } } int TargetX = Rand(128, 224); int TargetY = Rand(0, 128); while(true){ Ghost_MoveAtAngle(Angle(Ghost_X, Ghost_Y, TargetX, TargetY), 3, 0); if(Distance(Ghost_X, Ghost_Y, TargetX, TargetY)<4){ TargetX = Rand(128, 224); TargetY = Rand(0, 128); int Attack = Rand(0, 2); if(Attack==0){ int RotDir = Choose(-1, 1); for(int i=0; i<8; i++){ eweapon e = FireEWeapon(EW_SCRIPT10, Ghost_X, Ghost_Y, DegtoRad(180+80*RotDir-20*i*RotDir), 300, ghost->WeaponDamage, SPR_BIRDO_EGG, 0, EWF_UNBLOCKABLE); for(int j=0; j<4; j++){ Birdo_Waitframe(this, ghost, 20, true); } } } else if(Attack==1){ for(int i=0; i<10; i++){ if(Rand(0, 4)==0){ eweapon e = FireAimedEWeapon(EW_SCRIPT10, Ghost_X, Ghost_Y, 0, 400, ghost->WeaponDamage, SPR_BIRDO_EGG, 0, EWF_UNBLOCKABLE); } else{ eweapon e = FireEWeapon(EW_SCRIPT10, Ghost_X, Ghost_Y, DegtoRad(180+Rand(-60, 60)), 300, ghost->WeaponDamage, SPR_BIRDO_EGG, 0, EWF_UNBLOCKABLE); } for(int j=0; j<16; j++){ Birdo_Waitframe(this, ghost, 20, true); } } } else if(Attack==2){ for(int i=0; i<4; i++){ int BaseAngle = Rand(-30, 30); for(int j=-1; j<=1; j+=2){ eweapon e = FireAimedEWeapon(EW_SCRIPT10, Ghost_X, Ghost_Y, DegtoRad(BaseAngle+40*j), 400, ghost->WeaponDamage, SPR_BIRDO_FIRE, 0, EWF_UNBLOCKABLE); SetEWeaponMovement(e, EWM_HOMING, DegtoRad(1)); } for(int j=0; j<40; j++){ Birdo_Waitframe(this, ghost, 20, true); } } } } Birdo_Waitframe(this, ghost, 20, true); } } } ffc script Ache{ void run(int enemyid){ npc ghost = Ghost_InitAutoGhost(this, enemyid); Ghost_SetFlag(GHF_MOVE_OFFSCREEN); int X = Ghost_X; int Y = Ghost_Y; Ghost_Transform(this, ghost, -1, -1, 1, 1); Ghost_X = X; Ghost_Y = Y; int VY = Rand(5, 8); int VX = Rand(-2, -4); while(VY>0||Ghost_Y>-16){ VY = Max(VY-0.16, -3.2); Ghost_X+=VX; Ghost_Y+=VY; Points_Waitframe(this, ghost, 2); } Ghost_HP = -1000; Ghost_Waitframe(this, ghost, true, true); } } const int SPR_MOA_FIRE = 92; ffc script Moa{ void run(int enemyid){ npc ghost = Ghost_InitAutoGhost(this, enemyid); Ghost_SetFlag(GHF_MOVE_OFFSCREEN); int X = Ghost_X; int Y = Ghost_Y; int Combo = ghost->Attributes[10]; Ghost_Transform(this, ghost, -1, -1, 1, 1); Ghost_X = X; Ghost_Y = Y; int XCounter; int Counter; for(int i=0; i<64; i++){ Counter++; Ghost_X-=2; Ghost_Y = Y+16*Sin(Counter*4); if(Counter%30==0){ eweapon e = FireEWeapon(EW_SCRIPT10, Ghost_X, Ghost_Y, 0, 0, ghost->WeaponDamage, SPR_MOA_FIRE, 0, EWF_UNBLOCKABLE); SetEWeaponMovement(e, EWM_VEER, DIR_DOWN, 0.16); } Points_Waitframe(this, ghost, 3); } while(Ghost_X>-16){ Counter++; if(XCounter<360)XCounter++; int i = 2*Cos(XCounter); if(i>0)Ghost_Data = Combo; else if(i<0)Ghost_Data = Combo+1; Ghost_Y = Y+16*Sin(Counter*4); if(Counter<360){ Ghost_X-=i; } else{ Ghost_X-=2; } if(Counter%30==0){ eweapon e = FireEWeapon(EW_SCRIPT10, Ghost_X, Ghost_Y, 0, 0, ghost->WeaponDamage, SPR_MOA_FIRE, 0, EWF_UNBLOCKABLE); SetEWeaponMovement(e, EWM_VEER, DIR_DOWN, 0.16); } Points_Waitframe(this, ghost, 3); } Ghost_HP h s1_0P;h s _hPsh_sa_tPrhms(_hPsh sh_sP,ttWui,ftaue)t i , g}o t fr ec irteB;l o}n H l {f cvsir pu (anl on_miil) ondcrgnoitt=eGeoytdI{i A tpG ohtst i ,hese_yndt;u o hhss(_hesF an(mHi_)O E OGFoCtESNt;l g GhFsM_Vr_nFfSrR(Eh)s hGso,t-T,a-s,o2, 2); int Jump; while(Ghost_X>-32){ if(Rand(1, 10)==1||Ghost_Y>160){ Jump = JumpHeight; } Jump = Max(Jump-Gravity, -TerminalVelocity); Ghost_X-=Speed; Ghost_Y-=Jump; Points_Waitframe(this, ghost, 5); } Ghost_HP = -1000; Ghost_Waitframe(this, ghost, true, true); } } const int FFCS_STARS = 6; const int CMB_BIGSTAR = 888; ffc script Stars{ void run(){ int StarX[80]; int StarY[80]; int StarSpeed[80]; for(int i=0; i<80; i++){ StarX[i] = Rand(-8, 264); StarY[i] = Rand(0, 168); StarSpeed[i] = Rand(2, 4); } if(GameMode!=2)Waitframes(20); Screen->TriggerSecrets(); if(GameMode!=2)Waitframes(20); Screen->TriggerSecrets(); if(GameMode!=2)Waitframes(20); Screen->TriggerSecrets(); if(GameMode!=2)Waitframes(20); Screen->TriggerSecrets(); while(true){ for(int i=0; i<80; i++){ StarX[i]-=StarSpeed[i]; if(StarX[i]<=-8){ StarX[i] = 264; StarY[i] = Rand(0, 168); StarSpeed[i] = Rand(2, 4);  } Screen->PutPixel(1, StarX[i], StarY[i], 1, 0, 0, 0, 128); } Waitframe(); } } } ffc script LWeaponMovement{ void run(){ int Counter; while(true){ Counter+=5; if(Counter>=360)Counter-=360; for(int i=1; i<=Screen->NumLWeapons(); i++){ lweapon l = Screen->LoadLWeapon(i); if(l->ID==LW_SCRIPT3){ l->Misc[15] = Max(l->Misc[15]-Gravity, -TErminalVelocity); l->Y-=l->Misc[15]; Screen->DrawTile(2, l->X, l->Y, TIL_BANANA, 1, 1, 8, -1, -1, l->X, l->Y, Counter, 0, true, 128); } } Waitframe(); } } } ffc script Cheats{ { {o{d{r{n{){ { {W{i{f a ev)i uS(r{e - Da0t r m;( ; c rc e n0> [ ] =}2