Base class for all entities in the game. Holds the shared stat and identity data used by units. Status flags such as isDazed are derived from runtime counters rather than configuration.
Returns true if the entity has any AP remaining this turn.
Returns true if the entity has enough AP to perform an attack.
Returns true if the entity has enough AP to perform a move.
Deducts the given amount from the entity's AP, floored at zero.
Resets the entity's AP to its maximum. Called at the start of the human turn.
Returns true if the entity currently has a daze counter above zero.
Returns true if the entity is prevented from acting this turn by any status effect. Currently covers dazed. Additional incapacitating statuses should be added here as they are introduced.
Returns true if the entity has at least one attack remaining this turn. Returns false if the entity does not track attacks (null).
Decrements the remaining attack count by one. No-ops if the entity does not track attacks.
Resets the remaining attack count to the entity's maximum. No-ops if the entity does not track attacks.
Sets the daze counter to the given number of turns. Defaults to 1.
Decrements the daze counter by one, floored at zero. The entity is considered undazed once the counter reaches zero.
Restores health by the given amount, capped at the entity's maximum health. Uses a null check rather than a truthiness check so that entities at 0 health can still regen. No-ops if the entity has no health stat assigned, as some entity types do not track health at all.
Reduces health by the given amount, floored at zero. The truthiness guard covers entities with no health pool (null) and those already at 0 health, neither of which should take further damage.