Skip to content

PassiveAbilityDefinition ​

Inherits: AbilityDefinition < DatabaseResource < Resource

Inherited by: ActiveAbilityDefinition

PassiveAbilityDefinition is the base for any ability that has persistent passive effects. It holds passive_effects and owns the virtual logic for applying/removing them. ActiveAbilityDefinition extends this, inheriting passive effect support.

Description ​

As a standalone concrete resource it represents a pure passive ability - an always-on aura or buff that requires no player input to use.

Properties ​

Array[int]passive_effects[]

Methods ​

Arrayget_current_passive_effects( ability_instance: AbilityInstance )
voidhandle_completion( ability_instance: AbilityInstance )
AbilityInstance.AbilityUseAttemptResultvalidate_ability_usage( ability_instance: AbilityInstance, from_action: bool )
voidcleanup_ability_logic( ability_instance: AbilityInstance )
Stringget_tooltip_description()

Property descriptions ​

Passive Effects

Array[int] passive_effects = [] ​

Effects that are persistently applied to the owner while this ability is active. For standalone passives: applied on ability init, removed when requirements fail. For active abilities: applied on init, gated by strip_passive_on_inactive on the active def.

Method descriptions ​

Array get_current_passive_effects( ability_instance: AbilityInstance ) ​

Virtual: return the passive effects to apply. Override in subclasses if passive effects need dynamic selection.

void handle_completion( ability_instance: AbilityInstance ) ​

Passive abilities have no completion logic - they are persistent.

AbilityInstance.AbilityUseAttemptResult validate_ability_usage( ability_instance: AbilityInstance, from_action: bool ) ​

Passive abilities cannot be actively used.

void cleanup_ability_logic( ability_instance: AbilityInstance ) ​

No special cleanup needed - AbilityInstance handles effect removal.

String get_tooltip_description() ​

The text of the tooltip.