#ifndef ACTOR_HPP #define ACTOR_HPP #include "Weapon.hpp" #include #include #include class Item; class Actor { public: enum class Stat { ATTACK, DEFENCE, MAGICATTACK, // magia MAGICDEFENSE, // resistenza PRECISION, DODGE, REACTION }; enum class Skill { }; const std::string name; const unsigned maxHp; Actor() = delete; virtual ~Actor(); void damage(int amt); void heal(int amt); void store(Item &item); Item* drop(); unsigned stat(Stat stat) const; unsigned skill(Skill skill) const; /* accessors */ bool alive() const { return _alive; } unsigned hp() const { return _hp; } const std::list& inventory() const { return _inventory; } Item* weapon() const { return _weapon; } int x() { return _x; } int y() { return _y; } protected: bool _alive; unsigned _hp; /* movement related */ unsigned _movements; int _x, _y; /* others */ Item* _weapon; unsigned _inventorySize; std::list _inventory; std::map _stats; std::map _skills; Actor(std::string _name, unsigned _maxHp); }; #endif