3 #include <BLIB/Util/Random.hpp>
12 : _name(pplmn::Peoplemon::name(wildId)) {}
22 void AIController::startChooseAction() {
26 i = bl::util::Random::get<int>(0, 3);
31 void AIController::startChoosePeoplemon(
bool,
bool reviveOnly) {
38 else if (
owner->
peoplemon()[i].base().currentHp() == 0 && reviveOnly) {
46 void AIController::startChooseToContinue() {
chooseGiveUp(
false); }
49 for (
auto it = items.begin(); it != items.end(); ++it) {
Id
Represents an item in its simplist form.
Core classes and functionality for both the editor and game.
core::pplmn::BattlePeoplemon & activePeoplemon()
Returns the peoplemon that is currently out.
std::vector< core::pplmn::BattlePeoplemon > & peoplemon()
Returns all the peoplemon held by this battler.
AIController(pplmn::Id wildId)
Construct a new AIController for a wild peoplemon.
virtual void refresh() override
Does nothing.
virtual const std::string & name() const override
Returns the name of the battler.
virtual bool removeItem(item::Id item) override
Removes the item from the battler's inventory.
virtual bool isHost() const override
Returns false.
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.
OwnedPeoplemon & base()
Returns the wrapped peoplemon.
MoveId id
The id of the move.
const OwnedMove * knownMoves() const
Returns the moves known by this Peoplemon.