dnd5e
dnd5e copied to clipboard
Add additional enchantment restrictions
Currently the only restrictions on enchantments are whether the item is magical and what broad item type it is (e.g. weapon, equipment). There are a number of enchantments which have more specific restrictions:
- Specific sub-type (e.g. only martial weapons, only shields)
- Has a certain property (e.g. only weapons with the Ammunition or Thrown properties)
allowing also to filter on system.type and system.subtype even on damage types could be interesting.
To allow further custom filtering, a hook call could also be added. It could allow to extend the canEnchant method from EnchantmentField https://github.com/foundryvtt/dnd5e/blob/1449db20b7acd0b45ef49c54e2c00c9828493156/module/data/item/fields/enchantment-field.mjs#L175