26 lines
892 B
JavaScript
26 lines
892 B
JavaScript
import { SYSTEM } from "../config/system.mjs"
|
|
export default class LethalFantasyArmor extends foundry.abstract.TypeDataModel {
|
|
static defineSchema() {
|
|
const fields = foundry.data.fields
|
|
const schema = {}
|
|
|
|
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
|
schema.category = new fields.StringField({ required: true, initial: "melee", choices: SYSTEM.ARMOR_CATEGORY })
|
|
schema.protection = new fields.StringField({
|
|
required: true,
|
|
initial: ""
|
|
})
|
|
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
|
schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY })
|
|
|
|
return schema
|
|
}
|
|
|
|
/** @override */
|
|
static LOCALIZATION_PREFIXES = ["LETHALFANTASY.Armor"]
|
|
|
|
get weaponCategory() {
|
|
return game.i18n.localize(CATEGORY[this.category].label)
|
|
}
|
|
}
|