Initial import with skill sheet worning
This commit is contained in:
@ -1,34 +1,25 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
import { CATEGORY } from "../config/armor.mjs"
|
||||
|
||||
export default class LethalFantasyArmor extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields
|
||||
const requiredInteger = { required: true, nullable: false, integer: true }
|
||||
const schema = {}
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
schema.categorie = new fields.StringField({ required: true, initial: "sommaire", choices: SYSTEM.ARMOR_CATEGORY })
|
||||
|
||||
schema.valeur = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
|
||||
schema.malus = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
|
||||
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 = ["TENEBRIS.Armor"]
|
||||
static LOCALIZATION_PREFIXES = ["LETHALFANTASY.Armor"]
|
||||
|
||||
get armorCategory() {
|
||||
return game.i18n.localize(CATEGORY[this.categorie].label)
|
||||
}
|
||||
|
||||
get details() {
|
||||
return game.i18n.format("TENEBRIS.Armor.details", {
|
||||
valeur: this.valeur,
|
||||
malus: this.malus,
|
||||
})
|
||||
get weaponCategory() {
|
||||
return game.i18n.localize(CATEGORY[this.category].label)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user