|
| | Entity () |
| |
| | Entity (int hp, int attack=0, int armor=0) |
| |
| std::string_view | getName () const |
| | Returns the display name of the entity.
|
| |
| int | getArmor () const |
| | Returns the current armor value.
|
| |
| int | getAttack () const |
| | Returns the current attack value.
|
| |
| void | resetArmor () |
| | Resets armor to zero.
|
| |
| void | resetAttack () |
| | Resets attack to zero.
|
| |
| void | increaseArmor (int amount) |
| | Increases armor by the given amount.
|
| |
| void | increaseAttack (int amount) |
| | Increases attack by the given amount.
|
| |
| void | lowerArmor (int amount) |
| | Decreases armor by the given amount.
|
| |
| int | getHp () const |
| | Returns the current HP value.
|
| |
| void | lowerHp (int amount) |
| | Decreases HP by the given amount.
|
| |
| void | increaseHp (int amount) |
| | Increases HP by the given amount.
|
| |
Base class representing a combat-capable entity.
Entity stores core combat state such as HP, armor, and attack value. It provides low-level mutation primitives but does not implement combat rules or gameplay logic.
Higher-level systems (e.g., CombatSystem) are responsible for enforcing rules and constraints when mutating entity state.