Skip to content

PowerUpActiveAbilityDefinition ​

Inherits: ActiveAbilityDefinition < PassiveAbilityDefinition < AbilityDefinition < DatabaseResource < Resource

PowerUpActiveAbilityDefinition adapts its charging behaviour based on the UseStrategyDefinition.

Description ​

Instant: Resource-based charging (spend more resources = higher tier) Cast: Cast time determines charge tier (longer cast = higher tier) Channel: Progressive/accumulating effects during channel + final burst Toggle: Charge builds while toggle is active (stance power-up over time)

Properties ​

Array[Array]tier_effects[]
Array[float]tier_thresholds[]
floatmax_charge_resource100.0
boolprogressive_channel_effectstrue
boolchannel_final_bursttrue
booltoggle_stacking_tiersfalse

Methods ​

Arrayget_current_on_use_effects( ability_instance: AbilityInstance )
voidprepare_usage( ability_instance: AbilityInstance )
voidhandle_completion( ability_instance: AbilityInstance )
floatget_tier_threshold( tier_index: int )
Arrayget_tier_effects_array( tier_index: int )
intget_max_charge_tiers()
boolcan_achieve_tier( tier_index: int, value: float )
floatget_next_tier_threshold( current_value: float )
Stringget_tooltip_description()

Property descriptions ​

Charge Tiers

Array[Array] tier_effects = [] ​

On-use effects for each charge tier. Index 0 = Tier 1, Index 1 = Tier 2, etc.

Charge Timing

Array[float] tier_thresholds = [] ​

Thresholds for reaching each tier. Meaning depends on UseStrategy: Instant: Resource costs, Channel: Time intervals, Cast: Cast time, Toggle: Active durations.

Instant Strategy

float max_charge_resource = 100.0 ​

Maximum resources that can be spent for charging

Channel Strategy

bool progressive_channel_effects = true ​

Whether to apply tier effects progressively during channel (vs only final burst)

bool channel_final_burst = true ​

Whether to apply a final burst based on achieved tier when channel completes

Toggle Strategy

bool toggle_stacking_tiers = false ​

Whether tier effects stack (add new effects) or replace (change effects)

Method descriptions ​

Array get_current_on_use_effects( ability_instance: AbilityInstance ) ​

The effects of the tier the charge has reached.

void prepare_usage( ability_instance: AbilityInstance ) ​

Called by the ability instance before the cost is paid: the tier is the highest the user can pay for (base cost + threshold, up to max_charge_resource), and what that costs replaces the cost for this one use. The tier is kept for the effects

void handle_completion( ability_instance: AbilityInstance ) ​

Standard completion; the one-use cost and tier are forgotten afterwards

float get_tier_threshold( tier_index: int ) ​

The charge a tier needs.

Array get_tier_effects_array( tier_index: int ) ​

The effects of a tier.

int get_max_charge_tiers() ​

How many tiers the ability has.

bool can_achieve_tier( tier_index: int, value: float ) ​

Is this charge enough for the tier?

float get_next_tier_threshold( current_value: float ) ​

The charge of the next tier above the current charge (0 when it is at the top).

String get_tooltip_description() ​

The text of the tooltip, with the tiers.