diff --git a/A.A.png b/A.A.png new file mode 100644 index 0000000..ef52948 Binary files /dev/null and b/A.A.png differ diff --git a/SeasonsOfLoneliness.cpp b/SeasonsOfLoneliness.cpp index 969d3d0..a0ad800 100644 --- a/SeasonsOfLoneliness.cpp +++ b/SeasonsOfLoneliness.cpp @@ -406,6 +406,14 @@ namespace effect { }; }; +class PlayerState{ + public: + int playerHP,playerMaxHP; + int foodCount; + std::vector weatherPowerCounts; + float x,y; +}; + class SeasonsOfLoneliness : public PixelGameEngine { public: @@ -616,6 +624,8 @@ public: float audioLevel=0.6; int SEED_COUNT=0; vf2d BATTLE_PLAYER_COORDS; + PlayerState*PREV_PLAYERSTATE=new PlayerState(); + int WALK_STEPS=0; Map*CURRENT_MAP=MAP_1; @@ -924,6 +934,10 @@ public: BASE_OBJECTS["NADO"]=new ObjectLoadInfo(NADO_DECAL,NADO_ANIMATION,Pixel(153, 137, 75,230)); BASE_OBJECTS["SILICON_PIECE"]=new ObjectLoadInfo(SILICON_ROCK_DECAL); + for (int i=0;iweatherPowerCounts.push_back(WEATHER_POWERS[i]->playerOwnCount); + } + Zone*SILICON_DEPOSIT_ZONE = new Zone({109,7},{26,9},{0,0},{WIDTH,HEIGHT},{0,0},{WIDTH,HEIGHT},{1,1},{3,3},{-30,-3},{30,3},Pixel(133, 98, 66,180),Pixel(220, 120, 90,230),300,Pixel(87, 78, 69,64)); ZONES.push_back(SILICON_DEPOSIT_ZONE); @@ -1226,12 +1240,14 @@ public: LoadMap(MAP_3); PLAYER_COORDS[0]=40.5; PLAYER_COORDS[1]=37.5; + updatePlayerState(); fadeIn(); EndCutscene(); } else { LoadMap(MAP_1); PLAYER_COORDS[0]=40.5; PLAYER_COORDS[1]=37.5; + updatePlayerState(); fadeIn(); EndCutscene(); } @@ -1253,6 +1269,7 @@ public: } LoadMap(MAP_2); TeleportToMapFileCoords(8,17); + updatePlayerState(); fadeIn(); EndCutscene(); if (GAME_FLAGS[gameflag::REST_IN_DOME]&&!GAME_FLAGS[gameflag::SLEEP]) { @@ -1331,6 +1348,7 @@ public: LoadMap(MAP_2); PLAYER_COORDS[0]=16; PLAYER_COORDS[1]=6; + updatePlayerState(); }break; case cutscene::RAINING_IN_DOME:{ applyPixelEffect(HURRICANE,GetMapFileCoords(7,11),1); @@ -2388,8 +2406,9 @@ public: StartCutscene(cutscene::CHECK_COORDS); CUTSCENE_OBJS[0]=CreateObject({PLAYER_COORDS[0],PLAYER_COORDS[1]},PLAYER_DECAL,playerAnim,true); } - if(rand()%60==0) { + if(WALK_STEPS++>60&&!IN_BATTLE_ENCOUNTER) { PLAYER_HP=std::clamp(PLAYER_HP+1,0,PLAYER_MAXHP); + updatePlayerState(); } } @@ -3327,6 +3346,17 @@ public: BATTLE_DISPLAY_NUMBERS.push_back(number); return number; } + + void updatePlayerState() { + PREV_PLAYERSTATE->x=PLAYER_COORDS[0]; + PREV_PLAYERSTATE->y=PLAYER_COORDS[1]; + PREV_PLAYERSTATE->foodCount=foodCount; + PREV_PLAYERSTATE->playerHP=PLAYER_HP; + PREV_PLAYERSTATE->playerMaxHP=PLAYER_MAXHP; + for (int i=0;iweatherPowerCounts[i]=WEATHER_POWERS[i]->playerOwnCount; + } + } }; diff --git a/Y.Y.png b/Y.Y.png new file mode 100644 index 0000000..379000d Binary files /dev/null and b/Y.Y.png differ diff --git a/data.h b/data.h index 9f57e9c..55b6fe6 100644 --- a/data.h +++ b/data.h @@ -121,6 +121,15 @@ Well that was simpl-... Eh?)",//29 R"( $PLAYER Worms? Don't think they're here to play either.)",//30 +R"( +$PLAYER +Alright! Another one done. Oh! It's responding!)",//31 +R"( +R.O.V.E.R. 2001 +SIGNS INDICATE TRACES OF SILICON LOCATION ::: NORTHEAST)",//32 +R"( +$PLAYER +Hopefully no more ambushes... (Or maybe I'll just jinx myself.))",//33 };