Peoplemon  0.1.0
Peoplemon 3 game source documentation
Trainer.hpp
Go to the documentation of this file.
1 #ifndef CORE_COMPONENTS_TRAINER_HPP
2 #define CORE_COMPONENTS_TRAINER_HPP
3 
4 #include <BLIB/Resources.hpp>
6 #include <Core/Files/Trainer.hpp>
7 
8 namespace core
9 {
10 namespace component
11 {
18 class Trainer {
19 public:
25  Trainer(file::Trainer&& trainer);
26 
31  const std::string& file() const;
32 
37  const std::string& name() const;
38 
44 
50 
55  const std::string& loseBattleDialog() const;
56 
61  std::uint8_t range() const;
62 
67  const std::vector<pplmn::OwnedPeoplemon>& team() const;
68 
73  const std::vector<item::Id>& items() const;
74 
79  bool defeated() const;
80 
85  void setDefeated();
86 
91  std::uint8_t basePayout() const;
92 
93  // TODO - expose battle ai
94 
95 private:
96  const std::string sourceFile;
97  const std::string _name;
98  file::Conversation beforeBattle;
99  file::Conversation afterBattle;
100  const std::string loseDialog;
101  const std::uint8_t visionRange;
102  const std::vector<pplmn::OwnedPeoplemon> peoplemon;
103  const std::vector<item::Id> _items;
104  std::uint8_t payout;
105  bool beat;
106 };
107 
108 } // namespace component
109 } // namespace core
110 
111 #endif
Core classes and functionality for both the editor and game.
Adding this to an entity will make it a trainer that can battle.
Definition: Trainer.hpp:18
Trainer(file::Trainer &&trainer)
Construct a new Trainer component.
Definition: Trainer.cpp:16
const std::string & loseBattleDialog() const
Dialog line said in battle screen when battle is lost.
Definition: Trainer.cpp:49
const std::string & name() const
The name of the NPC.
Definition: Trainer.cpp:43
bool defeated() const
Returns whether or not this trainer was defeated.
Definition: Trainer.cpp:57
const file::Conversation & beforeBattleConversation() const
The conversation before battle is entered.
Definition: Trainer.cpp:45
std::uint8_t range() const
Returns how far the trainer can see in tiles.
Definition: Trainer.cpp:51
const std::vector< item::Id > & items() const
Returns the items the trainer has.
Definition: Trainer.cpp:55
const std::string & file() const
Returns the file the trainer was spawned from.
Definition: Trainer.cpp:41
const file::Conversation & afterBattleConversation() const
The conversation used after battle if interacted again.
Definition: Trainer.cpp:47
const std::vector< pplmn::OwnedPeoplemon > & team() const
Returns the team of peoplemon the trainer has.
Definition: Trainer.cpp:53
void setDefeated()
Marks this trainer as defeated.
Definition: Trainer.cpp:59
std::uint8_t basePayout() const
Returns the base payout of the trainer.
Definition: Trainer.cpp:61
Stores a conversation that an NPC or trainer can have with the player.
Static data for trainers in the world.
Definition: Trainer.hpp:20