Skip to content

EntityCondition ​

Inherits: Condition < Resource

Inherited by: AbilityCooldownReadyCondition, AlliesInRangeCondition, AlliesInRangeHealthCondition, AlliesInRangeWithEffectCondition, CastingStateCondition, CombatStateCondition, EncounterDurationCondition, EncounterFactionBalanceCondition, EnemiesInRangeCondition, EnemiesInRangeHealthCondition, EnemiesInRangeWithEffectCondition, EntitiesInRangeHealthCondition, EntitiesInRangeWithEffectCondition, EntityDistanceToEntityCondition, EntityDistanceToInteractableCondition, EntityHasTagCondition, EquippedWeaponTypeCondition, HasCurrencyCondition, HasEffectCondition, HasEquippedCondition, HasItemCondition, HasTargetCondition, HealthPercentCondition, IsAliveCondition, IsLevelCondition, IsPlayerClassCondition, MetadataCondition, MovementStateCondition, ProficiencyCondition, QuestActiveEntityCondition, QuestCompletedEntityCondition, RandomChanceCondition, SwitchStateCondition, TargetDistanceBetweenCondition, TargetDistanceCondition, TargetIsPlayerCondition, TimeOfDayCondition, WearingArmorClassCondition, WorldPositionDistanceBetweenCondition, WorldPositionDistanceCondition

Base class for conditions that evaluate entity state. Can target different entities based on EntityTarget enum or specific entity ID.

Properties ​

EntityTargetentity_targetEntityTarget.ARGUMENT_ENTITY
inttarget_entity_id0

Methods ​

Entityget_target_entity( argument: Variant = null )
boolevaluate_entity( entity: Entity )
boolevaluate( argument: Variant = null )
Array[Player]get_party_members( argument: Variant = null )
Stringget_description()
Stringget_entity_description()
Stringget_entity_function_description()
Stringget_function_description()
boolis_valid()
Stringget_expected_argument_type()
voidcleanup()

Enumerations ​

enum EntityTarget ​

The options of entity target: argument entity, argument entity target, current player, any player, all player, summoner, unique id, opponent.

  • ARGUMENT_ENTITY = 0 - Use the entity passed as argument
  • ARGUMENT_ENTITY_TARGET = 1 - Use the argument entity's target
  • CURRENT_PLAYER = 2 - Use the current active player
  • ANY_PLAYER = 3 - True when the condition holds for at least one member of the party
  • ALL_PLAYER = 4 - True when the condition holds for every member of the party
  • SUMMONER = 5 - Use the argument entity's owner
  • UNIQUE_ID = 6 - Use entity with specific unique_id
  • OPPONENT = 7 - The other side of the hit being calculated (only for conditions on stat effects, see StatConditionContext)

Property descriptions ​

Entity Targeting

EntityTarget entity_target = EntityTarget.ARGUMENT_ENTITY ​

How to determine which entity to evaluate

int target_entity_id = 0 ​

Unique ID of entity to target (only used when entity_target is UNIQUE_ID)

Method descriptions ​

Entity get_target_entity( argument: Variant = null ) ​

Get the target entity based on the targeting settings @param argument: The argument passed to evaluate() - usually an Entity @return: The Entity to evaluate, or null if not found/invalid

bool evaluate_entity( entity: Entity ) ​

Override this in subclasses to implement entity-specific evaluation @param entity: The target entity to evaluate @return: true if condition is met for this entity

bool evaluate( argument: Variant = null ) ​

Final evaluate method that handles entity targeting and calls evaluate_entity Don't override this - override evaluate_entity instead

Array[Player] get_party_members( argument: Variant = null ) ​

The members of the party the condition is asked about (empty when there is no party yet)

String get_description() ​

Get description including entity targeting info

String get_entity_description() ​

Override this in subclasses to describe the specific entity condition

String get_entity_function_description() ​

Override this in subclasses to provide template for inline editing

String get_function_description() ​

Main function description method - includes targeting as part of inline template

bool is_valid() ​

Validate entity targeting configuration

String get_expected_argument_type() ​

The kind of thing the condition is checked against (an entity, an encounter ...).

void cleanup() ​

Cleanup any resources