Base Ability
The abilities are structured from a base class that contain the shared logic for derivatives:
- start_ability() - checks if ability can be used, chooses and plays animation
- cast_ability() - update player state and stamina, wait for cast_time, then perform_ability()
- perform_ability() - template method to override in subclass
- cooldown() - runs timer and resets states
Derived Classes
Abilities are then split into three categories:
- Area - overrides perform_ability() to spawn a collider at selected area.
- Target - overrides perform_ability() to just decrease health of target.
- Aura - overrides perform_ability() to instantiate a passive ability effect.
Then for the actual abilities I save them as Resources with modified data to have them feel different.