PassiveSkill
Inherits: Skill < Item < RefCounted
Abstract extension of Skill for skills that are toggled on/off via concentration cost.
Unlike ActiveSkill, use_skill() is a no-op. Instead, passive skills execute indirectly by connecting to game signals (e.g., GameManager.POST_SKILL_EFFECT).
Toggle flow:
on_off_passive() → start_skill() → check/deduct CONC pool → connect signals
When turned off, concentration is refunded and components are reset.
Methods
void |
|
void |
connect_to_signal_if_active(sig: |
|
Method Descriptions
void on_off_passive() 🔗
Toggles this passive skill ON or OFF.
ON: calls start_skill(), checks if the entity’s concentration pool can afford the cost. Deducts it if possible.
OFF: refunds the concentration cost, clears and re-initializes all components.
void connect_to_signal_if_active(sig: Signal, fun: Callable) 🔗
Safely connects fun to sig only when the passive is active.
Disconnects the function if the passive is turned off.
Called by concrete subclasses in their signal setup logic.
bool is_active() 🔗
Returns true if this passive is currently toggled on.