EncounterCondition ​
Inherits: Condition < Resource
Inherited by: CombatDurationCondition, DistanceFromPositionCondition, EncounterActiveStateCondition, EncounterCombatStateCondition, EncounterEntityCountCondition, GroupHealthPercentageCondition, GroupMembersAliveCondition, PlayersInAreaCondition
Base class for conditions that evaluate encounter state. Can target different encounters based on EncounterTarget enum or specific encounter ID.
Properties ​
EncounterTarget | encounter_target | EncounterTarget.ARGUMENT_ENCOUNTER |
String | encounter_id | "" |
Methods ​
EncounterGroup | get_target_encounter( argument: Variant = null ) |
bool | evaluate_encounter( encounter: EncounterGroup ) |
bool | evaluate( argument: Variant = null ) |
String | get_description() |
String | get_encounter_description() |
String | get_encounter_function_description() |
String | get_function_description() |
bool | is_valid() |
String | get_expected_argument_type() |
Array[Entity] | get_alive_group_members( encounter: EncounterGroup ) |
Array[Entity] | get_all_group_members( encounter: EncounterGroup ) |
Array[Entity] | get_combat_group_members( encounter: EncounterGroup ) |
Vector3 | get_encounter_center( encounter: EncounterGroup ) |
Enumerations ​
enum EncounterTarget ​
The options of encounter target: argument encounter, current active, nearest, unique id.
- ARGUMENT_ENCOUNTER =
0- Use the encounter passed as argument - CURRENT_ACTIVE =
1- Use the currently active encounter - NEAREST =
2- Use the encounter nearest to argument entity - UNIQUE_ID =
3- Use encounter with specific unique_id
Property descriptions ​
Encounter Targeting
EncounterTarget encounter_target = EncounterTarget.ARGUMENT_ENCOUNTER ​
How to determine which encounter to evaluate
String encounter_id = "" ​
Unique ID of encounter to target (only used when encounter_target is UNIQUE_ID)
Method descriptions ​
EncounterGroup get_target_encounter( argument: Variant = null ) ​
Get the target encounter based on the targeting settings @param argument: The argument passed to evaluate() - could be Encounter or Entity @return: The Encounter to evaluate, or null if not found/invalid
bool evaluate_encounter( encounter: EncounterGroup ) ​
Override this in subclasses to implement encounter-specific evaluation @param encounter: The target encounter to evaluate @return: true if condition is met for this encounter
bool evaluate( argument: Variant = null ) ​
Final evaluate method that handles encounter targeting and calls evaluate_encounter Don't override this - override evaluate_encounter instead
String get_description() ​
Get description including encounter targeting info
String get_encounter_description() ​
Override this in subclasses to describe the specific encounter condition
String get_encounter_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 encounter targeting configuration
String get_expected_argument_type() ​
The kind of thing the condition is checked against (an entity, an encounter ...).
Array[Entity] get_alive_group_members( encounter: EncounterGroup ) ​
Get all alive group members from the target encounter
Array[Entity] get_all_group_members( encounter: EncounterGroup ) ​
Get all group members (alive and dead) from the target encounter
Array[Entity] get_combat_group_members( encounter: EncounterGroup ) ​
Get group members currently in combat from the target encounter
Vector3 get_encounter_center( encounter: EncounterGroup ) ​
Get the encounter center position