Expressions
Operators
Operator | Description |
---|---|
|
Addition of numerical values. |
|
Subtraction of numerical values. |
|
Multiplication of numerical values. |
|
Division of numerical values. |
Operator | Description |
---|---|
|
Compares if the left operand is smaller than the right operand. |
|
Compares if the left operand is smaller than or equal to the right operand. |
|
Compares if the left operand is bigger than the right operand. |
|
Compares if the left operand is bigger than or equal to the right operand. |
|
Compares if the left operand is equal to the right operand. |
Variables
Name | Description |
---|---|
|
The current player count in the party. |
|
The current scenario level selected on the level chart. |
|
The current monster level according to the scenario level chart. |
|
The current trap damage according to the scenario level chart. |
|
The current hazardous terrain damage according to the scenario level chart. |
|
The current gold bonus according to the scenario level chart. |
|
The current experience bonus according to the scenario level chart. |
For expressions on monster stats it’s also possible to reference the current value of the stat, e.g. in order to increase it by 1.
This is done by using the variable stat.
followed by the name of the stat, e.g.:
stats: {
shield: "stats.shield + 1",
retaliate: 2,
}
The name oft the variable implies that other stats can also be referenced (e.g. to set the attack value +1 of the movement value). This is also intended in the future but currently not possible. For now only the stat with the same name as the one being changed can be referenced. |
Functions
Functions can be used in expression by writing their name and a pair of parentheses.
Inside the parentheses the list of arguments are listed, separated by ,
.
The following functions are available for expressions:
Name | Description |
---|---|
|
Returns the maximum of two values. |
|
Returns the minimum of two values. |
|
Rounds the given number to the nearest integer. Rounds to the lower integer if the decimal value is .5. |
|
Rounds the given number to the nearest integer. Rounds to the higher integer if the decimal value is .5. |