Expand description
Validate triggers, which are parts of the script that specify yes or no conditions.
Structs§
Enums§
- A part in a token chain
- A description of the constraints on the right-hand side of a given trigger. In other words, how it can be used.
Functions§
- Takes a
Trigger
and a trigger field, and validates that the constraints specified by theTrigger
hold. - Implementation of the
Trigger::Block
variant and its friends. It takes a list of known fields and their ownTrigger
validators, and checks that the givenblock
contains only fields from that list and validates them. - This function partitions the input token into parts separated by
.
. Each part may contain either a token or a token-argument pair when using the()
-syntax, e.g."prowess_diff(liege)"
. It does not validate the tokens or arguments, but simply parses and detects any syntactical errors. - Look up a trigger token that evaluates to a trigger value.
- This function checks if the trigger is one that can be used at the end of a scope chain on the right-hand side of a comparator.
- Validate that the argument passed through is valid, either being of a complex trigger compare value, or a scope prefix.
- Validate for scope and not trigger arguments
- Just like
validate_target_ok_this
, but warns if the target is a literalthis
because that is usually a mistake. - Validate that
token
is valid as the right-hand side of a field. - The standard interface to trigger validation. Validates a trigger in the given
ScopeContext
. - The interface to trigger validation when
validate_trigger
is too limited. - Validate a trigger given its key and argument. It is like
validate_trigger_internal
except that all special cases are assumed to have been handled. This is the interface used for theswitch
effect, where the key and argument are not together in the script. - Like
validate_trigger
but specifies a maximumSeverity
for the reports emitted by this validation. Used to validate triggers in item definitions that don’t warrant theError
level.