26 lines
1.1 KiB
JavaScript
26 lines
1.1 KiB
JavaScript
import { TEMPLATE_DESCRIPTION } from "../common/_module.mjs";
|
|
import { TEMPLATE_TEMPOREL } from "../common/_module.mjs";
|
|
import { INTEGER, MODEL_ARRAY, STRING } from "../common/field-types.mjs";
|
|
|
|
const fields = foundry.data.fields;
|
|
|
|
export default class RdDModelSigneDraconique extends foundry.abstract.TypeDataModel {
|
|
static defineSchema() {
|
|
return Object.assign({},
|
|
TEMPLATE_DESCRIPTION.fields(),
|
|
TEMPLATE_TEMPOREL.fields(),
|
|
{
|
|
typesTMR: new fields.ArrayField(new fields.StringField({}), { ...MODEL_ARRAY }),
|
|
ephemere: new fields.BooleanField({ label: "Éphémère", initial: true }),
|
|
duree: new fields.StringField({ label: "Durée", initial: "1 round", ...STRING }),
|
|
difficulte: new fields.NumberField({ label: "Difficulté", initial: 0, ...INTEGER }),
|
|
valeur: new fields.SchemaField({
|
|
norm: new fields.NumberField({ label: "Normal", initial: 3, ...INTEGER }),
|
|
sign: new fields.NumberField({ label: "Significatif", initial: 5, ...INTEGER }),
|
|
part: new fields.NumberField({ label: "Particulier", initial: 10, ...INTEGER }),
|
|
}),
|
|
}
|
|
)
|
|
}
|
|
}
|