WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Creature_All.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef WORLDSIM_CREATURE_ALL_HPP
3 #define WORLDSIM_CREATURE_ALL_HPP
4 
5 /* WorldSim: Creature_All.hpp
6  #include"Creature_All.hpp"
7 
8 */
9 
10 #include "Creature.hpp"
11 
12 class Creature_Bat: public Creature
13 {
14  public:
15 
16  Creature_Bat();
17  ~Creature_Bat();
18 
19  void init( int _sex = 0);
20 
21  virtual void incrementTicks (int nTicks) override;
22 
23  virtual void attack (Creature*, Creature_Attack*) override;
24  virtual void attack (Character*, Creature_Attack*) override;
25 
26  virtual void wander() override;
27 
28  virtual Texture* currentTexture() override;
29  virtual std::string getName() override;
30 };
31 
32 
33 // Test creatures. They will later be given some vaeriety once the basic wildlife modelling is in place.
34 
35 // Herbivore which hangs out in groups and grazes on grass. Obviously only present in grassy biomes.
36 // An example would be zebras or horses.
37 // They are individually weak and slow but safe in large packs. Generally the old or sick animals will fall behind and be eaten by carnivores.
39 {
40  public:
41 
44 
45  void init( int _sex = 0);
46 
47  virtual void incrementTicks (int nTicks) override;
48 
49  virtual void attack (Creature*, Creature_Attack*) override;
50  virtual void attack (Character*, Creature_Attack*) override;
51 
52  virtual void wander() override;
53 
54  virtual Texture* currentTexture() override;
55  virtual std::string getName() override;
56 };
57 
58 // Herbivore which travels in family groups and ranges over medium or long distances to find food.
59 // An example would be deer or camels
60 // They rely on speed and alertness to escape predators.
62 {
63  public:
64 
67 
68  void init( int _sex = 0);
69 
70  virtual void incrementTicks (int nTicks) override;
71 
72  virtual void attack (Creature*, Creature_Attack*) override;
73  virtual void attack (Character*, Creature_Attack*) override;
74 
75  virtual void wander() override;
76 
77  virtual Texture* currentTexture() override;
78  virtual std::string getName() override;
79 };
80 
81 // Carnivores which hunt in packs. Examples would be hyenas or wolves.
82 // They rely on teamwork to attack larger creatures
84 {
85  public:
86 
89 
90  void init( int _sex = 0);
91 
92  virtual void incrementTicks (int nTicks) override;
93 
94  virtual void attack (Creature*, Creature_Attack*) override;
95  virtual void attack (Character*, Creature_Attack*) override;
96 
97  virtual void wander() override;
98 
99  virtual Texture* currentTexture() override;
100  virtual std::string getName() override;
101 };
102 
103 // Carnivores which hunt alone or in family groups. They rely on their
104 // individual strength to catch prey.
105 // An example would be bears.
107 {
108  public:
109 
112 
113  void init( int _sex = 0);
114 
115  virtual void incrementTicks (int nTicks) override;
116 
117  virtual void attack (Creature*, Creature_Attack*) override;
118  virtual void attack (Character*, Creature_Attack*) override;
119 
120  virtual void wander() override;
121 
122  virtual Texture* currentTexture() override;
123  virtual std::string getName() override;
124 };
125 
126 #endif
~Creature_Bat()
Definition: Creature_All.cpp:19
Definition: Creature.hpp:34
Definition: Creature_All.hpp:38
virtual std::string getName() override
Definition: Creature_All.cpp:259
virtual void incrementTicks(int nTicks) override
Definition: Creature_All.cpp:42
void init(int _sex=0)
Definition: Creature_All.cpp:24
virtual void wander() override
Definition: Creature_All.cpp:167
Definition: Creature_Attack.hpp:16
Definition: Character.hpp:29
Definition: Creature_All.hpp:83
virtual Texture * currentTexture() override
Definition: Creature_All.cpp:251
Creature_Bat()
Definition: Creature_All.cpp:14
Definition: Creature_All.hpp:12
Definition: Creature_All.hpp:106
Definition: Creature_All.hpp:61
virtual void attack(Creature *, Creature_Attack *) override
Definition: Creature_All.cpp:154