Peoplemon  0.1.0
Peoplemon 3 game source documentation
State.cpp
Go to the documentation of this file.
1 #include <Core/Player/State.hpp>
2 
3 namespace core
4 {
5 namespace player
6 {
8 : name("ERROR")
9 , sex(Gender::Boy)
10 , monei(0)
11 , peopledex(*this)
12 , whiteoutMap("Hometown/HometownYourHouseYourRoom.map")
13 , whiteoutSpawn(5)
14 , repelSteps(0) {}
15 
17  for (auto& ppl : peoplemon) { ppl.heal(); }
18 }
19 
21  for (const auto& ppl : peoplemon) {
22  if (ppl.pendingEvolution()) return true;
23  }
24  return false;
25 }
26 
28  for (const auto& ppl : peoplemon) {
29  if (ppl.currentHp() > 0) { return true; }
30  }
31  return false;
32 }
33 
34 } // namespace player
35 } // namespace core
Gender
Possible genders for the player.
Definition: Gender.hpp:24
Core classes and functionality for both the editor and game.
bool hasLivingPeoplemon() const
Returns whether or not the player has any living peoplemon.
Definition: State.cpp:27
std::vector< pplmn::OwnedPeoplemon > peoplemon
Definition: State.hpp:46
State()
Initializes to default values.
Definition: State.cpp:7
void healPeoplemon()
Restores HP and removes all ailments.
Definition: State.cpp:16
bool evolutionPending() const
Returns whether or not any peoplemon have a pending evolution.
Definition: State.cpp:20