/** * Chroniques de l'Étrange — Système FoundryVTT * * Chroniques de l'Étrange est un jeu de rôle édité par Antre-Monde Éditions. * Ce système FoundryVTT est une implémentation indépendante et n'est pas * affilié à Antre-Monde Éditions, * mais a été réalisé avec l'autorisation d'Antre-Monde Éditions. * * @author LeRatierBretonnien * @copyright 2024–2026 LeRatierBretonnien * @license CC BY-NC-SA 4.0 – https://creativecommons.org/licenses/by-nc-sa/4.0/ */ export default class KungfuDataModel extends foundry.abstract.TypeDataModel { static defineSchema() { const { fields } = foundry.data const stringField = (initial = "") => new fields.StringField({ required: true, nullable: false, initial }) const htmlField = (initial = "") => new fields.HTMLField({ required: true, nullable: false, initial, textSearch: true }) const boolField = (initial = false) => new fields.BooleanField({ required: true, initial }) const techniqueField = () => new fields.SchemaField({ check: boolField(false), name: stringField(""), activation: stringField("action-attack"), // action-attack | action-defense | action-aid | action-attack-defense | reaction | dice | damage-inflicted | damage-received technique: htmlField(""), }) return { reference: stringField(""), description: htmlField(""), orientation: stringField("yin"), // yin | yang | yinyang aspect: stringField("metal"), // metal | water | earth | fire | wood skill: stringField("kungfu"), // kungfu | rangedcombat speciality: stringField(""), style: stringField(""), techniques: new fields.SchemaField({ technique1: techniqueField(), technique2: techniqueField(), technique3: techniqueField(), }), notes: htmlField(""), } } }