aboutsummaryrefslogtreecommitdiff
path: root/backend/Enemy.h
diff options
context:
space:
mode:
Diffstat (limited to 'backend/Enemy.h')
-rw-r--r--backend/Enemy.h12
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;