Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 136
    • Issues 136
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Skills
  • Conditions

Conditions · Changes

Page history
clarified the usage of condition actions inside composite conditions authored Oct 05, 2023 by Lxlp's avatar Lxlp
Hide whitespace changes
Inline Side-by-side
Showing with 25 additions and 20 deletions
+25 -20
  • Skills/Conditions.md Skills/Conditions.md +25 -20
  • No files found.
Skills/Conditions.md
View page @ e1eee5b6
Introduction ## Introduction
------------
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.
```yaml
Conditions:
- ((night || raining) && onBlock{material=LIME_CONCRETE}) true
```
Condition Actions ## Condition Actions
-----------------
Condition Actions allow you to do additional things based off of conditions. The default condition action is **true** Condition Actions allow you to do additional things based off of conditions. The default condition action is **true**
...@@ -101,6 +93,19 @@ Condition Actions allow you to do additional things based off of conditions. The ...@@ -101,6 +93,19 @@ Condition Actions allow you to do additional things based off of conditions. The
| **castinstead [skill]** | Casts a different skill instead if the condition is met. | | **castinstead [skill]** | Casts a different skill instead if the condition is met. |
| **orElseCast [skill]** | Casts a different skill instead if the condition is not met. (4.12 MM) | | **orElseCast [skill]** | Casts a different skill instead if the condition is not met. (4.12 MM) |
## Composite Conditions
Conditions can also be grouped by parenthesis and evaluated via the **AND** (`&&`) and **OR** (`||`) boolean operators.
Conditions used this way can still have a condition action.
```yaml
Conditions:
- ((day false || raining true) && onBlock{material=LIME_CONCRETE}) true
```
> The condition is met when it's either raining or not daytime, and, in addition to that, only when the caster is on a LIME_CONCRETE block
> The day and raining have their condition action declared, while onBlock uses the default one, `true`
Conditions Conditions
---------- ----------
......
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Mythic Add-ons
Compatible Plugins
API Information
Packs
Mobs
  • Mob Options
  • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Effects
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
  • Math
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drop Types
Spawning
  • Spawners
  • Random Spawns
Examples
Useful Tips