Files
foundryvtt-reve-de-dragon/module/models/tache.mjs
T

27 lines
1.5 KiB
JavaScript

import { TEMPLATE_DESCRIPTION } from "../common/_module.mjs";
import { INTEGER, STRING } from "../common/field-types.mjs";
const fields = foundry.data.fields;
export default class RdDModelTache extends foundry.abstract.TypeDataModel {
static defineSchema() {
return Object.assign({},
TEMPLATE_DESCRIPTION.fields(),
{
carac: new fields.StringField({ label: "Caractéristique", initial: "", ...STRING }),
competence: new fields.StringField({ label: "Compétence", initial: "", ...STRING }),
periodicite: new fields.StringField({ label: "Périodicité", initial: "", ...STRING }),
fatigue: new fields.NumberField({ label: "Fatigue", initial: 1, ...INTEGER }),
difficulte: new fields.NumberField({ label: "Difficulté", initial: 0, ...INTEGER }),
points_de_tache: new fields.NumberField({ label: "Points de tâche", initial: 4, ...INTEGER }),
points_de_tache_courant: new fields.NumberField({ label: "Points de tâche courants", initial: 0, ...INTEGER }),
nb_jet_echec: new fields.NumberField({ label: "Échecs", initial: 0, ...INTEGER }),
nb_jet_succes: new fields.NumberField({ label: "Succès", initial: 0, ...INTEGER }),
cacher_points_de_tache: new fields.BooleanField({ label: "Cacher points de tâche", initial: false }),
itemId: new fields.StringField({ label: "ID d'item lié", initial: "", ...STRING }),
tacheCommuneId: new fields.StringField({ label: "ID tâche commune", initial: "", ...STRING }),
}
)
}
}