Skip to content

TriggerRecord ​

Inherits: RefCounted

One trigger (dodge, block, critical strike ...) that fired during a calculation phase of a hit.

Description ​

Carries what every consumer of a DamageResult / HealingResult needs: the tag that procs and modifiers filter on, what kind of trigger it was, and the presentation data authored on the trigger (animation, floating text, combat log phrase). See docs/systems/entity-stats.md, section 17.

Variables ​

intstat_id0
Stringstat_name""
Stringtag""
KindkindKind.NONE
Stringanimation""
Stringmessage""
Stringphrase""
floatmagnitude0.0
intapplication0
intapplication_priority0
Stringslot_name""
boolhas_voicefalse
boolhas_animationfalse
boolanimation_by_weaponfalse
PackedStringArrayslot_chainPackedStringArray()
SFXSelectionsound

Methods ​

TriggerRecordcreate( p_stat_id: int, p_stat_name: String, p_tag: String, p_kind: Kind = Kind.NONE, p_animation: String = "", p_message: String = "", p_phrase: String = "", p_magnitude: float = 0.0 ) static
boolis_avoid()
boolis_mitigate()
boolis_boost()

Enumerations ​

enum Kind ​

The options of kind: none, avoid, mitigate, boost.

  • NONE = 0 - Tag only: sets the tag for paired modifiers, no outcome of its own
  • AVOID = 1 - Avoids the hit completely (dodge, parry)
  • MITIGATE = 2 - Reduces the hit through paired modifiers (block)
  • BOOST = 3 - Increases the hit through paired modifiers (critical strike)

Variable descriptions ​

int stat_id = 0 ​

Id of the stat that owns the trigger

String stat_name = "" ​

The stat whose trigger fired.

String tag = "" ​

The word modifiers require and procs filter on, e.g. "dodge"

Kind kind = Kind.NONE ​

What kind of trigger it was (dodge, block, critical ...).

String animation = "" ​

Animation authored on the trigger: "", "Hit", "Dodge" or "Block"

String message = "" ​

Floating text authored on the trigger

String phrase = "" ​

Combat log phrase template ({attacker} {target} {ability} {damage}); empty = the default for the kind

float magnitude = 0.0 ​

What the tag carries (critical strike: the multiplier in percent, multistrike: the extra hits). See TriggerTagDefinition

int application = 0 ​

How the magnitude changes the number in the phase where the tag fired (TriggerTagDefinition.Application, 0 = it does not)

int application_priority = 0 ​

Where in the modifier order that happens (higher first, like a modifier's processing priority)

String slot_name = "" ​

The slot of the trigger (TriggerTagDefinition.get_slot_name), "" for a trigger that has none

bool has_voice = false ​

The creature makes the voice call of the slot when it fires

bool has_animation = false ​

The creature plays the animation of the slot when it fires, and the slots to try (the slot, then the ones it falls back to)

bool animation_by_weapon = false ​

No description yet.

PackedStringArray slot_chain = PackedStringArray() ​

No description yet.

SFXSelection sound ​

A sound played at the target when it fires

Method descriptions ​

TriggerRecord create( p_stat_id: int, p_stat_name: String, p_tag: String, p_kind: Kind = Kind.NONE, p_animation: String = "", p_message: String = "", p_phrase: String = "", p_magnitude: float = 0.0 ) ​

A record of a trigger that fired: the stat that rolled it (0 when it was forced), the tag, the kind, the animation and message to show, the combat log phrase and the magnitude

bool is_avoid() ​

Is this an avoid trigger (dodge, parry)?

bool is_mitigate() ​

Is this a mitigate trigger (block)?

bool is_boost() ​

Is this a boost trigger (critical strike)?