![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Stores and represents the current state of a battle. This is the base class for local and remote battle states and provides the data storage as well as the local command queue resolution. More...
#include <BattleState.hpp>
Public Member Functions | |
BattleState (Stage initialState) | |
Creates a new BattleState. More... | |
void | beginRound (bool playerIsFirst) |
Begins the next round of turns and sets the battler order. More... | |
Stage | nextTurn () |
Moves on to the next battler's turn. Returns the stage to transition to. More... | |
bool | isFirstMover () const |
Returns whether the current mover is the first peoplemon to go this round. More... | |
Battler & | localPlayer () |
Returns the local player Battler. More... | |
Battler & | enemy () |
Returns the opponent Battler. More... | |
Battler & | activeBattler () |
Returns the battler that is current resolving their turn. More... | |
Battler & | inactiveBattler () |
Returns the battler who is currently not resolving their turn. More... | |
Battler & | hostBattler () |
Returns the battler that is the host. More... | |
Battler & | nonHostBattler () |
Returns the battler who is not the host. More... | |
Stage | currentStage () const |
Returns the current stage the battle is in. More... | |
void | setStage (Stage stage) |
Sets the current stage of the battle. More... | |
Stores and represents the current state of a battle. This is the base class for local and remote battle states and provides the data storage as well as the local command queue resolution.
Definition at line 18 of file BattleState.hpp.
|
strong |
Represents all possible states in a battle.
Definition at line 24 of file BattleState.hpp.
core::battle::BattleState::BattleState | ( | Stage | initialState | ) |
Creates a new BattleState.
initialState | The initial stage to start with. Must be an intro stage |
Definition at line 7 of file BattleState.cpp.
Battler & core::battle::BattleState::activeBattler | ( | ) |
Returns the battler that is current resolving their turn.
Definition at line 30 of file BattleState.cpp.
void core::battle::BattleState::beginRound | ( | bool | playerIsFirst | ) |
Begins the next round of turns and sets the battler order.
playerIsFirst | True if the local player goes first |
Definition at line 14 of file BattleState.cpp.
BattleState::Stage core::battle::BattleState::currentStage | ( | ) | const |
Returns the current stage the battle is in.
Definition at line 42 of file BattleState.cpp.
Battler & core::battle::BattleState::enemy | ( | ) |
Returns the opponent Battler.
Definition at line 28 of file BattleState.cpp.
Battler & core::battle::BattleState::hostBattler | ( | ) |
Returns the battler that is the host.
Definition at line 38 of file BattleState.cpp.
Battler & core::battle::BattleState::inactiveBattler | ( | ) |
Returns the battler who is currently not resolving their turn.
Definition at line 34 of file BattleState.cpp.
bool core::battle::BattleState::isFirstMover | ( | ) | const |
Returns whether the current mover is the first peoplemon to go this round.
Definition at line 46 of file BattleState.cpp.
Battler & core::battle::BattleState::localPlayer | ( | ) |
Returns the local player Battler.
Definition at line 26 of file BattleState.cpp.
BattleState::Stage core::battle::BattleState::nextTurn | ( | ) |
Moves on to the next battler's turn. Returns the stage to transition to.
Definition at line 21 of file BattleState.cpp.
Battler & core::battle::BattleState::nonHostBattler | ( | ) |
Returns the battler who is not the host.
Definition at line 40 of file BattleState.cpp.
void core::battle::BattleState::setStage | ( | Stage | stage | ) |
Sets the current stage of the battle.
stage | The new battle stage |
Definition at line 44 of file BattleState.cpp.