TriggerRuleSet ​
Inherits: RefCounted
The trigger rules in force for one calculation phase of one hit, from the effect's rules and from stat effects (TriggerRuleStatEffect). Answers, per tag: is it forbidden or forced, how much chance does it gain, what is its magnitude. See docs/systems/entity-stats.md, section 24.1.
Methods ​
void | add_rule( rule: TriggerRule ) |
void | add_values( definition: TriggerTagDefinition, never: bool, always: bool, chance_bonus: float, magnitude_bonus: float, magnitude_multiplier: float, kind_filter: int = -1 ) |
bool | is_empty() |
bool | is_never( tag: String, kind: int = -1 ) |
bool | is_always( tag: String, kind: int = -1 ) |
float | chance_bonus( tag: String, kind: int = -1 ) |
float | magnitude( tag: String, base_magnitude: float, kind: int = -1 ) |
Array[TriggerTagDefinition] | forced_definitions() |
Method descriptions ​
void add_rule( rule: TriggerRule ) ​
Adds a TriggerRule (a rule on the effect)
void add_values( definition: TriggerTagDefinition, never: bool, always: bool, chance_bonus: float, magnitude_bonus: float, magnitude_multiplier: float, kind_filter: int = -1 ) ​
Adds raw values for a tag (null definition = every tag). Used by stat effects too
bool is_empty() ​
Does the set have no rules?
bool is_never( tag: String, kind: int = -1 ) ​
Is the tag forbidden? ("never" beats "always")
bool is_always( tag: String, kind: int = -1 ) ​
Is the tag forced (and not forbidden)?
float chance_bonus( tag: String, kind: int = -1 ) ​
Percentage points added to the chance of the tag
float magnitude( tag: String, base_magnitude: float, kind: int = -1 ) ​
The magnitude of the tag: (base + all bonuses) x all multipliers
Array[TriggerTagDefinition] forced_definitions() ​
The definitions of the tags a rule forces (so they can be created for an entity that has no stat rolling them)