Skip to main content
A condition is a yes/no question about an entity or a place: is it night, is the player holding a bow, are there fewer than five minions left. The same conditions work everywhere a question can be asked: The entity being asked about is the subject. Place questions (isBiome, lightLevel) ask about the subject’s position, or about the spot itself when there is no entity, as in a spawn rule.

Writing one

A condition is a name, optionally with options in braces: isNight, health{h=<50}, mobsInRadius{r=24;a=1to5;types=crypt_minion}. Names are case-insensitive and every MythicMobs name and alias is understood. Ranges take MythicMobs’ shapes: >5, >=2, <10, <=3, 1to10, an exact 4, and percentages where they make sense: healthpercent{p=<50%}.

Combining them

In cond= and cond:, conditions combine like code:
  • && (and) binds tighter than || (or). ! negates, (…) groups.
  • Comparisons: >= <= > < == !=, between numbers, variables (var.x, target.var.x, global.var.x, world.var.x, skill.var.x), and the keywords random (a fresh 0–1 roll), health and maxhealth (the caster’s), time (world ticks since creation), plus the place numbers light, blocklight, skylight, y, daytime, moonphase and spawndistance.
  • Two numbers compare as numbers; anything else compares as case-insensitive text with == and != only. An unset variable counts as 0 or empty.
  • A lone value with no comparison is true when it is set and not zero: if{cond=var.enraged;then=…}.
Quote a condition that starts with !. YAML reads a leading ! as a tag: - "!raining".

Lists

A conditions: list must all pass. MythicMobs’ list syntax works as written, with an action after each entry saying what to do with the answer:

Gating a skill

A skill written as a section takes a gate, checked against the caster before anything runs:
  • The gate applies however the skill is called: skill, an if or loop body, repeat, an aura, the addon API.
  • conditions-else names a skill to run instead. Chains are followed up to 8 deep, so two skills naming each other can’t loop forever.
  • A gate that doesn’t parse is reported by /le debug and dropped, so the skill still runs. A silently disabled ability is harder to trace than one that fires when it shouldn’t.

Every condition

All MythicMobs conditions plus a few of LodeEntities’ own (moving, isBiome, isWorldType, isSpawnable and the other place checks). Where the example shows an option, that is the main one; the MythicMobs aliases for it work too.

Time and weather

Place

The subject

State

Caster and target

These compare the caster with the subject.

Counts

The event

Items

Variables

Server

Region and claim conditions need WorldGuard or GriefPrevention; without the plugin they answer “no”. Addons can register more conditions; see Extending the Effect Language.