Peoplemon  0.1.0
Peoplemon 3 game source documentation
BattlerSubstate.hpp
Go to the documentation of this file.
1 #ifndef CORE_BATTLES_BATTLERSUBSTATE_HPP
2 #define CORE_BATTLES_BATTLERSUBSTATE_HPP
3 
9 #include <cstdint>
10 
11 namespace core
12 {
13 namespace battle
14 {
23  std::int8_t lastMoveIndex;
26  std::int16_t substituteHp;
27  std::uint8_t turnsGuarded;
28  std::int8_t chargingMove;
29  std::int8_t encoreMove;
30  std::uint8_t encoreTurnsLeft;
31  std::int8_t deathCounter;
33  bool ballBumped;
34  bool ballSet;
35  bool ballSpiked;
36  bool ballSwiped;
38  std::int8_t ballUpTurns;
41  std::uint8_t spikesOut;
42  std::int8_t healNext;
43  bool move64Hit;
44  std::int8_t copyStatsFrom;
46  std::int8_t turnsConfused;
47  std::int16_t koReviveHp;
49  std::uint16_t lastDamageTaken;
52  std::uint8_t turnsSticky;
55  std::int8_t totalMomIndex;
56  bool gotBaked;
57 
63 
69  void notifyTurnBegin();
70 
78  void notifyTurnEnd(TurnAction action, pplmn::BattlePeoplemon& outNow);
79 
84  void notifySwitch();
85 
92 
98 
105  bool hasAilment(pplmn::PassiveAilment ail) const;
106 };
107 } // namespace battle
108 } // namespace core
109 
110 #endif
PassiveAilment
Represents a passive ailment a Peoplemon can have.
MoveId
The id of a move.
Definition: MoveId.hpp:16
Core classes and functionality for both the editor and game.
TurnAction
Represents an action that a battler may take on their turn.
Definition: TurnAction.hpp:16
Struct containing state specific to each battler. These states facilitate logic that takes place over...
bool hasAilment(pplmn::PassiveAilment ail) const
Returns true if the peoplemon has the specific ailment.
void notifyTurnBegin()
Resets and updates part of the state that depend on turns elapsing.
void notifyTurnEnd(TurnAction action, pplmn::BattlePeoplemon &outNow)
Resets and updates part of the state that depend on turns elapsing.
void notifySwitch()
Updates state that is unique to the currently out Peoplemon.
void giveAilment(pplmn::PassiveAilment ail)
Gives the peoplemon a passive ailment.
component::Trainer * trainer
pplmn::PassiveAilment ailments
BattlerSubstate()
Construct a new Battler State object with proper defaults.
void clearAilment(pplmn::PassiveAilment ail)
Clear the given passive ailment.
Adding this to an entity will make it a trainer that can battle.
Definition: Trainer.hpp:18
Represents a Peoplemon in battle. Stores some extra state that only exists in battle....