This controller allows an AI to battle.
More...
#include <AIController.hpp>
This controller allows an AI to battle.
Definition at line 16 of file AIController.hpp.
◆ AIController() [1/2]
core::battle::AIController::AIController |
( |
pplmn::Id |
wildId | ) |
|
◆ AIController() [2/2]
core::battle::AIController::AIController |
( |
const std::string & |
trainerName, |
|
|
const std::vector< item::Id > & |
items |
|
) |
| |
Construct a new AIController with the given items.
- Parameters
-
trainerName | The name of the trainer being controlled |
items | The items that may be used in battle |
Definition at line 14 of file AIController.cpp.
◆ ~AIController()
virtual core::battle::AIController::~AIController |
( |
| ) |
|
|
virtualdefault |
◆ actionSelected()
bool core::battle::BattlerController::actionSelected |
( |
| ) |
const |
|
inherited |
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 | ) |
|
|
protectedinherited |
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 |
|
) |
| |
|
protectedinherited |
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 | ) |
|
|
protectedinherited |
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 | ) |
|
|
protectedinherited |
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 |
( |
| ) |
|
|
protectedinherited |
◆ chooseToContinue()
void core::battle::BattlerController::chooseToContinue |
( |
| ) |
|
|
inherited |
◆ chosenAction()
TurnAction core::battle::BattlerController::chosenAction |
( |
| ) |
const |
|
inherited |
◆ chosenItem()
◆ chosenMove()
int core::battle::BattlerController::chosenMove |
( |
| ) |
const |
|
inherited |
◆ chosenPeoplemon()
std::uint8_t core::battle::BattlerController::chosenPeoplemon |
( |
| ) |
const |
|
inherited |
◆ isHost()
bool core::battle::AIController::isHost |
( |
| ) |
const |
|
overridevirtual |
◆ name()
const std::string & core::battle::AIController::name |
( |
| ) |
const |
|
overridevirtual |
◆ pickAction()
void core::battle::BattlerController::pickAction |
( |
| ) |
|
|
inherited |
◆ pickPeoplemon()
void core::battle::BattlerController::pickPeoplemon |
( |
bool |
fromFaint, |
|
|
bool |
reviveOnly |
|
) |
| |
|
inherited |
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()
void core::battle::AIController::refresh |
( |
| ) |
|
|
overridevirtual |
◆ removeItem()
bool core::battle::AIController::removeItem |
( |
item::Id |
item | ) |
|
|
overridevirtual |
◆ setOwner()
void core::battle::BattlerController::setOwner |
( |
Battler & |
owner | ) |
|
|
inherited |
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 |
|
inherited |
◆ dontGiveUp
bool core::battle::BattlerController::dontGiveUp |
|
inherited |
◆ move
int core::battle::BattlerController::move |
|
inherited |
◆ owner
Battler* core::battle::BattlerController::owner |
|
protectedinherited |
◆ useItem
The documentation for this class was generated from the following files: