1 #ifndef CORE_BATTLES_LOCALBATTLECONTROLLER_HPP
2 #define CORE_BATTLES_LOCALBATTLECONTROLLER_HPP
42 bool currentStageInitialized;
43 bool finalEffectsApplied;
47 unsigned int xpAwardRemaining;
64 std::unordered_set<pplmn::BattlePeoplemon*> seenPeoplemon;
66 virtual void onCommandQueued(
const Command& cmd)
override;
67 virtual void onCommandProcessed(
const Command& cmd)
override;
68 virtual void onUpdate(
bool viewSynced,
bool queueEmpty)
override;
71 void initCurrentStage();
72 void checkCurrentStage(
bool viewSynced,
bool queueEmpty);
74 int getPriority(
Battler& battler);
77 void startUseMove(
Battler& user,
int index);
78 void checkAbilitiesAfterMove(
Battler& user);
79 void handleMoveEffect(
Battler& user);
85 bool isChargeSecondTurn);
93 bool playAnim =
true);
96 void handleBattlerTurnStart(
Battler& battler);
97 void handleBattlerRoundEnd(
Battler& battler);
99 bool canSwitch(
Battler& battler);
100 bool tryMidturnSwitch(
Battler& battler);
101 void startSwitch(
Battler& battler);
102 void doSwitch(
Battler& battler,
unsigned int newPP);
103 void postSwitch(
Battler& battler);
105 bool isFainter(
Battler& battler)
const;
106 void preFaint(
Battler& fainter);
108 void checkKlutz(
Battler& battler);
110 static bool teachThisTurn(
Battler& battler);
PassiveAilment
Represents a passive ailment a Peoplemon can have.
Stat
Represents a single stat. Used as an offset to access Stats as an array.
Ailment
Represents an ailment that a Peoplemon can have.
Type
Represents a type that a move or Peoplemon can be. Types may be combined.
MoveEffect
Represents an effect that a move can have. Copied verbatim from Peoplemon 2, may refactor later when ...
Core classes and functionality for both the editor and game.
Interface for battle controllers. Battle controllers manage the flow of state and interaction for bat...
Battle controller for local battles against peoplemon or trainers.
virtual ~LocalBattleController()=default
Destroy the Local Battle Controller.
void updateBattleState(bool viewSynced, bool queueEmpty)
Updates the battle state based on the previous state, view state, and queue state.
LocalBattleController()
Construct a new Local Battle Controller.
Base class for battlers in the game. This provides storage for peoplemon and turn choices.
Stage
Represents all possible states in a battle.
Emitted by the BattleFSM. All UI is handled via a queue of commands. Commands are resolved in the ord...
Represents a Peoplemon in battle. Stores some extra state that only exists in battle....