Skip to content

Commit

Permalink
Update MAGIC.md (#76493)
Browse files Browse the repository at this point in the history
* Update MAGIC.md

* Update MAGIC.md
  • Loading branch information
RedMisao authored Sep 17, 2024
1 parent aae02aa commit 4d695c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/MAGIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,13 +632,16 @@ Identifier | Description
`mutations` | Grants the mutation/trait ID. Note: enchantments effects added this way won't stack, due how mutations work.
`ench_effects` | Grants the effect_id. Requires the `intensity` for the effect.

All fields except for `type` and `id` are optional. This includes the otherwise obligatory `name` and `description`. If a name and description are set, they will be displayed in the EFFECTS tab.

There are two possible syntaxes. The first is by defining an enchantment object and then referencing the ID, the second is by directly defining the effects as an inline enchantment of something (in this case, an item):
There are two possible syntaxes. The first is by defining an enchantment object and then referencing the ID, the second is by directly defining the inline enchantment inside something (in this case, an item):

```json
{
"type": "enchantment",
"id": "ENCH_INVISIBILITY",
"name": { "str": "Invisibility" },
"description": "You are invisible. Just that.",
"condition": "ALWAYS",
"has": "WIELD",
"hit_you_effect": [ { "id": "AEA_FIREBALL", "hit_self": true, "once_in": 12 } ],
Expand All @@ -661,7 +664,6 @@ There are two possible syntaxes. The first is by defining an enchantment object
}
}
```
Note: all fields except for `type` and `id` are optional.

```json
{
Expand All @@ -675,7 +677,6 @@ Note: all fields except for `type` and `id` are optional.
}
```


### The `relic_data` field

As seen in the last example, enchantments are added to the item as `passive_effects` inside the `relic_data` field. Items with this data are turned into a relic or artifact, being displayed as magenta inside the inventory view.
Expand Down

0 comments on commit 4d695c2

Please sign in to comment.