Conditions are used to determine whether or not an action may execute.
Conditions are used to determine whether or not an action may execute.
...
@@ -13,8 +12,8 @@ When applying multiple conditions, all of them must be met in order for the skil
...
@@ -13,8 +12,8 @@ When applying multiple conditions, all of them must be met in order for the skil
To see how to use the premium only in-line conditions, [click here!](/skills/conditions/in-linetargetconditions)
To see how to use the premium only in-line conditions, [click here!](/skills/conditions/in-linetargetconditions)
Usage
-----
## Usage
### Types
### Types
...
@@ -32,19 +31,19 @@ Conditions can also be used in three different places within a meta skill:
...
@@ -32,19 +31,19 @@ Conditions can also be used in three different places within a meta skill:
3. TriggerConditions: Conditions in this section check the conditions of the entity that triggered the skill.
3. TriggerConditions: Conditions in this section check the conditions of the entity that triggered the skill.
### Examples
### Examples
```
```yaml
Conditions:
Conditions:
- globalscore{objective=Test;v=>10}
-globalscore{objective=Test;v=>10}
```
```
In the example above, the globalscore condition will check the caster's global score.
In the example above, the globalscore condition will check the caster's global score.
```
```yaml
TargetConditions:
TargetConditions:
-globalscore{objective=Test;v=>10}
-globalscore{objective=Test;v=>10}
```
```
The example above uses the exact same condition, but here the globalscore condition will check the inherited target's global score. Since globalscore is an entity condition, it will only work if an entity is targeted.
The example above uses the exact same condition, but here the globalscore condition will check the inherited target's global score. Since globalscore is an entity condition, it will only work if an entity is targeted.
**Format**:
**Format**:
```
```yaml
SkillName:
SkillName:
Conditions:
Conditions:
-condition [variable]
-condition [variable]
...
@@ -57,7 +56,7 @@ SkillName:
...
@@ -57,7 +56,7 @@ SkillName:
These new "actions" control how the skill acts when a condition is met
These new "actions" control how the skill acts when a condition is met
or not met. Here are some examples:
or not met. Here are some examples:
```
```yaml
YourAwesomeSkill:
YourAwesomeSkill:
Conditions:
Conditions:
-day required
-day required
...
@@ -70,7 +69,7 @@ YourAwesomeSkill:
...
@@ -70,7 +69,7 @@ YourAwesomeSkill:
```
```
**Ranged Values:**
**Ranged Values:**
Ranged values use either the format **#to#** or **#-#**. You must use "to" instead of "-" if you want to use negative numbers in the range. For:
Ranged values use either the format **#to#** or **#-#**. You must use "to" instead of "-" if you want to use negative numbers in the range. For:
```
```yaml
YourMagnificentSkill:
YourMagnificentSkill:
Conditions:
Conditions:
-altitude{a=1-5}
-altitude{a=1-5}
...
@@ -80,15 +79,8 @@ YourMagnificentSkill:
...
@@ -80,15 +79,8 @@ YourMagnificentSkill:
-distance{d=1to10} true
-distance{d=1to10} true
```
```
## Composite Conditions
Conditions can also be grouped by parenthesis and evaluated via the **AND** (`&&`) and **OR** (`||`) boolean operators.