# Toxin

Applies damage or status effects through toxin entries.

Place the object under `traits` in a fluid-property file.

## Fields

| Field | Meaning and default | Range |
| - | - | - |
| `entries` | Toxin effects dispatched by each entry's kind. | |
| `entries.kind` | direct_damage or effects. | |
| `entries.damage` | Damage-type ID for direct_damage. | |
| `entries.amount` | Base damage for direct_damage. | finite `f32` |
| `entries.delay` | Ticks between direct-damage applications; 0 applies every tick. | `i32` |
| `entries.effects` | Vanilla mob-effect instances for effects. | |
| `entries.hazard` (Optional) | Protection class that blocks the toxin. | |
| `entries.full_body` | Requires full-body protection when true. | |

> **until NTM 1.0.4**
>
> `hazard` takes an upper-case [protection class](https://movblock.mov/ntm-next/wiki/fluid-traits.md#value-names) such as `GAS_LUNG`. An entry without `hazard` cannot be blocked by protection.

> **since NTM 1.0.4**
>
> Every entry requires `hazard`, a lower-case [protection class](https://movblock.mov/ntm-next/wiki/fluid-traits.md#value-names) such as `gas_lung`.

## Example

From `data/hbm/fluid_property/chlorine.json`:

*NTM 1.0.0–1.0.3:*

```json
{
  "toxin": {
    "entries": [
      {
        "amount": 2.0,
        "damage": "hbm:cloud",
        "delay": 20,
        "full_body": false,
        "hazard": "GAS_LUNG",
        "kind": "direct_damage"
      }
    ]
  }
}
```

*NTM 1.0.4:*

```json
{
  "toxin": {
    "entries": [
      {
        "amount": 2.0,
        "damage": "hbm:cloud",
        "delay": 20,
        "full_body": false,
        "hazard": "gas_lung",
        "kind": "direct_damage"
      }
    ]
  }
}
```
