Skip to content

SwitchToAllyAction ​

Inherits: CombatAction < Resource

Switches target to ally based on various criteria

Properties ​

floatsearch_range15.0
TargetCriteriatarget_criteriaTargetCriteria.NEAREST
floathealth_threshold_percent-1.0
intrequired_effect_id0 # 0 = no effect requirement
boolexclude_selftrue

Enumerations ​

enum TargetCriteria ​

Switches target to ally based on various criteria

  • NEAREST = 0
  • FARTHEST = 1
  • LOWEST_HEALTH = 2
  • HIGHEST_HEALTH = 3
  • RANDOM = 4

Property descriptions ​

float search_range = 15.0 ​

How far to look for an ally.

TargetCriteria target_criteria = TargetCriteria.NEAREST ​

Which ally to pick (the nearest, the weakest ...).

float health_threshold_percent = -1.0 ​

-1 = ignore health threshold

int required_effect_id = 0 # 0 = no effect requirement ​

Only allies with this effect count (0 = no filter).

bool exclude_self = true ​

True when the entity cannot pick itself.