Base class for battlers in the game. This provides storage for peoplemon and turn choices.
More...
#include <BattlerController.hpp>
Base class for battlers in the game. This provides storage for peoplemon and turn choices.
Definition at line 20 of file BattlerController.hpp.
◆ ~BattlerController()
virtual core::battle::BattlerController::~BattlerController |
( |
| ) |
|
|
virtualdefault |
Destroy the Battler Controller object.
◆ BattlerController()
core::battle::BattlerController::BattlerController |
( |
| ) |
|
|
protected |
Initializes the battler with the peoplemon available to it.
- Parameters
-
peoplemon | The peoplemon to use in battle |
Definition at line 7 of file BattlerController.cpp.
◆ actionSelected()
bool core::battle::BattlerController::actionSelected |
( |
| ) |
const |
Returns whether or not the battler has chosen what to do on this turn.
Definition at line 14 of file BattlerController.cpp.
◆ chooseGiveUp()
void core::battle::BattlerController::chooseGiveUp |
( |
bool |
yes | ) |
|
|
protected |
Choose whether to give up or not.
- Parameters
-
yes | True to give up, false to continue |
Definition at line 41 of file BattlerController.cpp.
◆ chooseItem()
void core::battle::BattlerController::chooseItem |
( |
std::uint8_t |
pplIndex, |
|
|
core::item::Id |
item |
|
) |
| |
|
protected |
Selects the item to use.
- Parameters
-
pplIndex | Index of the peoplemon to use the item on |
item | The item to use |
Definition at line 58 of file BattlerController.cpp.
◆ chooseMove()
void core::battle::BattlerController::chooseMove |
( |
int |
move | ) |
|
|
protected |
Selects the move to use this turn when fighting.
- Parameters
-
move | The index of the move to use |
Definition at line 46 of file BattlerController.cpp.
◆ choosePeoplemon()
void core::battle::BattlerController::choosePeoplemon |
( |
std::uint8_t |
i | ) |
|
|
protected |
Selects the peoplemon to switch to.
- Parameters
-
i | Index of the peoplemon to switch to |
Definition at line 52 of file BattlerController.cpp.
◆ chooseRun()
void core::battle::BattlerController::chooseRun |
( |
| ) |
|
|
protected |
◆ chooseToContinue()
void core::battle::BattlerController::chooseToContinue |
( |
| ) |
|
◆ chosenAction()
TurnAction core::battle::BattlerController::chosenAction |
( |
| ) |
const |
◆ chosenItem()
◆ chosenMove()
int core::battle::BattlerController::chosenMove |
( |
| ) |
const |
◆ chosenPeoplemon()
std::uint8_t core::battle::BattlerController::chosenPeoplemon |
( |
| ) |
const |
◆ isHost()
virtual bool core::battle::BattlerController::isHost |
( |
| ) |
const |
|
pure virtual |
◆ name()
virtual const std::string& core::battle::BattlerController::name |
( |
| ) |
const |
|
pure virtual |
◆ pickAction()
void core::battle::BattlerController::pickAction |
( |
| ) |
|
◆ pickPeoplemon()
void core::battle::BattlerController::pickPeoplemon |
( |
bool |
fromFaint, |
|
|
bool |
reviveOnly |
|
) |
| |
Initiates the process of selecting a replacement peoplemon if the current one faints.
- Parameters
-
fromFaint | True if the current has fainted, false if the switch is for another reason |
reviveOnly | True if fainted peoplemon must be selected |
Definition at line 21 of file BattlerController.cpp.
◆ refresh()
virtual void core::battle::BattlerController::refresh |
( |
| ) |
|
|
pure virtual |
◆ removeItem()
virtual bool core::battle::BattlerController::removeItem |
( |
item::Id |
item | ) |
|
|
pure virtual |
◆ setOwner()
void core::battle::BattlerController::setOwner |
( |
Battler & |
owner | ) |
|
Sets the owner of this controller.
- Parameters
-
owner | The battler using this controller |
Definition at line 12 of file BattlerController.cpp.
◆ shouldContinue()
bool core::battle::BattlerController::shouldContinue |
( |
| ) |
const |
◆ startChooseAction()
virtual void core::battle::BattlerController::startChooseAction |
( |
| ) |
|
|
protectedpure virtual |
Base classes may override this to perform specific logic to occur when a turn is made.
◆ startChoosePeoplemon()
virtual void core::battle::BattlerController::startChoosePeoplemon |
( |
bool |
fromFaint, |
|
|
bool |
reviveOnly |
|
) |
| |
|
protectedpure virtual |
Base classes may override this to perform specific logic when a peoplemon must be picked.
- Parameters
-
fromFaint | True if the current has fainted, false if the switch is for another reason |
reviveOnly | True if fainted peoplemon must be selected |
◆ startChooseToContinue()
virtual void core::battle::BattlerController::startChooseToContinue |
( |
| ) |
|
|
protectedpure virtual |
Prompts the player to continue or not.
◆ dontGiveUp
bool core::battle::BattlerController::dontGiveUp |
◆ move
int core::battle::BattlerController::move |
◆ owner
Battler* core::battle::BattlerController::owner |
|
protected |
◆ useItem
The documentation for this class was generated from the following files: