Base class representing a combat-capable entity.
Definition: entity.h:18
void increaseArmor(int amount)
Increases armor by the given amount.
Definition: entity.h:39
void increaseAttack(int amount)
Increases attack by the given amount.
Definition: entity.h:42
std::string m_name
Definition: entity.h:69
int m_armor
Definition: entity.h:67
void lowerArmor(int amount)
Decreases armor by the given amount.
Definition: entity.h:49
void increaseHp(int amount)
Increases HP by the given amount.
Definition: entity.h:63
int getArmor() const
Returns the current armor value.
Definition: entity.h:27
int getAttack() const
Returns the current attack value.
Definition: entity.h:30
int m_hp
Definition: entity.h:66
Entity()
Definition: entity.h:20
int getHp() const
Returns the current HP value.
Definition: entity.h:57
void resetArmor()
Resets armor to zero.
Definition: entity.h:33
Entity(int hp, int attack=0, int armor=0)
Definition: entity.h:21
std::string_view getName() const
Returns the display name of the entity.
Definition: entity.h:24
void resetAttack()
Resets attack to zero.
Definition: entity.h:36
void lowerHp(int amount)
Decreases HP by the given amount.
Definition: entity.h:60
int m_attack
Definition: entity.h:68