![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Adding this to an entity will make it a trainer that can battle. More...
#include <Trainer.hpp>
Public Member Functions | |
Trainer (file::Trainer &&trainer) | |
Construct a new Trainer component. More... | |
const std::string & | file () const |
Returns the file the trainer was spawned from. More... | |
const std::string & | name () const |
The name of the NPC. More... | |
const file::Conversation & | beforeBattleConversation () const |
The conversation before battle is entered. More... | |
const file::Conversation & | afterBattleConversation () const |
The conversation used after battle if interacted again. More... | |
const std::string & | loseBattleDialog () const |
Dialog line said in battle screen when battle is lost. More... | |
std::uint8_t | range () const |
Returns how far the trainer can see in tiles. More... | |
const std::vector< pplmn::OwnedPeoplemon > & | team () const |
Returns the team of peoplemon the trainer has. More... | |
const std::vector< item::Id > & | items () const |
Returns the items the trainer has. More... | |
bool | defeated () const |
Returns whether or not this trainer was defeated. More... | |
void | setDefeated () |
Marks this trainer as defeated. More... | |
std::uint8_t | basePayout () const |
Returns the base payout of the trainer. More... | |
Adding this to an entity will make it a trainer that can battle.
Definition at line 18 of file Trainer.hpp.
core::component::Trainer::Trainer | ( | file::Trainer && | trainer | ) |
Construct a new Trainer component.
trainer | The trainer data to create from |
Definition at line 16 of file Trainer.cpp.
const file::Conversation & core::component::Trainer::afterBattleConversation | ( | ) | const |
The conversation used after battle if interacted again.
Definition at line 47 of file Trainer.cpp.
std::uint8_t core::component::Trainer::basePayout | ( | ) | const |
Returns the base payout of the trainer.
Definition at line 61 of file Trainer.cpp.
const file::Conversation & core::component::Trainer::beforeBattleConversation | ( | ) | const |
The conversation before battle is entered.
Definition at line 45 of file Trainer.cpp.
bool core::component::Trainer::defeated | ( | ) | const |
Returns whether or not this trainer was defeated.
Definition at line 57 of file Trainer.cpp.
const std::string & core::component::Trainer::file | ( | ) | const |
Returns the file the trainer was spawned from.
Definition at line 41 of file Trainer.cpp.
const std::vector< item::Id > & core::component::Trainer::items | ( | ) | const |
Returns the items the trainer has.
Definition at line 55 of file Trainer.cpp.
const std::string & core::component::Trainer::loseBattleDialog | ( | ) | const |
Dialog line said in battle screen when battle is lost.
Definition at line 49 of file Trainer.cpp.
const std::string & core::component::Trainer::name | ( | ) | const |
The name of the NPC.
Definition at line 43 of file Trainer.cpp.
std::uint8_t core::component::Trainer::range | ( | ) | const |
Returns how far the trainer can see in tiles.
Definition at line 51 of file Trainer.cpp.
void core::component::Trainer::setDefeated | ( | ) |
Marks this trainer as defeated.
Definition at line 59 of file Trainer.cpp.
const std::vector< pplmn::OwnedPeoplemon > & core::component::Trainer::team | ( | ) | const |
Returns the team of peoplemon the trainer has.
Definition at line 53 of file Trainer.cpp.