Various fixes and add rune support
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
import { CLASS_RESTRICTION_CHOICES, SYSTEM } from "../config/system.mjs"
|
||||
|
||||
export default class OathHammerArmor extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
@@ -39,7 +39,10 @@ export default class OathHammerArmor extends foundry.abstract.TypeDataModel {
|
||||
schema.isCursed = new fields.BooleanField({ initial: false })
|
||||
schema.magicEffect = new fields.HTMLField({ required: false, textSearch: true })
|
||||
// Class/lineage restriction, e.g. "Dwarves only" (empty = no restriction)
|
||||
schema.classRestriction = new fields.StringField({ required: true, nullable: false, initial: "" })
|
||||
schema.classRestriction = new fields.StringField({ required: false, nullable: true, initial: null, choices: CLASS_RESTRICTION_CHOICES })
|
||||
|
||||
// Attached runic spells (max 2; each is a snapshot of the spell item)
|
||||
schema.runes = new fields.ArrayField(new fields.ObjectField(), { required: true, initial: [] })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user