#pragma once #include "String.h" #include "PtrList.h" #include "ListIterator.h" #include "Object.h" #include "Range.h" class Enemy { public: void set_name(const String & name); 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); float get_attack() const; void set_damage(const Range & range); Range get_damage() 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); public: virtual ~Enemy() = default; private: String name; String description; PtrList hidden_objects; unsigned int health_points = 0; float attack_chance = 0.0; int damage_min = 0; int damage_max = 0; };