Skip to content

TriggerRuleStatEffect ​

Inherits: StatEffect < Resource

A stat effect that changes how a trigger tag behaves for everything the entity does, from the stat's points: "+1 % crit damage per point of Critical Damage", "+0.1 % chance to every trigger per point of Luck", "cannot crit while this stat has points". The same thing an effect's TriggerRule does for one effect, but for the entity.

Description ​

One effect does one thing (bonus_kind); the number comes from the formula slots like any per-point effect. See docs/systems/entity-stats.md, section 24.1.

Properties ​

TriggerTagDefinitiontag
BonusKindbonus_kindBonusKind.MAGNITUDE_BONUS
RuleSideapplies_toRuleSide.OWNER
Array[int]target_calculations[]
TagKindFiltertag_kindTagKindFilter.ANY

Methods ​

EffectTypeget_effect_type()
Stringget_effect_category()
voidadd_to_rules( rules: TriggerRuleSet, stat_points: float, formula_context: FormulaContext = null )
intget_kind_filter()
Stringget_short_description()
Dictionaryget_preview_info( stat_points: float )
Stringget_tooltip_text( stat_points: float )
Array[Dictionary]validate()

Enumerations ​

enum TagKindFilter ​

The options of tag kind filter: any, avoid, mitigate, boost.

  • ANY = 0 - Every tag
  • AVOID = 1 - Dodge, parry, miss ...
  • MITIGATE = 2 - Block ...
  • BOOST = 3 - Critical strike ...

enum BonusKind ​

The options of bonus kind: chance bonus, magnitude bonus, magnitude more, force always, force never.

  • CHANCE_BONUS = 0 - Adds percentage points to the chance of the tag
  • MAGNITUDE_BONUS = 1 - Adds to the magnitude of the tag (crit: +1 per point = +1 % crit damage)
  • MAGNITUDE_MORE = 2 - Multiplies the magnitude: the value is a percentage (25 = 25 % more)
  • FORCE_ALWAYS = 3 - While the stat has points the tag always fires (no number needed)
  • FORCE_NEVER = 4 - While the stat has points the tag never fires (no number needed)

enum RuleSide ​

Whose rolls the rule changes

  • OWNER = 0 - The rolls of the entity that has the stat (its own critical strikes, its own dodges)
  • OPPONENT_ACTING_ON_ME = 1 - The rolls of whoever hits or heals the owner, in its own hit or heal phase: lower crit chance against me, a bigger chance to miss me (defense, resilience)
  • OPPONENT_DEFENDING_AGAINST_ME = 2 - The rolls of whoever the owner hits, in its defending phase: a smaller chance to dodge or block my hits (expertise)

Property descriptions ​

Trigger Rule

TriggerTagDefinition tag ​

The tag the rule is about. Empty = every tag (not allowed with FORCE_ALWAYS)

BonusKind bonus_kind = BonusKind.MAGNITUDE_BONUS ​

What the stat gives the tag: a chance bonus, a magnitude bonus, a magnitude multiplier, or forcing it always or never

RuleSide applies_to = RuleSide.OWNER ​

Whose rolls it changes: the owner's own, or the opponent's (when it acts on the owner, or when it defends against the owner)

Array[int] target_calculations = [] ​

The calculations the rule works in (CalculationBase.CalculationType numbers: 0 damage done, 1 damage taken, 2 healing done, 3 healing taken). Empty = all of them. Lower your own chance to miss in damage done only, so your own dodges stay as they are

TagKindFilter tag_kind = TagKindFilter.ANY ​

With no tag chosen: only the tags of this kind (all avoid tags: dodge, parry, miss; all mitigate tags; all boost tags). Any = every tag

Method descriptions ​

EffectType get_effect_type() ​

========== EFFECT IDENTIFICATION ==========

String get_effect_category() ​

The group of the effect in the editor.

void add_to_rules( rules: TriggerRuleSet, stat_points: float, formula_context: FormulaContext = null ) ​

Adds what this effect gives for stat_points to the rule set of a phase

int get_kind_filter() ​

The TriggerRecord.Kind the rule is limited to when it names no tag (-1 = every kind)

String get_short_description() ​

A one line text about what the effect does.

Dictionary get_preview_info( stat_points: float ) ​

What the effect gives for a number of stat points, for the tooltip and the editor preview.

String get_tooltip_text( stat_points: float ) ​

The tooltip text of the effect for a number of stat points.

Array[Dictionary] validate() ​

========== VALIDATION ==========