๐งโโ๏ธ Enemy Schema
Defines enemy types, behaviors, and interactions with the player or world.
โ Field Rules & Accepted Values
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | โ Yes | Unique ID (e.g., 'slime_01') |
| name | string | โ Yes | UI display name |
| health | number | โ Yes | Total HP |
| damage | number | โ Yes | Damage dealt to player |
| speed | number | โ No | Default is 1.0 |
| sprite | string | โ Yes | Path to sprite asset |
| aiType | string | โ Yes | Built-in or custom AI logic |
| abilities | string[] | โ No | Ability IDs used by enemy |
| levelId | number | โ No | Optional level restriction |
| boss | boolean | โ No | Enables boss logic and UI |
| phases | number | โ No | Number of phases (boss only) |
| phaseTriggers | string[] | โ No | E.g., health_below_50, time_elapsed_30 |
| spawnIf | object | โ No | Conditional spawn logic |
| statusImmunities | string[] | โ No | E.g., ['freeze', 'poison'] |
| onDeath | string | โ No | Trigger/event ID on death |
| onHit | string | โ No | Trigger/event on hit |
| onAttack | string | โ No | Trigger/event on attack |
| sound | object | โ No | Sound effects for actions |
| drops | string[] | โ No | Token/item IDs dropped on death |