Added Energy Ball for no attack purposes

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent 153b5f3c44
commit b5a5228690
  1. 91
      SeasonsOfLoneliness.cpp
  2. BIN
      Seasons_of_Loneliness
  3. BIN
      assets/energyball.png

@ -24,7 +24,7 @@ using namespace olc;
#define STARTING_MAP MAP_1 #define STARTING_MAP MAP_1
#define STARTING_STATE CUTSCENE_3 #define STARTING_STATE CUTSCENE_3
#define MOVE_SPD 0.2 #define MOVE_SPD 0.075
#define PLAYER_X 14 #define PLAYER_X 14
#define PLAYER_Y 4 #define PLAYER_Y 4
@ -553,6 +553,7 @@ public:
Animation*POWER_SUNNYDAY_ANIMATION=new Animation(); Animation*POWER_SUNNYDAY_ANIMATION=new Animation();
Animation*POWER_FIRESTORM_ANIMATION=new Animation(); Animation*POWER_FIRESTORM_ANIMATION=new Animation();
Animation*POWER_SOLARFLARE_ANIMATION=new Animation(); Animation*POWER_SOLARFLARE_ANIMATION=new Animation();
Animation*POWER_ENERGYBALL_ANIMATION=new Animation();
ParticleEffect*HAILSTORM_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{0,0},{WIDTH,HEIGHT},{1,1},{4,4},{-2,0.5},{-0.5,2},Pixel(143, 242, 255,255),Pixel(255,255,255,255),300,Pixel(220, 226, 227,0)); ParticleEffect*HAILSTORM_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{0,0},{WIDTH,HEIGHT},{1,1},{4,4},{-2,0.5},{-0.5,2},Pixel(143, 242, 255,255),Pixel(255,255,255,255),300,Pixel(220, 226, 227,0));
ParticleEffect*HURRICANE_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{0,0},{WIDTH,HEIGHT},{1,1},{2,2},{-4,1},{-1,4},Pixel(225, 248, 252,64),Pixel(255,255,255,128),300,Pixel(220, 226, 227,0)); ParticleEffect*HURRICANE_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{0,0},{WIDTH,HEIGHT},{1,1},{2,2},{-4,1},{-1,4},Pixel(225, 248, 252,64),Pixel(255,255,255,128),300,Pixel(220, 226, 227,0));
ParticleEffect*METEOR_RAIN_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{0,0},{WIDTH,HEIGHT},{3,3},{6,6},{-1,0.2},{-0.2,1},Pixel(46, 31, 31,255),Pixel(43, 31, 46,255),50,Pixel(30, 10, 36,0)); ParticleEffect*METEOR_RAIN_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{0,0},{WIDTH,HEIGHT},{3,3},{6,6},{-1,0.2},{-0.2,1},Pixel(46, 31, 31,255),Pixel(43, 31, 46,255),50,Pixel(30, 10, 36,0));
@ -585,6 +586,7 @@ public:
ParticleEffect*MEGAFANG_EFF = new ParticleEffect({0,0},{64,64},{0,0},{64,64},{1,1},{3,3},{-5,-5},{5,5},Pixel(255,255,255,200),Pixel(255,255,255,210),40,Pixel(70, 158, 62,0)); ParticleEffect*MEGAFANG_EFF = new ParticleEffect({0,0},{64,64},{0,0},{64,64},{1,1},{3,3},{-5,-5},{5,5},Pixel(255,255,255,200),Pixel(255,255,255,210),40,Pixel(70, 158, 62,0));
ParticleEffect*END_OF_THE_CENTURY_BEAM_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{WIDTH,HEIGHT},{64,64},{8,8},{20,20},{-4,10},{4,35},Pixel(0,0,0,75),Pixel(255,255,255,210),120,Pixel(255, 255, 255,96)); ParticleEffect*END_OF_THE_CENTURY_BEAM_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{WIDTH,HEIGHT},{64,64},{8,8},{20,20},{-4,10},{4,35},Pixel(0,0,0,75),Pixel(255,255,255,210),120,Pixel(255, 255, 255,96));
ParticleEffect*RADIOACTIVE_TRANSMISSION_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{WIDTH,HEIGHT},{64,64},{5,5},{10,10},{0,0},{0,0},Pixel(70, 189, 23,196),Pixel(189, 189, 23,210),250,Pixel(0,255,0,128)); ParticleEffect*RADIOACTIVE_TRANSMISSION_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{WIDTH,HEIGHT},{64,64},{5,5},{10,10},{0,0},{0,0},Pixel(70, 189, 23,196),Pixel(189, 189, 23,210),250,Pixel(0,255,0,128));
ParticleEffect*ENERGY_BALL_EFF = new ParticleEffect({0,0},{64,64},{0,0},{64,64},{5,5},{10,10},{0,0},{0,0},Pixel(70, 189, 23,75),Pixel(189, 189, 23,150),100,Pixel(0,255,0,0));
WEATHER_POWER*HAILSTORM = new WEATHER_POWER("Hailstorm","Causes a flurry of hard cold rocks to be unleashed in target area. 60+1d30",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,60,30,160,Pixel(72, 160, 212,255),Pixel(93, 161, 163,255),120,HAILSTORM_EFF,&SOUND_WEATHERLIGHT); WEATHER_POWER*HAILSTORM = new WEATHER_POWER("Hailstorm","Causes a flurry of hard cold rocks to be unleashed in target area. 60+1d30",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,60,30,160,Pixel(72, 160, 212,255),Pixel(93, 161, 163,255),120,HAILSTORM_EFF,&SOUND_WEATHERLIGHT);
WEATHER_POWER*HURRICANE = new WEATHER_POWER("Hurricane","Causes heavy winds, scattering seeds, heavy rain. 20+1d10",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,20,10,200,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,HURRICANE_EFF,&SOUND_WEATHERHEAVY); WEATHER_POWER*HURRICANE = new WEATHER_POWER("Hurricane","Causes heavy winds, scattering seeds, heavy rain. 20+1d10",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,20,10,200,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,HURRICANE_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*METEOR_RAIN = new WEATHER_POWER("Meteor Rain","Causes fiery space rocks to fall on target area. 50+1d50",POWER_METEOR_SHOWER_ANIMATION,POWER_METEOR_SHOWER_ANIMATION,50,50,96,Pixel(96, 86, 153,255),Pixel(170, 103, 201,255),120,METEOR_STORM_EFF,&SOUND_WEATHERHEAVY); WEATHER_POWER*METEOR_RAIN = new WEATHER_POWER("Meteor Rain","Causes fiery space rocks to fall on target area. 50+1d50",POWER_METEOR_SHOWER_ANIMATION,POWER_METEOR_SHOWER_ANIMATION,50,50,96,Pixel(96, 86, 153,255),Pixel(170, 103, 201,255),120,METEOR_STORM_EFF,&SOUND_WEATHERHEAVY);
@ -618,11 +620,12 @@ public:
WEATHER_POWER*MEGA_FANG = new WEATHER_POWER("Mega Fang","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,MEGAFANG_EFF,&SOUND_EXPLODE); WEATHER_POWER*MEGA_FANG = new WEATHER_POWER("Mega Fang","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,MEGAFANG_EFF,&SOUND_EXPLODE);
WEATHER_POWER*END_OF_THE_CENTURY_BEAM = new WEATHER_POWER("End of the Century Beam","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),160,END_OF_THE_CENTURY_BEAM_EFF,&SOUND_EXPLODE); WEATHER_POWER*END_OF_THE_CENTURY_BEAM = new WEATHER_POWER("End of the Century Beam","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),160,END_OF_THE_CENTURY_BEAM_EFF,&SOUND_EXPLODE);
WEATHER_POWER*RADIOACTIVE_TRANSMISSION = new WEATHER_POWER("Radioactive Transmission","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),160,RADIOACTIVE_TRANSMISSION_EFF,&SOUND_SONAR); WEATHER_POWER*RADIOACTIVE_TRANSMISSION = new WEATHER_POWER("Radioactive Transmission","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),160,RADIOACTIVE_TRANSMISSION_EFF,&SOUND_SONAR);
WEATHER_POWER*ENERGY_BALL = new WEATHER_POWER("Energy Ball","Your last resort. A jolt of power. 20+1d10",POWER_ENERGYBALL_ANIMATION,POWER_ENERGYBALL_ANIMATION,20,10,64,Pixel(102, 156, 81,255),Pixel(26, 120, 42,255),120,RADIOACTIVE_TRANSMISSION_EFF,&SOUND_MSG,0.8);
bool IN_BATTLE_ENCOUNTER = false; bool IN_BATTLE_ENCOUNTER = false;
int BATTLE_ENTRY_TIMER = 0; int BATTLE_ENTRY_TIMER = 0;
int EFFECT_TIMER = 0; int EFFECT_TIMER = 0;
#define WEATHER_POWER_COUNT 12 //Number of powers that are in the game. Update storage array accordingly. #define WEATHER_POWER_COUNT 13 //Number of powers that are in the game. Update storage array accordingly.
WEATHER_POWER*WEATHER_POWERS[WEATHER_POWER_COUNT] = { WEATHER_POWER*WEATHER_POWERS[WEATHER_POWER_COUNT] = {
HAILSTORM, HAILSTORM,
PETAL_STORM, PETAL_STORM,
@ -635,7 +638,8 @@ public:
FIRESTORM, FIRESTORM,
SOLAR_FLARE, SOLAR_FLARE,
CONSUME_SNACK, CONSUME_SNACK,
CONSUME_MEAL}; CONSUME_MEAL,
ENERGY_BALL};
battle::BATTLESTATE BATTLE_STATE=battle::NONE; battle::BATTLESTATE BATTLE_STATE=battle::NONE;
std::vector<WEATHER_POWER*> availablePowers; std::vector<WEATHER_POWER*> availablePowers;
WEATHER_POWER*BATTLE_CARD_SELECTION=HAILSTORM; WEATHER_POWER*BATTLE_CARD_SELECTION=HAILSTORM;
@ -696,7 +700,7 @@ public:
*SANDWORM_DECAL,*SNAKE_DECAL,*MOTH_DECAL,*FLASH_FLOOD_DECAL,*SUNNY_DAY_DECAL,*FIRESTORM_DECAL,*SOLARFLARE_DECAL, *SANDWORM_DECAL,*SNAKE_DECAL,*MOTH_DECAL,*FLASH_FLOOD_DECAL,*SUNNY_DAY_DECAL,*FIRESTORM_DECAL,*SOLARFLARE_DECAL,
*HP_REGEN_DECAL,*SLOWED_DECAL, *SPEED_DECAL,*HIDDEN_DECAL,*BOOK_DECAL,*BOOK2_DECAL, *HP_REGEN_DECAL,*SLOWED_DECAL, *SPEED_DECAL,*HIDDEN_DECAL,*BOOK_DECAL,*BOOK2_DECAL,
*LAUNCHPAD_CLOSED_DECAL,*LAUNCHPAD_HALF1_DECAL,*LAUNCHPAD_HALF2_DECAL,*LAUNCHPAD_DECAL,*Y_Y_DECAL, *LAUNCHPAD_CLOSED_DECAL,*LAUNCHPAD_HALF1_DECAL,*LAUNCHPAD_HALF2_DECAL,*LAUNCHPAD_DECAL,*Y_Y_DECAL,
*PETRIFY_DECAL,*A_A_DECAL,*A_A_RECHARGE_DECAL; *PETRIFY_DECAL,*A_A_DECAL,*A_A_RECHARGE_DECAL, *ENERGYBALL_DECAL;
std::map<std::string,ObjectLoadInfo*> BASE_OBJECTS; std::map<std::string,ObjectLoadInfo*> BASE_OBJECTS;
std::vector<Encounter> ENCOUNTERS; std::vector<Encounter> ENCOUNTERS;
Encounter ENCOUNTER_SPIDEY_1; Encounter ENCOUNTER_SPIDEY_1;
@ -880,6 +884,7 @@ public:
PETRIFY_DECAL=new Decal(new Sprite("assets/petrify.png")); PETRIFY_DECAL=new Decal(new Sprite("assets/petrify.png"));
A_A_DECAL=new Decal(new Sprite("assets/A.A.png")); A_A_DECAL=new Decal(new Sprite("assets/A.A.png"));
A_A_RECHARGE_DECAL=new Decal(new Sprite("assets/A.A_recharge.png")); A_A_RECHARGE_DECAL=new Decal(new Sprite("assets/A.A_recharge.png"));
ENERGYBALL_DECAL=new Decal(new Sprite("assets/energyball.png"));
playerAnim->spr=PLAYER_DECAL; playerAnim->spr=PLAYER_DECAL;
playerAnimRight->spr=PLAYER_DECAL; playerAnimRight->spr=PLAYER_DECAL;
@ -995,10 +1000,16 @@ public:
POWER_SOLARFLARE_ANIMATION->frames.push_back({i*32,0}); POWER_SOLARFLARE_ANIMATION->frames.push_back({i*32,0});
} }
POWER_SOLARFLARE_ANIMATION->skip_frames=nodeAnimationSkipFrames; POWER_SOLARFLARE_ANIMATION->skip_frames=nodeAnimationSkipFrames;
POWER_ENERGYBALL_ANIMATION->spr=ENERGYBALL_DECAL;
for (int i=0;i<3;i++) {
POWER_ENERGYBALL_ANIMATION->frames.push_back({i*32,0});
}
POWER_ENERGYBALL_ANIMATION->skip_frames=nodeAnimationSkipFrames;
HAILSTORM->playerOwnCount=3; HAILSTORM->playerOwnCount=5;
HURRICANE->playerOwnCount=1; HURRICANE->playerOwnCount=1;
METEOR_RAIN->playerOwnCount=5; METEOR_RAIN->playerOwnCount=3;
ENERGY_BALL->playerOwnCount=99;
if (SKIP_LAUNCHPAD) { if (SKIP_LAUNCHPAD) {
GAME_STATE=IN_SPACE; GAME_STATE=IN_SPACE;
@ -1136,60 +1147,60 @@ public:
COLLECTED_ITEMS.push_back({19,5}); COLLECTED_ITEMS.push_back({19,5});
COLLECTED_ITEMS.push_back({19,6}); COLLECTED_ITEMS.push_back({19,6});
ENCOUNTER_SPIDEY_1.entities.push_back(new Entity(SPIDEY_DECAL,"Spidey",2,3,1,1,MOVESET_SPIDEY)); ENCOUNTER_SPIDEY_1.entities.push_back(new Entity(SPIDEY_DECAL,"Spidey",2,3,80,80,MOVESET_SPIDEY));
ENCOUNTER_SPIDEY_1.entities.push_back(new Entity(SPIDEY_DECAL,"Spidey",4,4,1,1,MOVESET_SPIDEY)); ENCOUNTER_SPIDEY_1.entities.push_back(new Entity(SPIDEY_DECAL,"Spidey",4,4,80,80,MOVESET_SPIDEY));
ENCOUNTER_SPIDEY_1.entities.push_back(new Entity(SPIDEY_DECAL,"Spidey",6,2,1,1,MOVESET_SPIDEY)); ENCOUNTER_SPIDEY_1.entities.push_back(new Entity(SPIDEY_DECAL,"Spidey",6,2,80,80,MOVESET_SPIDEY));
ENCOUNTER_SPIDEY_1.x=79; ENCOUNTER_SPIDEY_1.x=79;
ENCOUNTER_SPIDEY_1.y=47; ENCOUNTER_SPIDEY_1.y=47;
ENCOUNTER_SPIDEY_1.playerX=4; ENCOUNTER_SPIDEY_1.playerX=4;
ENCOUNTER_SPIDEY_1.playerY=3; ENCOUNTER_SPIDEY_1.playerY=3;
ENCOUNTER_SPIDEY_1.map=MAP_1; ENCOUNTER_SPIDEY_1.map=MAP_1;
ENCOUNTERS.push_back(ENCOUNTER_SPIDEY_1); ENCOUNTERS.push_back(ENCOUNTER_SPIDEY_1);
ENCOUNTER_X_X.entities.push_back(new Entity(X_X_DECAL,"X_X",3,2.5,1,1,MOVESET_X_X,{2,2},true)); ENCOUNTER_X_X.entities.push_back(new Entity(X_X_DECAL,"X_X",3,2.5,590,590,MOVESET_X_X,{2,2},true));
ENCOUNTER_X_X.entities.push_back(new Entity(X_X_DECAL,"X Minion",1,4,1,1,MOVESET_XMINION,{0.7,0.7})); ENCOUNTER_X_X.entities.push_back(new Entity(X_X_DECAL,"X Minion",1,4,0,80,MOVESET_XMINION,{0.7,0.7}));
ENCOUNTER_X_X.entities.push_back(new Entity(X_X_DECAL,"X Minion",0,2,1,1,MOVESET_XMINION,{0.7,0.7})); ENCOUNTER_X_X.entities.push_back(new Entity(X_X_DECAL,"X Minion",0,2,0,80,MOVESET_XMINION,{0.7,0.7}));
ENCOUNTER_X_X.entities.push_back(new Entity(X_X_DECAL,"X Minion",4,2,1,1,MOVESET_XMINION,{0.7,0.7})); ENCOUNTER_X_X.entities.push_back(new Entity(X_X_DECAL,"X Minion",4,2,0,80,MOVESET_XMINION,{0.7,0.7}));
ENCOUNTER_X_X.x=38; ENCOUNTER_X_X.x=38;
ENCOUNTER_X_X.y=35; ENCOUNTER_X_X.y=35;
ENCOUNTER_X_X.playerX=3; ENCOUNTER_X_X.playerX=3;
ENCOUNTER_X_X.playerY=2; ENCOUNTER_X_X.playerY=2;
ENCOUNTER_X_X.map=MAP_1; ENCOUNTER_X_X.map=MAP_1;
ENCOUNTER_SANDWORM_1.entities.push_back(new Entity(SANDWORM_DECAL,"Sandworm",3,4,1,1,MOVESET_SANDWORM)); ENCOUNTER_SANDWORM_1.entities.push_back(new Entity(SANDWORM_DECAL,"Sandworm",3,4,165,165,MOVESET_SANDWORM));
ENCOUNTER_SANDWORM_1.entities.push_back(new Entity(SANDWORM_DECAL,"Sandworm",6,3,1,1,MOVESET_SANDWORM)); ENCOUNTER_SANDWORM_1.entities.push_back(new Entity(SANDWORM_DECAL,"Sandworm",6,3,165,165,MOVESET_SANDWORM));
ENCOUNTER_SANDWORM_1.x=20-4; ENCOUNTER_SANDWORM_1.x=20-4;
ENCOUNTER_SANDWORM_1.y=73-3.5; ENCOUNTER_SANDWORM_1.y=73-3.5;
ENCOUNTER_SANDWORM_1.playerX=4; ENCOUNTER_SANDWORM_1.playerX=4;
ENCOUNTER_SANDWORM_1.playerY=3.5; ENCOUNTER_SANDWORM_1.playerY=3.5;
ENCOUNTER_SANDWORM_1.map=MAP_3; ENCOUNTER_SANDWORM_1.map=MAP_3;
//ENCOUNTERS.push_back(ENCOUNTER_X_X); //Activate at beginning of Chapter 2. //ENCOUNTERS.push_back(ENCOUNTER_X_X); //Activate at beginning of Chapter 2.
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Megamoth",3.5,1.75,1,1,MOVESET_MEGAMOTH,{2,2},true)); ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Megamoth",3.5,1.75,745,745,MOVESET_MEGAMOTH,{2,2},true));
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",2,1,1,1,MOVESET_MOTH)); ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",2,1,0,120,MOVESET_MOTH));
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",6,1,1,1,MOVESET_MOTH)); ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",6,1,0,120,MOVESET_MOTH));
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",4,4,1,1,MOVESET_MOTH)); ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",4,4,0,120,MOVESET_MOTH));
ENCOUNTER_MEGAMOTH.x=195-4; ENCOUNTER_MEGAMOTH.x=195-4;
ENCOUNTER_MEGAMOTH.y=56-3.5; ENCOUNTER_MEGAMOTH.y=56-3.5;
ENCOUNTER_MEGAMOTH.playerX=4; ENCOUNTER_MEGAMOTH.playerX=4;
ENCOUNTER_MEGAMOTH.playerY=0.5; ENCOUNTER_MEGAMOTH.playerY=0.5;
ENCOUNTER_MEGAMOTH.map=MAP_4; ENCOUNTER_MEGAMOTH.map=MAP_4;
ENCOUNTERS.push_back(ENCOUNTER_MEGAMOTH); ENCOUNTERS.push_back(ENCOUNTER_MEGAMOTH);
ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Snake",1,1,1,1,MOVESET_SNAKE)); ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Snake",1,1,225,225,MOVESET_SNAKE));
ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Snake",3,2,1,1,MOVESET_SNAKE)); ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Snake",3,2,0,225,MOVESET_SNAKE));
ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Sidewinder",4,3,1,1,MOVESET_SIDEWINDER,{2,2},true)); ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Sidewinder",4,3,0,1065,MOVESET_SIDEWINDER,{2,2},true));
ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Snake",5,3,1,1,MOVESET_SNAKE)); ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Snake",5,3,225,225,MOVESET_SNAKE));
ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Snake",6,1,1,1,MOVESET_SNAKE)); ENCOUNTER_SNAKEPACK.entities.push_back(new Entity(SNAKE_DECAL,"Snake",6,1,0,225,MOVESET_SNAKE));
ENCOUNTER_SNAKEPACK.x=11-4; ENCOUNTER_SNAKEPACK.x=11-4;
ENCOUNTER_SNAKEPACK.y=5-3.5; ENCOUNTER_SNAKEPACK.y=5-3.5;
ENCOUNTER_SNAKEPACK.playerX=4; ENCOUNTER_SNAKEPACK.playerX=4;
ENCOUNTER_SNAKEPACK.playerY=6; ENCOUNTER_SNAKEPACK.playerY=6;
ENCOUNTER_SNAKEPACK.map=MAP_5; ENCOUNTER_SNAKEPACK.map=MAP_5;
ENCOUNTERS.push_back(ENCOUNTER_SNAKEPACK); ENCOUNTERS.push_back(ENCOUNTER_SNAKEPACK);
ENCOUNTER_Y_Y.entities.push_back(new Entity(Y_Y_DECAL,"Y.Y",4-1,3.5-2,1,1,MOVESET_Y_Y,{1,1},true)); ENCOUNTER_Y_Y.entities.push_back(new Entity(Y_Y_DECAL,"Y.Y",4-1,3.5-2,895,895,MOVESET_Y_Y,{1,1},true));
ENCOUNTER_Y_Y.x=1000-4; ENCOUNTER_Y_Y.x=1000-4;
ENCOUNTER_Y_Y.y=1000-3.5; ENCOUNTER_Y_Y.y=1000-3.5;
ENCOUNTER_Y_Y.playerX=4; ENCOUNTER_Y_Y.playerX=4;
ENCOUNTER_Y_Y.playerY=6; ENCOUNTER_Y_Y.playerY=6;
ENCOUNTER_Y_Y.map=MAP_6; ENCOUNTER_Y_Y.map=MAP_6;
ENCOUNTER_A_A.entities.push_back(new Entity(A_A_DECAL,"A.A",4-2,0,1,1,MOVESET_A_A,{2,2},true)); ENCOUNTER_A_A.entities.push_back(new Entity(A_A_DECAL,"A.A",4-2,0,4096,4096,MOVESET_A_A,{2,2},true));
ENCOUNTER_A_A.x=1000-4; ENCOUNTER_A_A.x=1000-4;
ENCOUNTER_A_A.y=1000-3.5; ENCOUNTER_A_A.y=1000-3.5;
ENCOUNTER_A_A.playerX=4; ENCOUNTER_A_A.playerX=4;
@ -1874,7 +1885,9 @@ public:
} }
void updateGame(){ void updateGame(){
frameCount++; if (GAME_STATE!=FIN&&GAME_STATE!=THANKS) {
frameCount++;
}
TIMER++; TIMER++;
if (CURRENT_CUTSCENE!=cutscene::NONE) { if (CURRENT_CUTSCENE!=cutscene::NONE) {
CUTSCENE_TIMER++; CUTSCENE_TIMER++;
@ -2147,7 +2160,7 @@ public:
BATTLE_ENTRY_TIMER=0; BATTLE_ENTRY_TIMER=0;
BATTLE_STATE=battle::WAITING_FOR_CAMERA; BATTLE_STATE=battle::WAITING_FOR_CAMERA;
for (int i=0;i<WEATHER_POWER_COUNT;i++) { for (int i=0;i<WEATHER_POWER_COUNT;i++) {
if (WEATHER_POWERS[i]->playerOwnCount>0) { if (WEATHER_POWERS[i]->playerOwnCount>0&&WEATHER_POWERS[i]!=ENERGY_BALL) {
availablePowers.push_back(WEATHER_POWERS[i]); availablePowers.push_back(WEATHER_POWERS[i]);
} }
} }
@ -2190,6 +2203,16 @@ public:
BATTLE_STATE = battle::PLAYER_SELECTION; BATTLE_STATE = battle::PLAYER_SELECTION;
clearPixelEffect(); clearPixelEffect();
EFFECT_TIMER = 0; EFFECT_TIMER = 0;
bool hasPower=false;
for (int i=0;i<availablePowers.size();i++) {
if (availablePowers[i]->playerOwnCount>0&&availablePowers[i]!=CONSUME_SNACK&&availablePowers[i]!=CONSUME_MEAL) {
hasPower=true;
break;
}
}
if (!hasPower) {
availablePowers.push_back(ENERGY_BALL);
}
} else { } else {
LOCKED_IN_DELAY++; LOCKED_IN_DELAY++;
} }
@ -2506,7 +2529,7 @@ public:
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastSlowVal=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed; CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastSlowVal=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed;
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastHiddenVal=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden; CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastHiddenVal=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden;
if (CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->name.compare("A.A")==0) { if (CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->name.compare("A.A")==0) {
if (CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->fixedTurnOrderInd==CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->moveSet.size()) { if (CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->fixedTurnOrderInd==0) {
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->spr=A_A_DECAL; CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->spr=A_A_DECAL;
} else { } else {
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->spr=A_A_RECHARGE_DECAL; CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->spr=A_A_RECHARGE_DECAL;
@ -2601,6 +2624,16 @@ public:
BATTLE_STATE=battle::PLAYER_SELECTION; BATTLE_STATE=battle::PLAYER_SELECTION;
PLAYER_SELECTED_TARGET=-1; PLAYER_SELECTED_TARGET=-1;
PETRIFY_TURNS=std::clamp(PETRIFY_TURNS-1,0,3); PETRIFY_TURNS=std::clamp(PETRIFY_TURNS-1,0,3);
bool hasPower=false;
for (int i=0;i<availablePowers.size();i++) {
if (availablePowers[i]->playerOwnCount>0&&availablePowers[i]!=CONSUME_SNACK&&availablePowers[i]!=CONSUME_MEAL) {
hasPower=true;
break;
}
}
if (!hasPower) {
availablePowers.push_back(ENERGY_BALL);
}
} }
} else { } else {
BATTLE_CURRENT_TURN_ENTITY=turnOrder.front(); BATTLE_CURRENT_TURN_ENTITY=turnOrder.front();

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Loading…
Cancel
Save