12 : state(State::Waiting)
18 case State::PickingTurn:
20 state = State::Waiting;
40 case State::PickingFaintReplacement:
42 state = State::Waiting;
52 void PlayerController::startChooseAction() {
53 state = State::PickingTurn;
57 void PlayerController::startChoosePeoplemon(
bool fromFaint,
bool reviveOnly) {
58 state = State::PickingFaintReplacement;
62 void PlayerController::startChooseToContinue() {
Id
Represents an item in its simplist form.
Core classes and functionality for both the editor and game.
void chooseGiveUp(bool yes)
Choose whether to give up or not.
void chooseMove(int move)
Selects the move to use this turn when fighting.
void choosePeoplemon(std::uint8_t i)
Selects the peoplemon to switch to.
void chooseItem(std::uint8_t pplIndex, core::item::Id item)
Selects the item to use.
void chooseRun()
Chooses to run away.
virtual void refresh() override
Checks the menu state.
virtual const std::string & name() const override
Returns the name of the battler.
virtual bool isHost() const override
Returns true.
PlayerController(system::Player &player, view::PlayerMenu &menu)
Construct a new Player Controller.
virtual bool removeItem(item::Id item) override
Removes the item from the battler's inventory.
The player menu for battles.
TurnAction selectedAction() const
The selected turn action.
int selectedPeoplemon() const
Returns the selected peoplemon index.
void choosePeoplemonMidTurn(bool fromFaint, bool fromRevive)
Opens the menu to select a peoplemon to send out.
item::Id selectedItem() const
Returns the selected item.
void beginTurn()
Resets the menu to the turn start state.
int selectedMove() const
Returns the selected move index.
bool ready() const
Returns true when the player's choice has been made.
bool removeItem(item::Id item, unsigned int qty=1)
Removes the given item from the bag.
Primary system for managing the player and their data.
player::State & state()
Returns the state of the player.