Skill

Inherits: Item < RefCounted

Inherited By: ActiveSkill, PassiveSkill

Abstract base class for all skills in the game. Extends Item.

Skills are composed of Component instances that define their behavior (damage, healing, range, costs, critical stats, etc.).

Execution pipeline:

skill.duplicate(owner_id) start_skill() use_skill(target)

start_skill() runs the 3-phase mod pipeline via entity signals (PRE/MAIN/FINAL_SKILL_MODS), where equipped passives, gear, and runes write into each component’s mod_component snapshot.

use_skill() applies the effect: PRE_EFFECT signal → target defense → effect → VFX → POST_EFFECT signal.

Skills are always duplicated before execution; the original is never modified.

Properties

int

skill_source_id

int

level

1

Resistance.ElementTypes

element_type

Skill.SkillTags[]

skill_tags

Rune

rune_socket

Array[Component]

components

[]

int

skill_owner_id

-1

Methods

void

start_skill()

Array[Component]

get_comps_of_type(type: Variant)

Component

get_comp_of_type(type: Variant)

void

use_skill(target: Entity) abstract

Skill

duplicate(own: int = -1)

void

floating_skill_vfx(target: Entity)


Property Descriptions

int skill_source_id 🔗

Unique identifier of the original skill instance. Set at construction; preserved across duplicates to identify the skill.


int level = 1 🔗

Current skill level.


Resistance.ElementTypes element_type 🔗

Element type.


Skill.SkillTags[] skill_tags 🔗

Tags categorizing this skill.


Rune rune_socket 🔗

Rune socketed into this skill. Activated in start_skill().

Can be equipped/unequipped via UI (see RuneInventoryUI).


Array[Component] components = [] 🔗

The list of Component instances that define this skill’s behavior.

Populated in _init_components() at construction.


int skill_owner_id = -1 🔗

Instance ID of the owning entity (or NO_OWNER if unowned).


Method Descriptions

void start_skill() 🔗

Prepares the skill for execution: connects the rune if socketed, then runs the 3-phase mod pipeline (PRE/MAIN/FINAL_SKILL_MODS) on the owner entity’s signals.

Must be called before use_skill().


Array[Component] get_comps_of_type(type: Variant) 🔗

Returns all components matching type.


Component get_comp_of_type(type: Variant) 🔗

Returns the first component matching type, or null if not found.


void use_skill(target: Entity) abstract 🔗

Applies the skill’s effect to target.

Called after start_skill() in the execution pipeline.


Skill duplicate(own: int = -1) 🔗

Creates a deep copy of this skill with a new owner.

The new instance has fresh components but retains the rune_socket and skill_source_id.


void floating_skill_vfx(target: Entity) 🔗

Shows a floating VFX icon above the target entity.