From a7e84b60366c78b131d43157980fbe4c2df655e6 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 1 Nov 2024 16:03:53 +0100 Subject: small cleanup + checks --- backend/Enemy.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'backend/Enemy.h') 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 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 hidden_objects; unsigned int health_points = 0; float attack_chance = 0.0; int damage_min = 0; -- cgit v1.2.3