diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-01 16:03:53 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-01 16:03:53 +0100 |
commit | a7e84b60366c78b131d43157980fbe4c2df655e6 (patch) | |
tree | 391099bfd358e04c8ef38f33311f92b2cd607afe /backend/Enemy.h | |
parent | 798948dbe6f012e194f053c4e862cf697f30b793 (diff) |
small cleanup + checks
Diffstat (limited to 'backend/Enemy.h')
-rw-r--r-- | backend/Enemy.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/backend/Enemy.h b/backend/Enemy.h index 71ad437..4db2ae8 100644 --- a/backend/Enemy.h +++ b/backend/Enemy.h @@ -1,6 +1,9 @@ #pragma once -#include "backend/String.h" +#include "String.h" +#include "PtrList.h" +#include "ListIterator.h" +#include "Object.h" class Enemy { public: @@ -8,7 +11,9 @@ public: const String & get_name() const; void set_description(const String & description); const String & get_description() const; + void set_health(unsigned); unsigned get_health() const; + bool is_dead() const; void take_damage(unsigned int dmg); virtual const String & get_displayname() const; void set_attack(float attack_chance); @@ -18,6 +23,10 @@ public: void set_damage_max(int damage_max); int get_damage_max() const; + void add_hidden_object(Object *); + void remove_hidden_object(Object *); + ListRange<Object *> get_hidden_objects(); + private: friend class EnemyFactory; Enemy(const String & name, const String & description); @@ -27,6 +36,7 @@ public: private: String name; String description; + PtrList<Object> hidden_objects; unsigned int health_points = 0; float attack_chance = 0.0; int damage_min = 0; |