> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Standard Conditions

> Filter skills based on health, location, environment, and entity states.

# Standard Conditions

Conditions allow you to control **WHEN** a skill should execute. They are used in the `conditions:` block of a skill.

## Health & Stats

### `health` / `hp`

Checks the target's current health.

* **Attributes:**
  * `amount` / `value` (number): The health threshold.
  * `operator` (string): `>=`, `<=`, `==`, etc. (Default: `>=`)

```yaml theme={null}
- skill{s=Enrage} @self ~onDamaged
  conditions:
  - health{amount=20;operator="<"}
```

### `mana` / `mp`

Checks the target's current mana (requires supported mana system).

### `threat`

Checks the threat level of the target on the mob's threat table.

***

## Environmental Conditions

### `distance`

Checks the distance between two entities or locations.

* **Attributes:**
  * `from` (string): Source entity (default: `caster`).
  * `to` (string): Target entity.
  * `within` / `max` (number): Maximum distance.

```yaml theme={null}
- damage{amount=10} @target
  conditions:
  - distance{within=5}
```

### `height` / `altitude`

Checks the Y-level or height relative to the ground.

| Condition    | Description                                    |
| :----------- | :--------------------------------------------- |
| `biome`      | Checks the biome at the target location.       |
| `weather`    | Checks if it is raining, clear, or thundering. |
| `time`       | Checks the world time (e.g., `NIGHT`).         |
| `lightlevel` | Checks the light level at the target (0-15).   |

***

## Entity States

### `stance`

Checks the physical stance of the entity.

* **Values:** `crouching`, `sprinting`, `swimming`, `gliding`, `sleeping`, `standing`.

### `holding` / `holdingitem`

Checks the item in the entity's main or off-hand.

* **Attributes:**
  * `material` / `type` (string): The item type.

### `wearing`

Checks if the entity is wearing specific armor.

* **Attributes:**
  * `slot` (string): `HELMET`, `CHESTPLATE`, `LEGGINGS`, `BOOTS`.

***

## World & Interaction

### `lineofsight` / `los`

Checks if there is a clear line of sight between caster and target.

### `inregion`

Checks if the target is within a WorldGuard region.

* **Attributes:**
  * `region` / `id` (string): The region name.

### `alliesalive`

Checks the number of living allies within a radius.
