Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | List of all members
core::component::Trainer Class Reference

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::ConversationbeforeBattleConversation () const
 The conversation before battle is entered. More...
 
const file::ConversationafterBattleConversation () 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...
 

Detailed Description

Adding this to an entity will make it a trainer that can battle.

Definition at line 18 of file Trainer.hpp.

Constructor & Destructor Documentation

◆ Trainer()

core::component::Trainer::Trainer ( file::Trainer &&  trainer)

Construct a new Trainer component.

Parameters
trainerThe trainer data to create from

Definition at line 16 of file Trainer.cpp.

Member Function Documentation

◆ afterBattleConversation()

const file::Conversation & core::component::Trainer::afterBattleConversation ( ) const

The conversation used after battle if interacted again.

Definition at line 47 of file Trainer.cpp.

◆ basePayout()

std::uint8_t core::component::Trainer::basePayout ( ) const

Returns the base payout of the trainer.

Definition at line 61 of file Trainer.cpp.

◆ beforeBattleConversation()

const file::Conversation & core::component::Trainer::beforeBattleConversation ( ) const

The conversation before battle is entered.

Definition at line 45 of file Trainer.cpp.

◆ defeated()

bool core::component::Trainer::defeated ( ) const

Returns whether or not this trainer was defeated.

Definition at line 57 of file Trainer.cpp.

◆ file()

const std::string & core::component::Trainer::file ( ) const

Returns the file the trainer was spawned from.

Definition at line 41 of file Trainer.cpp.

◆ items()

const std::vector< item::Id > & core::component::Trainer::items ( ) const

Returns the items the trainer has.

Definition at line 55 of file Trainer.cpp.

◆ loseBattleDialog()

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.

◆ name()

const std::string & core::component::Trainer::name ( ) const

The name of the NPC.

Definition at line 43 of file Trainer.cpp.

◆ range()

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.

◆ setDefeated()

void core::component::Trainer::setDefeated ( )

Marks this trainer as defeated.

Definition at line 59 of file Trainer.cpp.

◆ team()

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.


The documentation for this class was generated from the following files: