#include "Actor.hpp" Actor::Actor(std::string _name, unsigned _maxHp) : name(_name), maxHp(_maxHp) {} Actor::~Actor() {} void Actor::damage(int amt) { _hp -= amt; if (_hp < 0) { _hp = 0; _alive = false; } } void Actor::heal(int amt) { _hp += amt; if (_hp > maxHp) { _hp = maxHp; } } void Actor::store(Item &item) { // TODO check if item is already in inventory _inventory.push_front(&item); } Item* Actor::drop() { // TODO Item *item = _inventory.front(); _inventory.pop_front(); return item; } unsigned Actor::stat(Actor::Stat stat) const { return _stats.at(stat); } unsigned Actor::skill(Actor::Skill skill) const { // TODO // return _skills.at(skill); return 0; }