AbilityDefinition ​
Inherits: DatabaseResource < Resource
Inherited by: PassiveAbilityDefinition
AbilityDefinition is pure configuration data for abilities. Contains no runtime state - just the settings and effects that define what an ability does. Now includes virtual methods for ability-specific logic (following effects pattern)
Properties ​
Array[Requirement] | requirements | [] |
Array[int] | groups | [] |
int | max_rank | 1 |
Array[AbilityRankProperty] | rank_properties | [] |
Variables ​
Array[Effect] | all_discovered_effects | [] |
Methods ​
bool | has_ranks() |
void | handle_completion( ability_instance: AbilityInstance ) |
AbilityInstance.AbilityUseAttemptResult | validate_ability_usage( ability_instance: AbilityInstance, from_action: bool ) |
void | cleanup_ability_logic( ability_instance: AbilityInstance ) |
String | get_tooltip_description() |
Property descriptions ​
Array[Requirement] requirements = [] ​
Array of requirements that must be met to use this ability (weapon type, stats, conditions, etc.)
Array[int] groups = [] ​
Groups this ability is in (see GroupDefinition): abilities and consumables of a group that shares its cooldown go on cooldown together
Ranks
int max_rank = 1 ​
The highest rank the ability can be trained to. 1 = the ability has no ranks (nothing changes for it). Rank 1 is what the ability is when it is learned: the numbers written on it. Each rank above can change them (the rank properties below) and the amounts of its effects (Amount, "Ability rank")
Array[AbilityRankProperty] rank_properties = [] ​
What each rank above the first changes on the numbers of the ability: its cooldown, cost, cast time, range ... The damage and healing of its effects use the rank in their own Amount, and an effect can need a rank (a requirement of the effect)
Variable descriptions ​
Array[Effect] all_discovered_effects = [] ​
All effects discovered recursively (including children) - populated by subclasses for tooltips only
Method descriptions ​
bool has_ranks() ​
Does the ability have ranks?
void handle_completion( ability_instance: AbilityInstance ) ​
Virtual method for handling ability completion (override in subclasses) Default implementation handles standard ability completion
AbilityInstance.AbilityUseAttemptResult validate_ability_usage( ability_instance: AbilityInstance, from_action: bool ) ​
Virtual method for ability-specific validation (override in subclasses) Default implementation does no additional validation
void cleanup_ability_logic( ability_instance: AbilityInstance ) ​
Virtual method for ability-specific cleanup (override in subclasses) Default implementation does nothing
String get_tooltip_description() ​
Get formatted description for tooltips with effect placeholder replacement