25 lines
1.4 KiB
JavaScript
25 lines
1.4 KiB
JavaScript
import { TEMPLATE_DESCRIPTION } from "../common/_module.mjs";
|
|
import { INTEGER, INTEGER_SIGNED, STRING } from "../common/field-types.mjs";
|
|
|
|
const fields = foundry.data.fields;
|
|
|
|
export default class RdDModelCompetenceCreature extends foundry.abstract.TypeDataModel {
|
|
static defineSchema() {
|
|
return Object.assign({},
|
|
TEMPLATE_DESCRIPTION.fields(),
|
|
{
|
|
carac_value: new fields.NumberField({ label: "Valeur de caractéristique", initial: 0, ...INTEGER }),
|
|
niveau: new fields.NumberField({ label: "Niveau", initial: 0, ...INTEGER_SIGNED, min: -11 }),
|
|
default_diffLibre: new fields.NumberField({ label: "Difficulté libre par défaut", initial: 0, ...INTEGER_SIGNED, min: -10, max: 0 }),
|
|
categorie: new fields.StringField({ label: "Catégorie", initial: "", ...STRING }),
|
|
categorie_parade: new fields.StringField({ label: "Catégorie de parade", initial: "", ...STRING }),
|
|
iscombat: new fields.BooleanField({ label: "Combat", initial: false }),
|
|
isnaturelle: new fields.BooleanField({ label: "Naturelle", initial: true }),
|
|
ispossession: new fields.BooleanField({ label: "Possession", initial: false }),
|
|
dommages: new fields.NumberField({ label: "Dégâts", initial: 0, ...INTEGER }),
|
|
mortalite: new fields.StringField({ label: "Mortalité", initial: "mortel", ...STRING }),
|
|
}
|
|
)
|
|
}
|
|
}
|