Interface Cooldownable
- All Known Implementing Classes:
Skill
public interface Cooldownable
Interface for skills that have a cooldown system.
Enforces a consistent contract for checking, ticking, and using cooldowns.
-
Method Summary
-
Method Details
-
isReady
boolean isReady()Checks whether the skill is ready to use.- Returns:
trueif cooldown is 0
-
tickCooldown
void tickCooldown()Decrements the cooldown by 1; called at the end of every turn. -
use
void use()Uses the skill and resets the cooldown.- Throws:
IllegalStateException- if the skill is not yet ready
-
getRemainingCooldown
int getRemainingCooldown()Returns the number of turns remaining before the skill can be used again.- Returns:
- Remaining turns
-