TargetStrategyInstance ​
Inherits: RefCounted
Runtime instance of a targeting strategy that references a TargetStrategyDefinition for configuration. Contains only runtime state and data - all logic is delegated to the definition. Follows the same pattern as AbilityInstance -> AbilityDefinition relationship.
Variables ​
TargetStrategyDefinition | definition | |
AbilityInstance | ability_instance | |
Dictionary | runtime_data | {} |
Dictionary | runtime_property_overrides | {} |
PropertyModifierSet | modifiers | PropertyModifierSet.new() |
Methods ​
Variable descriptions ​
TargetStrategyDefinition definition ​
Reference to the immutable targeting definition (contains all logic)
AbilityInstance ability_instance ​
The ability instance that owns this targeting instance
Dictionary runtime_data = ​
Runtime data specific to the targeting strategy type (last targets, acquired points, etc.)
Dictionary runtime_property_overrides = ​
Runtime overrides for definition properties (only set when modified by effects)
PropertyModifierSet modifiers = PropertyModifierSet.new() ​
Modifiers on the numeric properties (cast time, range, drain ...): they stack and can be taken away by their source
Method descriptions ​
Variant apply_modifiers( property_name: String, value: Variant ) ​
A numeric property with the modifiers applied (other kinds of value pass through)
void set_runtime_property( property_name: String, value: Variant ) ​
Set a runtime property override (for stat effects modifying targeting properties)
void clear_runtime_property( property_name: String ) ​
Clear a runtime property override (reverts to definition value)
bool has_runtime_override( property_name: String ) ​
Check if a property has a runtime override
Dictionary get_all_runtime_overrides() ​
Get all runtime overrides (for debugging/save states)
void clear_all_runtime_overrides() ​
Clear all runtime overrides
Dictionary validate_target( target: Variant, user: Entity ) ​
Validate target - delegates to definition
Variant get_auto_target() ​
Get auto-target - delegates to definition
bool get_requires_line_of_sight() ​
Virtual method for line of sight requirement
Variant get_property_value( property_name: String ) ​
Get property value with runtime override support - delegates to definition
float get_max_range() ​
Convenience getters for common properties
bool get_requires_targeting_input() ​
The current value of requires targeting input: the one of the definition, unless a modifier changed it.
bool get_has_auto_target() ​
The current value of has auto target: the one of the definition, unless a modifier changed it.
bool get_can_target_dead() ​
The current value of can target dead: the one of the definition, unless a modifier changed it.
int get_target_collision_layer() ​
The current value of target collision layer: the one of the definition, unless a modifier changed it.
float get_target_collision_radius() ​
The current value of target collision radius: the one of the definition, unless a modifier changed it.
bool get_has_marker() ​
The current value of has marker: the one of the definition, unless a modifier changed it.
TargetStrategyDefinition.AbilityMarkerLocation get_marker_location() ​
The current value of marker location: the one of the definition, unless a modifier changed it.
bool get_marker_is_friendly() ​
The current value of marker is friendly: the one of the definition, unless a modifier changed it.
bool get_can_target_self() ​
The current value of can target self: the one of the definition, unless a modifier changed it.
int get_points_expected() ​
The current value of points expected: the one of the definition, unless a modifier changed it.
Dictionary add_multi_point( point: Vector3, user: Entity ) ​
Add a point to multi-point targeting and return status (delegates to definition if needed)
void clear_multi_points() ​
Clear accumulated multi-points
bool requires_targeting_input() ​
Check if this strategy requires manual targeting input
bool has_auto_targeting() ​
Check if this strategy has auto-targeting capability
Dictionary to_save_data() ​
Save runtime state to dictionary
void from_save_data( save_data: Dictionary ) ​
Load runtime state from dictionary
void reset() ​
Reset targeting state (for reuse)