diff --git a/module/actor-creature-sheet.js b/module/actor-creature-sheet.js index fbced05f..acfd115f 100644 --- a/module/actor-creature-sheet.js +++ b/module/actor-creature-sheet.js @@ -1,14 +1,9 @@ +import { RdDActorSheet } from "./actor-sheet.js"; /** * Extend the basic ActorSheet with some very simple modifications * @extends {ActorSheet} */ - -import { RdDUtility } from "./rdd-utility.js"; -import { RdDActorSheet } from "./actor-sheet.js"; -import { RdDCarac } from "./rdd-carac.js"; - -/* -------------------------------------------- */ export class RdDActorCreatureSheet extends RdDActorSheet { /** @override */ @@ -19,7 +14,7 @@ export class RdDActorCreatureSheet extends RdDActorSheet { width: 640, height: 720, tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }], - dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }] + dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }] }); } diff --git a/module/actor-entite-sheet.js b/module/actor-entite-sheet.js index 4ab81798..42577475 100644 --- a/module/actor-entite-sheet.js +++ b/module/actor-entite-sheet.js @@ -1,6 +1,4 @@ import { RdDActorSheet } from "./actor-sheet.js"; -import { HtmlUtility } from "./html-utility.js"; -import { RdDUtility } from "./rdd-utility.js"; export class RdDActorEntiteSheet extends RdDActorSheet { @@ -12,7 +10,7 @@ export class RdDActorEntiteSheet extends RdDActorSheet { width: 640, height: 720, tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac"}], - dragDrop: [{dragSelector: ".item-list .item", dropSelector: null}] + dragDrop: [{dragSelector: ".item-list .item", dropSelector: undefined}] }); } diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 9aed24be..61f17d1e 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -1,8 +1,3 @@ -/** - * Extend the basic ActorSheet with some very simple modifications - * @extends {ActorSheet} - */ - import { RdDUtility } from "./rdd-utility.js"; import { HtmlUtility } from "./html-utility.js"; import { RdDItemArme } from "./item-arme.js"; @@ -18,6 +13,10 @@ import { RdDSheetUtility } from "./rdd-sheet-utility.js"; import { STATUSES } from "./status-effects.js"; /* -------------------------------------------- */ +/** + * Extend the basic ActorSheet with some very simple modifications + * @extends {ActorSheet} + */ export class RdDActorSheet extends ActorSheet { /** @override */ @@ -28,7 +27,7 @@ export class RdDActorSheet extends ActorSheet { template: "systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html", width: 640, tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }], - dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }], + dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }], showCompNiveauBase: false, vueDetaillee: false }); diff --git a/module/actor-vehicule-sheet.js b/module/actor-vehicule-sheet.js index aa7df7c3..2729f2af 100644 --- a/module/actor-vehicule-sheet.js +++ b/module/actor-vehicule-sheet.js @@ -1,5 +1,4 @@ import { RdDUtility } from "./rdd-utility.js"; -import { RdDSheetUtility } from "./rdd-sheet-utility.js"; import { RdDActorSheet } from "./actor-sheet.js"; /* -------------------------------------------- */ @@ -15,7 +14,7 @@ export class RdDActorVehiculeSheet extends RdDActorSheet { width: 640, height: 720, tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }], - dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }] + dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }] }); } diff --git a/module/actor.js b/module/actor.js index 6d41ab33..4017a9e3 100644 --- a/module/actor.js +++ b/module/actor.js @@ -56,6 +56,7 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ static init() { Hooks.on("preUpdateItem", (item, change, options, id) => RdDActor.getParentActor(item)?.onPreUpdateItem(item, change, options, id)); + // TODO: replace with pre-hooks? Hooks.on("createItem", (item, options, id) => RdDActor.getParentActor(item)?.onCreateItem(item, options, id)); Hooks.on("deleteItem", (item, options, id) => RdDActor.getParentActor(item)?.onDeleteItem(item, options, id)); Hooks.on("updateActor", (actor, change, options, actorId) => actor.onUpdateActor(change, options, actorId)); diff --git a/module/dialog-chronologie.js b/module/dialog-chronologie.js index 7b780d1b..0e84e358 100644 --- a/module/dialog-chronologie.js +++ b/module/dialog-chronologie.js @@ -6,7 +6,7 @@ const LATEST_USED_JOURNAL_ID = "chronologie-dernier-journal"; export class DialogChronologie extends Dialog { - static onInit() { + static init() { game.settings.register(SYSTEM_RDD, LATEST_USED_JOURNAL_ID, { name: "Dernier article de journal utilisé pour enregistrer la chronologie", scope: "client", diff --git a/module/item-sheet.js b/module/item-sheet.js index 4c23b1ba..bd81e568 100644 --- a/module/item-sheet.js +++ b/module/item-sheet.js @@ -4,7 +4,6 @@ import { RdDAlchimie } from "./rdd-alchimie.js"; import { RdDItemCompetence } from "./item-competence.js"; import { RdDHerbes } from "./rdd-herbes.js"; import { RdDGemme } from "./rdd-gemme.js"; -import { Misc } from "./misc.js"; import { HtmlUtility } from "./html-utility.js"; import { ReglesOptionelles } from "./regles-optionelles.js"; import { SYSTEM_RDD } from "./constants.js"; @@ -67,8 +66,6 @@ export class RdDItemSheet extends ItemSheet { img: this.item.img, name: this.item.name, system: this.item.system, - // TODO: v10 remove - data: this.item.system, isGM: game.user.isGM, actorId: this.actor?.id, owner: this.item.isOwner, diff --git a/module/item.js b/module/item.js index 0652d11c..e3ab374b 100644 --- a/module/item.js +++ b/module/item.js @@ -301,8 +301,7 @@ export class RdDItem extends Item { async postItem(modeOverride) { console.log(this); let chatData = duplicate(this); - const properties = this.getProprietes(); - chatData["properties"] = properties + chatData["properties"] = this.getProprietes(); if (this.actor) { chatData.actor = { id: this.actor.id }; } @@ -325,254 +324,204 @@ export class RdDItem extends Item { /* -------------------------------------------- */ _objetChatData() { - const tplData = this.system - let properties = [].concat( - RdDItem.propertyIfDefined('Résistance', tplData.resistance, tplData.resistance), - RdDItem.propertyIfDefined('Qualité', tplData.qualite, tplData.qualite), - RdDItem.propertyIfDefined('Encombrement', tplData.encombrement), + return [].concat( + RdDItem.propertyIfDefined('Résistance', this.system.resistance, this.system.resistance), + RdDItem.propertyIfDefined('Qualité', this.system.qualite, this.system.qualite), + RdDItem.propertyIfDefined('Encombrement', this.system.encombrement), ); - return properties; } /* -------------------------------------------- */ _nourritureboissonChatData() { - const tplData = this.system - let properties = [].concat( - RdDItem.propertyIfDefined('Sustentation', tplData.sust, tplData.sust > 0), - RdDItem.propertyIfDefined('Désaltère', tplData.desaltere, tplData.boisson), - RdDItem.propertyIfDefined('Force alcool', tplData.force, tplData.boisson && tplData.alcoolise), - RdDItem.propertyIfDefined('Exotisme', tplData.exotisme, tplData.exotisme < 0), - RdDItem.propertyIfDefined('Qualité', tplData.qualite, tplData.qualite), - RdDItem.propertyIfDefined('Encombrement', tplData.encombrement), + return [].concat( + RdDItem.propertyIfDefined('Sustentation', this.system.sust, this.system.sust > 0), + RdDItem.propertyIfDefined('Désaltère', this.system.desaltere, this.system.boisson), + RdDItem.propertyIfDefined('Force alcool', this.system.force, this.system.boisson && this.system.alcoolise), + RdDItem.propertyIfDefined('Exotisme', this.system.exotisme, this.system.exotisme < 0), + RdDItem.propertyIfDefined('Qualité', this.system.qualite, this.system.qualite), + RdDItem.propertyIfDefined('Encombrement', this.system.encombrement), ); - return properties; } /* -------------------------------------------- */ _armeChatData() { - const tplData = this.system - let properties = [ - `Compétence: ${tplData.competence}`, - `Dommages: ${tplData.dommages}`, - `Force minimum: ${tplData.force}`, - `Resistance: ${tplData.resistance}`, - `Encombrement: ${tplData.encombrement}` + return [ + `Compétence: ${this.system.competence}`, + `Dommages: ${this.system.dommages}`, + `Force minimum: ${this.system.force}`, + `Resistance: ${this.system.resistance}`, + `Encombrement: ${this.system.encombrement}` ] - return properties; } /* -------------------------------------------- */ _conteneurChatData() { - const tplData = this.system - let properties = [ - `Capacité: ${tplData.capacite} Enc.`, - `Encombrement: ${tplData.encombrement}` + return [ + `Capacité: ${this.system.capacite} Enc.`, + `Encombrement: ${this.system.encombrement}` ] - return properties; } /* -------------------------------------------- */ _munitionChatData() { - const tplData = this.system - let properties = [ - `Encombrement: ${tplData.encombrement}` + return [ + `Encombrement: ${this.system.encombrement}` ] - return properties; } /* -------------------------------------------- */ _armureChatData() { - const tplData = this.system - let properties = [ - `Protection: ${tplData.protection}`, - `Détérioration: ${tplData.deterioration}`, - `Malus armure: ${tplData.malus}`, - `Encombrement: ${tplData.encombrement}` + return [ + `Protection: ${this.system.protection}`, + `Détérioration: ${this.system.deterioration}`, + `Malus armure: ${this.system.malus}`, + `Encombrement: ${this.system.encombrement}` ] - return properties; } /* -------------------------------------------- */ _competenceChatData() { - const tplData = this.system - let properties = [ - `Catégorie: ${tplData.categorie}`, - `Niveau: ${tplData.niveau}`, - `Caractéristique par défaut: ${tplData.carac_defaut}`, - `XP: ${tplData.xp}` + return [ + `Catégorie: ${this.system.categorie}`, + `Niveau: ${this.system.niveau}`, + `Caractéristique par défaut: ${this.system.carac_defaut}`, + `XP: ${this.system.xp}` ] - return properties; } /* -------------------------------------------- */ _competencecreatureChatData() { - const tplData = this.system - let properties = [ - `Catégorie: ${tplData.categorie}`, - `Niveau: ${tplData.niveau}`, - `Caractéristique: ${tplData.carac_value}`, - `XP: ${tplData.xp}` + return [ + `Catégorie: ${this.system.categorie}`, + `Niveau: ${this.system.niveau}`, + `Caractéristique: ${this.system.carac_value}`, + `XP: ${this.system.xp}` ] - return properties; } /* -------------------------------------------- */ _sortChatData() { - const tplData = this.system - let properties = [ - `Draconic: ${tplData.draconic}`, - `Difficulté: ${tplData.difficulte}`, - `Case TMR: ${tplData.caseTMR}`, - `Points de Rêve: ${tplData.ptreve}` + return [ + `Draconic: ${this.system.draconic}`, + `Difficulté: ${this.system.difficulte}`, + `Case TMR: ${this.system.caseTMR}`, + `Points de Rêve: ${this.system.ptreve}` ] - return properties; } /* -------------------------------------------- */ _herbeChatData() { - const tplData = this.system - let properties = [ - `Milieu: ${tplData.milieu}`, - `Rareté: ${tplData.rarete}`, - `Catégorie: ${tplData.categorie}`, + return [ + `Milieu: ${this.system.milieu}`, + `Rareté: ${this.system.rarete}`, + `Catégorie: ${this.system.categorie}`, ] - return properties; } /* -------------------------------------------- */ _ingredientChatData() { - const tplData = this.system - let properties = [ - `Milieu: ${tplData.milieu}`, - `Rareté: ${tplData.rarete}`, - `Catégorie: ${tplData.categorie}`, + return [ + `Milieu: ${this.system.milieu}`, + `Rareté: ${this.system.rarete}`, + `Catégorie: ${this.system.categorie}`, ] - return properties; } /* -------------------------------------------- */ _tacheChatData() { - const tplData = this.system - let properties = [ - `Caractéristique: ${tplData.carac}`, - `Compétence: ${tplData.competence}`, - `Périodicité: ${tplData.periodicite}`, - `Fatigue: ${tplData.fatigue}`, - `Difficulté: ${tplData.difficulte}` + return [ + `Caractéristique: ${this.system.carac}`, + `Compétence: ${this.system.competence}`, + `Périodicité: ${this.system.periodicite}`, + `Fatigue: ${this.system.fatigue}`, + `Difficulté: ${this.system.difficulte}` ].concat([ - tplData.cacher_points_de_tache ? [] :`Points de Tâche: ${tplData.points_de_tache}` + this.system.cacher_points_de_tache ? [] :`Points de Tâche: ${this.system.points_de_tache}` ]).concat([ - `Points de Tâche atteints: ${tplData.points_de_tache_courant}`] + `Points de Tâche atteints: ${this.system.points_de_tache_courant}`] ); - return properties; } /* -------------------------------------------- */ _livreChatData() { - const tplData = this.system - let properties = [ - `Compétence: ${tplData.competence}`, - `Auteur: ${tplData.auteur}`, - `Difficulté: ${tplData.difficulte}`, - `Points de Tâche: ${tplData.points_de_tache}`, - `Encombrement: ${tplData.encombrement}` + return [ + `Compétence: ${this.system.competence}`, + `Auteur: ${this.system.auteur}`, + `Difficulté: ${this.system.difficulte}`, + `Points de Tâche: ${this.system.points_de_tache}`, + `Encombrement: ${this.system.encombrement}` ] - return properties; } /* -------------------------------------------- */ _potionChatData() { - const tplData = this.system - let properties = [ - `Rareté: ${tplData.rarete}`, - `Catégorie: ${tplData.categorie}`, - `Encombrement: ${tplData.encombrement}`, + return [ + `Rareté: ${this.system.rarete}`, + `Catégorie: ${this.system.categorie}`, + `Encombrement: ${this.system.encombrement}`, ] - return properties; } /* -------------------------------------------- */ _queueChatData() { - const tplData = this.system - let properties = [ - `Refoulement: ${tplData.refoulement}` + return [ + `Refoulement: ${this.system.refoulement}` ] - return properties; } /* -------------------------------------------- */ _ombreChatData() { - const tplData = this.system - let properties = [ - `Refoulement: ${tplData.refoulement}` + return [ + `Refoulement: ${this.system.refoulement}` ] - return properties; } /* -------------------------------------------- */ _souffleChatData() { - const tplData = this.system - let properties = []; - return properties; + return []; } /* -------------------------------------------- */ _teteChatData() { - const tplData = this.system - let properties = []; - return properties; + return []; } /* -------------------------------------------- */ _tarotChatData() { - const tplData = this.system - let properties = [ - `Concept: ${tplData.concept}`, - `Aspect: ${tplData.aspect}`, + return [ + `Concept: ${this.system.concept}`, + `Aspect: ${this.system.aspect}`, ] - return properties; } /* -------------------------------------------- */ _nombreastralChatData() { - const tplData = this.system - let properties = [ - `Valeur: ${tplData.value}`, - `Jour: ${tplData.jourlabel}`, + return [ + `Valeur: ${this.system.value}`, + `Jour: ${this.system.jourlabel}`, ] - return properties; } /* -------------------------------------------- */ _monnaieChatData() { - const tplData = this.system - let properties = [ - `Valeur en Deniers: ${tplData.valeur_deniers}`, - `Encombrement: ${tplData.encombrement}` + return [ + `Valeur en Deniers: ${this.system.valeur_deniers}`, + `Encombrement: ${this.system.encombrement}` ] - return properties; } /* -------------------------------------------- */ _meditationChatData() { - const tplData = this.system - let properties = [ - `Thème: ${tplData.theme}`, - `Compétence: ${tplData.competence}`, - `Support: ${tplData.support}`, - `Heure: ${tplData.heure}`, - `Purification: ${tplData.purification}`, - `Vêture: ${tplData.veture}`, - `Comportement: ${tplData.comportement}`, - `Case TMR: ${tplData.tmr}` + return [ + `Thème: ${this.system.theme}`, + `Compétence: ${this.system.competence}`, + `Support: ${this.system.support}`, + `Heure: ${this.system.heure}`, + `Purification: ${this.system.purification}`, + `Vêture: ${this.system.veture}`, + `Comportement: ${this.system.comportement}`, + `Case TMR: ${this.system.tmr}` ] - return properties; } /* -------------------------------------------- */ _casetmrChatData() { - const tplData = this.system - let properties = [ - `Coordonnée: ${tplData.coord}`, - `Spécificité: ${tplData.specific}` + return [ + `Coordonnée: ${this.system.coord}`, + `Spécificité: ${this.system.specific}` ] - return properties; } /* -------------------------------------------- */ _maladieChatData() { - const tplData = this.system - let properties - if (tplData.identifie) { - properties = [ - `Malignité: ${tplData.malignite}`, - `Périodicité: ${tplData.periodicite}`, - `Dommages: ${tplData.dommages}` + if (!this.system.identifie) { + return [`Inconnue`] + } + let properties = [ + `Malignité: ${this.system.malignite}`, + `Périodicité: ${this.system.periodicite}`, + `Dommages: ${this.system.dommages}` ] - if (tplData.remedesconnus) { - properties.push(`Remedes: ${tplData.remedes}`) - } - } else { - properties = [ - `Inconnue`] + if (this.system.remedesconnus) { + properties.push(`Remedes: ${this.system.remedes}`) } return properties; } @@ -584,15 +533,13 @@ export class RdDItem extends Item { /* -------------------------------------------- */ _gemmeChatData() { - const tplData = this.system - let properties = [ - `Pureté: ${tplData.purete}`, - `Taille: ${tplData.taille}`, - `Inertie: ${tplData.inertie}`, - `Enchantabilité: ${tplData.enchantabilite}`, - `Prix: ${tplData.cout}`, + return [ + `Pureté: ${this.system.purete}`, + `Taille: ${this.system.taille}`, + `Inertie: ${this.system.inertie}`, + `Enchantabilité: ${this.system.enchantabilite}`, + `Prix: ${this.system.cout}`, ] - return properties; } diff --git a/module/rdd-calendrier.js b/module/rdd-calendrier.js index 1377b26d..05459e94 100644 --- a/module/rdd-calendrier.js +++ b/module/rdd-calendrier.js @@ -458,7 +458,7 @@ export class RdDCalendrier extends Application { function check() { let elmnt = document.getElementById("calendar-time-container"); if (elmnt) { - elmnt.style.bottom = null; + elmnt.style.bottom = undefined; let xPos = (pos.left) > window.innerWidth ? window.innerWidth - 200 : pos.left; let yPos = (pos.top) > window.innerHeight - 20 ? window.innerHeight - 100 : pos.top; elmnt.style.top = (yPos) + "px"; @@ -615,16 +615,16 @@ export class RdDCalendrier extends Application { pos3 = e.clientX; pos4 = e.clientY; // set the element's new position: - elmnt.style.bottom = null + elmnt.style.bottom = undefined elmnt.style.top = (elmnt.offsetTop - pos2) + "px"; elmnt.style.left = (elmnt.offsetLeft - pos1) + "px"; } function closeDragElement() { // stop moving when mouse button is released: - elmnt.onmousedown = null; - document.onmouseup = null; - document.onmousemove = null; + elmnt.onmousedown = undefined; + document.onmouseup = undefined; + document.onmousemove = undefined; let xPos = (elmnt.offsetLeft - pos1) > window.innerWidth ? window.innerWidth - 200 : (elmnt.offsetLeft - pos1); let yPos = (elmnt.offsetTop - pos2) > window.innerHeight - 20 ? window.innerHeight - 100 : (elmnt.offsetTop - pos2) xPos = xPos < 0 ? 0 : xPos; diff --git a/module/rdd-combat.js b/module/rdd-combat.js index af430b59..1858218d 100644 --- a/module/rdd-combat.js +++ b/module/rdd-combat.js @@ -121,7 +121,7 @@ export class RdDCombatManager extends Combat { { speaker: { scene: canvas.scene._id, - actor: combatant.actor ? combatant.actor._id : null, + actor: combatant.actor?._id, token: combatant.token._id, alias: combatant.token.name, sound: CONFIG.sounds.dice, @@ -498,7 +498,7 @@ export class RdDCombat { let defender = canvas.tokens.get(msg.defenderTokenId).actor; if (Misc.isOwnerPlayerOrUniqueConnectedGM()) { let attackerRoll = msg.attackerRoll; - let attacker = msg.attackerId ? game.actors.get(msg.attackerId) : null; + let attacker = msg.attackerId ? game.actors.get(msg.attackerId) : undefined; defender.encaisserDommages(attackerRoll, attacker); const rddCombat = RdDCombat.createForAttackerAndDefender(msg.attackerId, msg.defenderTokenId); diff --git a/module/rdd-compendium-organiser.js b/module/rdd-compendium-organiser.js index 23cac6c7..e8b11b4e 100644 --- a/module/rdd-compendium-organiser.js +++ b/module/rdd-compendium-organiser.js @@ -29,13 +29,14 @@ export class RddCompendiumOrganiser { static getEntityTypeLabel(entity) { const documentName = entity?.documentName - const type = entity?.type + const type = entity?.type if (documentName === 'Actor' || documentName === 'Item') { const label = CONFIG[documentName]?.typeLabels?.[type] ?? type; - return game.i18n.has(label) ? game.i18n.localize(label) : t; + if (game.i18n.has(label)) { + return game.i18n.localize(label); + } } return type; } - } \ No newline at end of file diff --git a/module/rdd-dice.js b/module/rdd-dice.js index cba20726..dbc62e2b 100644 --- a/module/rdd-dice.js +++ b/module/rdd-dice.js @@ -241,7 +241,7 @@ export class RdDDice { } static _getWhisperBlind(options) { - let whisper = null; + let whisper = undefined; let blind = false; let rollMode = options.rollMode ?? game.settings.get("core", "rollMode"); switch (rollMode) { diff --git a/module/rdd-main.js b/module/rdd-main.js index 12331097..b607c3f8 100644 --- a/module/rdd-main.js +++ b/module/rdd-main.js @@ -143,8 +143,6 @@ Hooks.once("init", async function () { default: "aucun" }); - DialogChronologie.onInit(); - /* -------------------------------------------- */ // Set an initiative formula for the system CONFIG.Combat.initiative = { @@ -197,6 +195,7 @@ Hooks.once("init", async function () { CONFIG.Combat.documentClass = RdDCombatManager; // préparation des différents modules + DialogChronologie.init(); ReglesOptionelles.init(); RdDUtility.init(); RdDDice.init(); diff --git a/module/rdd-resolution-table.js b/module/rdd-resolution-table.js index 37eac10a..3bf143ef 100644 --- a/module/rdd-resolution-table.js +++ b/module/rdd-resolution-table.js @@ -54,7 +54,7 @@ export class RdDResolutionTable { /* -------------------------------------------- */ static explain(rolled) { let message = "
Jet : " + rolled.roll + " sur " + rolled.score + "% "; - if (rolled.caracValue != null && rolled.finalLevel != null) { + if (rolled.caracValue != undefined && rolled.finalLevel != undefined) { message += (rolled.diviseurSignificative > 1 ? `(1/${rolled.diviseurSignificative} de ` : "(") + rolled.caracValue + " à " + Misc.toSignedString(rolled.finalLevel) + ") "; } @@ -116,7 +116,7 @@ export class RdDResolutionTable { static _updateChancesFactor(chances, diviseur) { if (chances.level > -11 && diviseur && diviseur > 1) { let newScore = Math.floor(chances.score / diviseur); - mergeObject(chances, this._computeCell(null, newScore), { overwrite: true }); + mergeObject(chances, this._computeCell(undefined, newScore), { overwrite: true }); } } @@ -124,7 +124,7 @@ export class RdDResolutionTable { static _updateChancesWithBonus(chances, bonus, finalLevel) { if (bonus && finalLevel>-11) { let newScore = Number(chances.score) + bonus; - mergeObject(chances, this._computeCell(null, newScore), { overwrite: true }); + mergeObject(chances, this._computeCell(undefined, newScore), { overwrite: true }); } } diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index 5a65cc89..59d8086a 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -364,9 +364,7 @@ export class RdDTMRDialog extends Dialog { /* -------------------------------------------- */ async quitterLesTMRInconscient() { - if (this.currentRencontre?.isPersistant) { - await this.refouler(); - } + await this.refouler(); this.close(); } diff --git a/module/rdd-utility.js b/module/rdd-utility.js index c427fad6..836926b7 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -13,7 +13,6 @@ import { Monnaie } from "./item-monnaie.js"; import { RdDPossession } from "./rdd-possession.js"; import { RdDNameGen } from "./rdd-namegen.js"; import { RdDConfirm } from "./rdd-confirm.js"; -import { RdDActor } from "./actor.js"; import { RdDCalendrier } from "./rdd-calendrier.js"; /* -------------------------------------------- */ diff --git a/module/tmr-rencontres.js b/module/tmr-rencontres.js index 2f9d099e..d10ea9be 100644 --- a/module/tmr-rencontres.js +++ b/module/tmr-rencontres.js @@ -1,5 +1,4 @@ import { Grammar } from "./grammar.js"; -import { Misc } from "./misc.js"; import { RdDDice } from "./rdd-dice.js"; import { TMRUtility } from "./tmr-utility.js"; import { TMRType } from "./tmr-utility.js"; @@ -45,13 +44,13 @@ const typeRencontres = { tmrDialog.choisirCasePortee(rencData.tmr.coord, rencData.rencontre.force); }, poesieSucces: { - reference: "Femmes damnées (2), Charles Baudelaire", + reference: "Le bateau ivre, Arthur Rimbaud", extrait: `Comme je descendais des Fleuves impassibles,
Je ne me sentis plus guidé par les haleurs :
Des Peaux-Rouges criards les avaient pris pour cibles,
Les ayant cloués nus aux poteaux de couleurs.`}, poesieEchec: { - reference: "Le bateau ivre, Arthur Rimbaud", + reference: "Femmes damnées (2), Charles Baudelaire", extrait: `Loin des peuples vivants, errantes, condamnées,
A travers les déserts courez comme les loups ;
Faites votre destin, âmes désordonnées, diff --git a/styles/simple.css b/styles/simple.css index a57088d3..7256ae59 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -77,6 +77,10 @@ --gradient-violet: linear-gradient(150deg, rgba(100, 45, 124, 0.6), rgba(216, 157, 192, 0.3), rgba(177, 157, 216, 0.5), rgba(107, 62, 121, 0.3), rgba(100, 45, 124, 0.6)); --gradient-purple-black: linear-gradient(150deg, rgba(0, 0, 0, 0.7), rgba(100, 45, 124, 0.4), rgba(82, 17, 131, 0.3),rgba(100, 45, 124, 0.4), rgba(0, 0, 0, 0.7)); --gradient-silver-light: linear-gradient(30deg, rgba(61, 55, 93, 0.2), rgba(178, 179, 196, 0.1), rgba(59, 62, 63, 0.2), rgba(206, 204, 199, 0.1), rgba(61, 46, 49, 0.2)); + + --background-custom-button: linear-gradient(to bottom, rgba(33, 55, 74, 0.988) 5%, rgba(21, 40, 51, 0.671) 100%); + --background-custom-button-hover: linear-gradient(to bottom, rgb(128, 0, 0) 5%, rgb(62, 1, 1) 100%); + --background-tooltip: rgba(220,220,210,0.95); } /*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/ @@ -316,7 +320,6 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; - margin-bottom: 10px; } .foundryvtt-reve-de-dragon .sheet-header .profile-img { @@ -1596,7 +1599,7 @@ display: inline-flex; .tooltip .ttt-ajustements { width: 150px; - background: rgba(220,220,210,0.95); + background: var(--background-tooltip); border-radius: 6px; font-size: 0.9rem; padding: 3px 0; @@ -1606,7 +1609,7 @@ display: inline-flex; text-align: justify; width: 100%; top: 30px; - background: rgba(220,220,210,0.95); + background: var(--background-tooltip); border-radius: 6px; font-size: 0.9rem; padding: 3px; @@ -1614,7 +1617,7 @@ display: inline-flex; .tooltip :is(.ttt-xp,.ttt-levelup) { width: 250px; - background: rgba(220,220,210,0.95) !important; + background: var(--background-tooltip) !important; border-radius: 6px; font-size: 0.9rem; padding: 3px 0; @@ -1628,7 +1631,7 @@ display: inline-flex; .chat-card-button { box-shadow: inset 0px 1px 0px 0px #a6827e; - background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%); + background: var(--background-custom-button); background-color: #7d5d3b00; border-radius: 3px; border: 2px ridge #846109; @@ -1644,10 +1647,12 @@ display: inline-flex; margin:5px; } + .chat-card-button:hover { - background: linear-gradient(to bottom, #800000 5%, #3e0101 100%); + background: var(--background-custom-button-hover); background-color: red; } + .chat-card-button:active { position:relative; top:1px; diff --git a/template.json b/template.json index d25dfcbd..63d46cba 100644 --- a/template.json +++ b/template.json @@ -1,972 +1,972 @@ { -"Actor": { - "types": ["personnage", "creature", "entite", "vehicule"], - "templates": { - "description": { - "description": "Description ...", - "race": "", - "notesmj": "Notes du MJ" - }, - "subacteurs": { + "Actor": { + "types": ["personnage", "creature", "entite", "vehicule"], + "templates": { + "description": { + "description": "Description ...", + "race": "", + "notesmj": "Notes du MJ" + }, "subacteurs": { - "suivants": [], - "montures": [], - "vehicules": [] - } - }, - "background": { - "biographie": "Histoire personnelle...", - "notes": "Notes", - "notesmj": "Notes du MJ", - "race": "Humain", - "yeux": "", - "cheveux": "", - "poids": "", - "heure": "", - "sexe": "", - "age": 0, - "beaute": 10, - "main": "droitier", - "experiencelog": [] - }, - "vehicule": { - "categorie": "", - "vitesse": "", - "bonus": "", - "manoeuvrabilite": "", - "equipage": 0, - "capacite_encombrement": 0, - "etat": { - "resistance" : { - "type": "number", - "max": 20, - "value": 20, - "label": "Résistance", - "derivee": false - }, - "structure":{ - "type": "number", - "max": 10, - "value": 10, - "label": "Structure", - "derivee": false + "subacteurs": { + "suivants": [], + "montures": [], + "vehicules": [] } - } - }, - "entite": { - "definition": { - "categorieentite": "", - "typeentite": "" }, - "carac": { - "taille": { - "type": "number", - "value": 10, - "label": "Taille", - "xp": 0, - "derivee": false + "background": { + "biographie": "Histoire personnelle...", + "notes": "Notes", + "notesmj": "Notes du MJ", + "race": "Humain", + "yeux": "", + "cheveux": "", + "poids": "", + "heure": "", + "sexe": "", + "age": 0, + "beaute": 10, + "main": "droitier", + "experiencelog": [] + }, + "vehicule": { + "categorie": "", + "vitesse": "", + "bonus": "", + "manoeuvrabilite": "", + "equipage": 0, + "capacite_encombrement": 0, + "etat": { + "resistance" : { + "type": "number", + "max": 20, + "value": 20, + "label": "Résistance", + "derivee": false + }, + "structure":{ + "type": "number", + "max": 10, + "value": 10, + "label": "Structure", + "derivee": false + } + } + }, + "entite": { + "definition": { + "categorieentite": "", + "typeentite": "" + }, + "carac": { + "taille": { + "type": "number", + "value": 10, + "label": "Taille", + "xp": 0, + "derivee": false + }, + "reve": { + "type": "number", + "value": 10, + "label": "Rêve", + "xp": 0, + "derivee": false + }, + "niveau": { + "type": "number", + "value": 0, + "label": "Niveau", + "xp": 0, + "derivee": false + } + }, + "sante": { + "endurance": { + "type": "number", + "max": 10, + "value": 10, + "label": "Endurance", + "derivee": false + }, + "resonnance": { + "actors" : [] + } + }, + "compteurs": { + "etat": { + "value": 0, + "label": "Etat général" + }, + "surenc": { + "value": 0, + "label": "Sur-encombrement" + } + }, + "attributs": { + "plusdom": { + "type": "number", + "value": 0, + "label": "+dom", + "derivee": true + }, + "vitesse": { + "type": "string", + "value": 0, + "label": "Vitesse", + "derivee": true + }, + "protection": { + "type": "number", + "value": 0, + "label": "Protection naturelle", + "derivee": false + } + } + }, + "creature": { + "carac": { + "taille": { + "type": "number", + "value": 10, + "label": "Taille", + "xp": 0, + "derivee": false + }, + "constitution": { + "type": "number", + "value": 10, + "label": "Constitution", + "xp": 0, + "derivee": false + }, + "force": { + "type": "number", + "value": 10, + "label": "Force", + "xp": 0, + "derivee": false + }, + "perception": { + "type": "number", + "value": 10, + "label": "Perception", + "xp": 0, + "derivee": false + }, + "volonte": { + "type": "number", + "value": 10, + "label": "Volonté", + "xp": 0, + "derivee": false + }, + "reve": { + "type": "number", + "value": 10, + "label": "Rêve", + "xp": 0, + "derivee": false + } + }, + "sante": { + "vie": { + "type": "number", + "max": 10, + "value": 10, + "label": "Vie", + "derivee": false + }, + "endurance": { + "type": "number", + "max": 10, + "value": 10, + "label": "Endurance", + "derivee": false + } + }, + "blessures": { + "legeres": { + "liste": [ { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, + { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, + { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, + { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, + { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" } ] + }, + "graves": { + "liste": [ { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, + { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" } ] + }, + "critiques": { + "liste": [ { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" } ] + } + }, + "attributs": { + "plusdom": { + "type": "number", + "value": 0, + "label": "+dom", + "derivee": true + }, + "vitesse": { + "type": "string", + "value": 0, + "label": "Vitesse", + "derivee": true + }, + "encombrement": { + "type": "number", + "value": 0, + "label": "Encombrement", + "derivee": false + }, + "protection": { + "type": "number", + "value": 0, + "label": "Protection naturelle", + "derivee": false + } + }, + "compteurs": { + "etat": { + "value": 0, + "label": "Etat général" + }, + "surenc": { + "value": 0, + "label": "Sur-encombrement" + } + } + }, + "personnage": { + "carac": { + "taille": { + "type": "number", + "value": 10, + "label": "Taille", + "xp": 0, + "derivee": false + }, + "apparence": { + "type": "number", + "value": 10, + "label": "Apparence", + "xp": 0, + "derivee": false + }, + "constitution": { + "type": "number", + "value": 10, + "label": "Constitution", + "xp": 0, + "derivee": false + }, + "force": { + "type": "number", + "value": 10, + "label": "Force", + "xp": 0, + "derivee": false + }, + "agilite": { + "type": "number", + "value": 10, + "label": "Agilité", + "xp": 0, + "derivee": false + }, + "dexterite": { + "type": "number", + "value": 10, + "label": "Dextérité", + "xp": 0, + "derivee": false + }, + "vue": { + "type": "number", + "value": 10, + "label": "Vue", + "xp": 0, + "derivee": false + }, + "ouie": { + "type": "number", + "value": 10, + "label": "Ouïe", + "xp": 0, + "derivee": false + }, + "odoratgout": { + "type": "number", + "value": 10, + "label": "Odorat-Goût", + "xp": 0, + "derivee": false + }, + "volonte": { + "type": "number", + "value": 10, + "label": "Volonté", + "xp": 0, + "derivee": false + }, + "intellect": { + "type": "number", + "value": 10, + "label": "Intellect", + "xp": 0, + "derivee": false + }, + "empathie": { + "type": "number", + "value": 10, + "label": "Empathie", + "xp": 0, + "derivee": false + }, + "reve": { + "type": "number", + "value": 10, + "label": "Rêve", + "xp": 0, + "derivee": false + }, + "chance": { + "type": "number", + "value": 10, + "label": "Chance", + "xp": 0, + "derivee": false + }, + "melee": { + "type": "number", + "value": 10, + "label": "Mêlée", + "xp": 0, + "derivee": true + }, + "tir": { + "type": "number", + "value": 10, + "label": "Tir", + "xp": 0, + "derivee": true + }, + "lancer": { + "type": "number", + "value": 10, + "label": "Lancer", + "xp": 0, + "derivee": true + }, + "derobee": { + "type": "number", + "value": 10, + "label": "Dérobée", + "xp": 0, + "derivee": true + } + }, + "sante": { + "vie": { + "type": "number", + "max": 10, + "value": 10, + "label": "Vie", + "derivee": true + }, + "endurance": { + "type": "number", + "max": 10, + "value": 10, + "label": "Endurance", + "derivee": true + }, + "fatigue": { + "type": "number", + "max": 0, + "value": 0, + "label": "Fatigue", + "derivee": true + } + }, + "blessures": { + "legeres": { + "liste": [ { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, + { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, + { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, + { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, + { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ] + }, + "graves": { + "liste": [ { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, + { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ] + }, + "critiques": { + "liste": [ { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ] + } + }, + "attributs": { + "sconst": { + "type": "number", + "value": 0, + "label": "S. Const", + "derivee": true + }, + "sust": { + "type": "number", + "value": 0, + "label": "Sustentation", + "derivee": true + }, + "plusdom": { + "type": "number", + "value": 0, + "label": "+dom", + "derivee": true + }, + "encombrement": { + "type": "number", + "value": 0, + "label": "Encombrement", + "derivee": true + }, + "malusarmure": { + "type": "number", + "value": 0, + "label": "Malus Armure", + "derivee": true + }, + "protection": { + "type": "number", + "value": 0, + "label": "Protection naturelle", + "derivee": false + }, + "hautrevant": { + "type": "string", + "value": "", + "label": "Haut rêvant", + "derivee": true + } }, "reve": { - "type": "number", - "value": 10, - "label": "Rêve", - "xp": 0, - "derivee": false + "reve": { + "max": 0, + "value": 10, + "label": "Points de Rêve actuels", + "thanatosused": false + }, + "seuil": { + "max": 0, + "value": 10, + "label": "Seuil de Rêve" + }, + "tmrpos": { + "coord": "A1", + "label": "Position TMR", + "cache": false + }, + "reserve": { + "list": [] + }, + "rencontre": { + "list": [] + }, + "refoulement": { + "value": 0, + "label": "Points de Refoulement" + }, + "queues": { + "list": [] + }, + "souffles": { + "list": [] + }, + "tetes": { + "list": [] + }, + "ombres": { + "list": [] + } }, - "niveau": { - "type": "number", - "value": 0, - "label": "Niveau", - "xp": 0, - "derivee": false + "compteurs": { + "sust": { + "value": 0, + "label": "Sust.", + "isInput": true + }, + "eau": { + "value": 0, + "label": "Eau", + "isInput": true + }, + "moral": { + "value": 0, + "label": "Moral", + "isInput": true + }, + "exaltation": { + "value": 0, + "label": "Exaltation", + "isInput": true + }, + "dissolution": { + "value": 0, + "label": "Dissolution", + "isInput": true + }, + "chance": { + "value": 0, + "max": 0, + "label": "Chance", + "isInput": true + }, + "destinee": { + "value": 0, + "label": "Destinée", + "isInput": true + }, + "voyage": { + "value": 0, + "label": "Voyage", + "isInput": true + }, + "etat": { + "value": 0, + "label": "Etat général" + }, + "surenc": { + "value": 0, + "label": "Sur-encombrement" + }, + "ethylisme": { + "value": 1, + "label": "Ethylisme", + "isInput": true, + "nb_doses": 0, + "jet_moral": "false" + }, + "stress": { + "value": 0, + "label": "Stress", + "isStress": true, + "isInput": true + }, + "experience": { + "value": 0, + "label": "Experience", + "isInput": true + } + }, + "argent": { + "deniers": { + "label": "Denier", + "value": 0, + "enc": 0 + }, + "sols": { + "label": "Sol", + "value": 0, + "enc": 0 + } } - }, - "sante": { - "endurance": { - "type": "number", - "max": 10, - "value": 10, - "label": "Endurance", - "derivee": false - }, - "resonnance": { - "actors" : [] - } - }, - "compteurs": { - "etat": { - "value": 0, - "label": "Etat général" - }, - "surenc": { - "value": 0, - "label": "Sur-encombrement" - } - }, - "attributs": { - "plusdom": { - "type": "number", - "value": 0, - "label": "+dom", - "derivee": true - }, - "vitesse": { - "type": "string", - "value": 0, - "label": "Vitesse", - "derivee": true - }, - "protection": { - "type": "number", - "value": 0, - "label": "Protection naturelle", - "derivee": false - } - } - }, - "creature": { - "carac": { - "taille": { - "type": "number", - "value": 10, - "label": "Taille", - "xp": 0, - "derivee": false - }, - "constitution": { - "type": "number", - "value": 10, - "label": "Constitution", - "xp": 0, - "derivee": false - }, - "force": { - "type": "number", - "value": 10, - "label": "Force", - "xp": 0, - "derivee": false - }, - "perception": { - "type": "number", - "value": 10, - "label": "Perception", - "xp": 0, - "derivee": false - }, - "volonte": { - "type": "number", - "value": 10, - "label": "Volonté", - "xp": 0, - "derivee": false - }, - "reve": { - "type": "number", - "value": 10, - "label": "Rêve", - "xp": 0, - "derivee": false - } - }, - "sante": { - "vie": { - "type": "number", - "max": 10, - "value": 10, - "label": "Vie", - "derivee": false - }, - "endurance": { - "type": "number", - "max": 10, - "value": 10, - "label": "Endurance", - "derivee": false - } - }, - "blessures": { - "legeres": { - "liste": [ { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, - { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, - { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, - { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, - { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" } ] - }, - "graves": { - "liste": [ { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" }, - { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" } ] - }, - "critiques": { - "liste": [ { "active": false, "psdone": false, "premiers_soins": -1, "scdone": false, "soins_complets": -1, "jours": 0, "localisation": "" } ] - } - }, - "attributs": { - "plusdom": { - "type": "number", - "value": 0, - "label": "+dom", - "derivee": true - }, - "vitesse": { - "type": "string", - "value": 0, - "label": "Vitesse", - "derivee": true - }, - "encombrement": { - "type": "number", - "value": 0, - "label": "Encombrement", - "derivee": false - }, - "protection": { - "type": "number", - "value": 0, - "label": "Protection naturelle", - "derivee": false - } - }, - "compteurs": { - "etat": { - "value": 0, - "label": "Etat général" - }, - "surenc": { - "value": 0, - "label": "Sur-encombrement" - } } }, "personnage": { - "carac": { - "taille": { - "type": "number", - "value": 10, - "label": "Taille", - "xp": 0, - "derivee": false - }, - "apparence": { - "type": "number", - "value": 10, - "label": "Apparence", - "xp": 0, - "derivee": false - }, - "constitution": { - "type": "number", - "value": 10, - "label": "Constitution", - "xp": 0, - "derivee": false - }, - "force": { - "type": "number", - "value": 10, - "label": "Force", - "xp": 0, - "derivee": false - }, - "agilite": { - "type": "number", - "value": 10, - "label": "Agilité", - "xp": 0, - "derivee": false - }, - "dexterite": { - "type": "number", - "value": 10, - "label": "Dextérité", - "xp": 0, - "derivee": false - }, - "vue": { - "type": "number", - "value": 10, - "label": "Vue", - "xp": 0, - "derivee": false - }, - "ouie": { - "type": "number", - "value": 10, - "label": "Ouïe", - "xp": 0, - "derivee": false - }, - "odoratgout": { - "type": "number", - "value": 10, - "label": "Odorat-Goût", - "xp": 0, - "derivee": false - }, - "volonte": { - "type": "number", - "value": 10, - "label": "Volonté", - "xp": 0, - "derivee": false - }, - "intellect": { - "type": "number", - "value": 10, - "label": "Intellect", - "xp": 0, - "derivee": false - }, - "empathie": { - "type": "number", - "value": 10, - "label": "Empathie", - "xp": 0, - "derivee": false - }, - "reve": { - "type": "number", - "value": 10, - "label": "Rêve", - "xp": 0, - "derivee": false - }, - "chance": { - "type": "number", - "value": 10, - "label": "Chance", - "xp": 0, - "derivee": false - }, - "melee": { - "type": "number", - "value": 10, - "label": "Mêlée", - "xp": 0, - "derivee": true - }, - "tir": { - "type": "number", - "value": 10, - "label": "Tir", - "xp": 0, - "derivee": true - }, - "lancer": { - "type": "number", - "value": 10, - "label": "Lancer", - "xp": 0, - "derivee": true - }, - "derobee": { - "type": "number", - "value": 10, - "label": "Dérobée", - "xp": 0, - "derivee": true - } - }, - "sante": { - "vie": { - "type": "number", - "max": 10, - "value": 10, - "label": "Vie", - "derivee": true - }, - "endurance": { - "type": "number", - "max": 10, - "value": 10, - "label": "Endurance", - "derivee": true - }, - "fatigue": { - "type": "number", - "max": 0, - "value": 0, - "label": "Fatigue", - "derivee": true - } - }, - "blessures": { - "legeres": { - "liste": [ { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, - { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, - { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, - { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, - { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ] - }, - "graves": { - "liste": [ { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" }, - { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ] - }, - "critiques": { - "liste": [ { "active": false, "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ] - } - }, - "attributs": { - "sconst": { - "type": "number", - "value": 0, - "label": "S. Const", - "derivee": true - }, - "sust": { - "type": "number", - "value": 0, - "label": "Sustentation", - "derivee": true - }, - "plusdom": { - "type": "number", - "value": 0, - "label": "+dom", - "derivee": true - }, - "encombrement": { - "type": "number", - "value": 0, - "label": "Encombrement", - "derivee": true - }, - "malusarmure": { - "type": "number", - "value": 0, - "label": "Malus Armure", - "derivee": true - }, - "protection": { - "type": "number", - "value": 0, - "label": "Protection naturelle", - "derivee": false - }, - "hautrevant": { - "type": "string", - "value": "", - "label": "Haut rêvant", - "derivee": true - } - }, - "reve": { - "reve": { - "max": 0, - "value": 10, - "label": "Points de Rêve actuels", - "thanatosused": false - }, - "seuil": { - "max": 0, - "value": 10, - "label": "Seuil de Rêve" - }, - "tmrpos": { - "coord": "A1", - "label": "Position TMR", - "cache": false - }, - "reserve": { - "list": [] - }, - "rencontre": { - "list": [] - }, - "refoulement": { - "value": 0, - "label": "Points de Refoulement" - }, - "queues": { - "list": [] - }, - "souffles": { - "list": [] - }, - "tetes": { - "list": [] - }, - "ombres": { - "list": [] - } - }, - "compteurs": { - "sust": { - "value": 0, - "label": "Sust.", - "isInput": true - }, - "eau": { - "value": 0, - "label": "Eau", - "isInput": true - }, - "moral": { - "value": 0, - "label": "Moral", - "isInput": true - }, - "exaltation": { - "value": 0, - "label": "Exaltation", - "isInput": true - }, - "dissolution": { - "value": 0, - "label": "Dissolution", - "isInput": true - }, - "chance": { - "value": 0, - "max": 0, - "label": "Chance", - "isInput": true - }, - "destinee": { - "value": 0, - "label": "Destinée", - "isInput": true - }, - "voyage": { - "value": 0, - "label": "Voyage", - "isInput": true - }, - "etat": { - "value": 0, - "label": "Etat général" - }, - "surenc": { - "value": 0, - "label": "Sur-encombrement" - }, - "ethylisme": { - "value": 1, - "label": "Ethylisme", - "isInput": true, - "nb_doses": 0, - "jet_moral": "false" - }, - "stress": { - "value": 0, - "label": "Stress", - "isStress": true, - "isInput": true - }, - "experience": { - "value": 0, - "label": "Experience", - "isInput": true - } - }, - "argent": { - "deniers": { - "label": "Denier", - "value": 0, - "enc": 0 - }, - "sols": { - "label": "Sol", - "value": 0, - "enc": 0 - } - } - } + "templates": [ "personnage", "background", "subacteurs" ] + }, + "creature": { + "templates": [ "creature", "description" ] + }, + "entite": { + "templates": [ "entite", "description" ] + }, + "vehicule": { + "templates": [ "vehicule", "description" ] + } }, - "personnage": { - "templates": [ "personnage", "background", "subacteurs" ] - }, - "creature": { - "templates": [ "creature", "description" ] - }, - "entite": { - "templates": [ "entite", "description" ] - }, - "vehicule": { - "templates": [ "vehicule", "description" ] + "Item": { + "types": ["objet", "arme", "armure", "conteneur", "competence", "sort", "herbe", "ingredient", "livre", "potion", "munition", "rencontresTMR", "queue", "ombre", "souffle", + "tete", "competencecreature", "tarot", "monnaie", "nombreastral", "tache", "meditation", "casetmr", "recettealchimique", + "musique", "chant", "danse", "jeu", "recettecuisine", "maladie", "poison", "oeuvre", "nourritureboisson", "signedraconique", "gemme", + "possession", "sortreserve" ], + "possession": { + "typepossession": "", + "possede": false, + "possessionid": "", + "possesseurid": "", + "possedeid": "", + "compteur": 0, + "date": 0, + "description": "" + }, + "objet": { + "description": "", + "descriptionmj": "", + "quantite": 1, + "encombrement": 0, + "equipe": false, + "resistance": 0, + "qualite": 0, + "cout": 0 + }, + "gemme": { + "type": "", + "description": "", + "encombrement": 0, + "quantite": 1, + "cout": 0, + "taille": 0, + "purete": 0, + "inertie": 0, + "enchantabilite": 0, + "qualite": 0 + }, + "conteneur": { + "description": "", + "descriptionmj": "", + "capacite": 0, + "encombrement": 0, + "equipe": false, + "qualite": 0, + "contenu": [], + "cout": 0 + }, + "arme": { + "categorie_parade": "", + "description": "", + "descriptionmj": "", + "quantite": 1, + "encombrement": 0, + "equipe": false, + "dommages": "0", + "penetration": 0, + "force": "0", + "resistance": 0, + "competence": "", + "cout": 0, + "portee_courte": 0, + "magique": false, + "ecaille_efficacite": 0, + "resistance_magique": 0, + "portee_moyenne": 0, + "portee_extreme": 0, + "rapide": false, + "deuxmains": false, + "unemain": false, + "initpremierround": "" + }, + "munition": { + "description": "", + "descriptionmj": "", + "quantite": 1, + "encombrement": 0, + "equipe": false, + "qualite": 0, + "cout": 0 + }, + "armure": { + "description": "", + "descriptionmj": "", + "quantite": 1, + "encombrement": 0, + "equipe": false, + "protection": 0, + "deterioration": 0, + "malus": 0, + "cout": 0 + }, + "competence": { + "niveau": 0, + "default_diffLibre": 0, + "base": 0, + "categorie": "", + "xp": 0, + "description": "Compétence : ...", + "descriptionmj": "", + "defaut_carac": "", + "niveau_archetype": 0, + "xp_sort": 0 + }, + "competencecreature": { + "categorie_parade": "", + "niveau": 0, + "default_diffLibre": 0, + "categorie": "", + "carac_value": 0, + "iscombat": false, + "isnaturelle": true, + "ispossession": false, + "dommages": 0, + "description": "Compétence : ...", + "descriptionmj": "" + }, + "sort": { + "description": "", + "descriptionmj": "", + "draconic": "", + "duree": "", + "JR": "", + "cible": "", + "difficulte": "", + "portée": "", + "caseTMR": "", + "caseTMRspeciale": "", + "ptreve": "", + "xp": 0, + "bonuscase": "", + "isrituel": false, + "coutseuil": 0 + }, + "herbe": { + "description": "", + "descriptionmj": "", + "niveau": 0, + "base": 0, + "quantite": 1, + "milieu": "", + "rarete": "", + "categorie": "", + "cout": 0 + }, + "ingredient": { + "description": "", + "descriptionmj": "", + "niveau": 0, + "encombrement": 0, + "base": 0, + "quantite": 1, + "milieu": "", + "rarete": "", + "categorie": "", + "cout": 0 + }, + "tache": { + "carac": "", + "competence": "", + "periodicite": "", + "fatigue": 1, + "difficulte": 0, + "points_de_tache": 4, + "points_de_tache_courant": 0, + "nb_jet_echec": 0, + "nb_jet_succes": 0, + "cacher_points_de_tache": false, + "description": "", + "descriptionmj": "" + }, + "livre": { + "description": "", + "descriptionmj": "", + "competence": "", + "auteur": "", + "quantite": 1, + "difficulte": 0, + "points_de_tache": 0, + "encombrement": 0, + "xp": "", + "niveau_minimum": 0, + "niveau_maximum": 0, + "cout": 0 + }, + "potion": { + "description": "", + "descriptionmj": "", + "quantite": 1, + "encombrement": 0, + "rarete": "", + "categorie": "", + "herbe": "", + "herbebrins": 0, + "herbebonus": 0, + "reposalchimique": false, + "pr": 0, + "prpermanent": false, + "prdate": 0, + "cout": 0 + }, + "rencontresTMR": { + "description": "", + "descriptionmj": "" + }, + "queue": { + "description": "", + "descriptionmj": "", + "refoulement": 0, + "duree": "", + "restant" : 0 + }, + "ombre": { + "description": "", + "descriptionmj": "", + "refoulement": 2, + "duree": "", + "restant" : 0 + }, + "souffle": { + "description": "", + "descriptionmj": "", + "duree": "", + "restant" : 0 + }, + "tete": { + "description": "", + "descriptionmj": "" + }, + "tarot": { + "concept":"", + "aspect":"", + "description": "", + "descriptionmj": "" + }, + "nombreastral": { + "value": 0, + "istrue": false, + "jourindex": 1, + "jourlabel": "" + }, + "monnaie": { + "quantite": "", + "valeur_deniers":0, + "encombrement":0, + "description": "", + "descriptionmj": "" + }, + "meditation": { + "competence": "", + "theme": "", + "support": "", + "heure": "", + "purification": "", + "veture": "", + "comportement": "", + "tmr": "", + "malus" : 0, + "description": "", + "descriptionmj": "" + }, + "casetmr": { + "coord": "", + "type": "", + "label": "", + "specific": "", + "description": "", + "descriptionmj": "", + "sourceid":"" + }, + "recettealchimique": { + "but": "", + "utilisation": "", + "enchantement": "", + "sureffet": "", + "manipulation": "", + "description": "", + "descriptionmj": "" + }, + "musique": { + "niveau": "", + "reference": "", + "description": "", + "descriptionmj": "" + }, + "danse": { + "type": "", + "agilite": false, + "apparence": false, + "niveau": "", + "reference": "", + "description": "", + "descriptionmj": "" + }, + "chant": { + "niveau": "", + "reference": "", + "description": "", + "descriptionmj": "" + }, + "jeu": { + "type": "", + "base": "", + "caraccomp": "", + "reference": "", + "description": "", + "descriptionmj": "" + }, + "recettecuisine": { + "niveau": "", + "ingredients": "", + "duree": "", + "sust": 0, + "exotisme": 0, + "reference": "", + "description": "", + "descriptionmj": "" + }, + "oeuvre": { + "default_carac": "", + "competence": "", + "niveau": 0, + "reference": "", + "description": "", + "descriptionmj": "" + }, + "maladie": { + "identifie": false, + "malignite": 0, + "periodicite": "", + "remedesconnus": false, + "remedes": "", + "dommages":"", + "description": "", + "descriptionmj": "" + }, + "poison": { + "identifie": false, + "malignite": 0, + "periodicite": "", + "remedesconnus": false, + "remedes": "", + "dommages":"", + "active": false, + "description": "", + "descriptionmj": "" + }, + "nourritureboisson": { + "description": "", + "descriptionmj": "", + "sust": 0, + "boisson": false, + "desaltere": 0, + "alcoolise": false, + "force": 0, + "qualite": 0, + "exotisme": 0, + "encombrement": 0, + "quantite": 1, + "cout": 0 + }, + "signedraconique": { + "typesTMR": [], + "ephemere": true, + "duree": "1 round", + "difficulte": 0, + "valeur": { + "norm": 3, + "sign": 5, + "part": 10 + }, + "description": "", + "descriptionmj": "" + }, + "sortreserve": { + "sortid" : "", + "draconic": "", + "coord": "", + "ptreve": 0, + "heurecible": "", + "echectotal": false + } } -}, -"Item": { - "types": ["objet", "arme", "armure", "conteneur", "competence", "sort", "herbe", "ingredient", "livre", "potion", "munition", "rencontresTMR", "queue", "ombre", "souffle", - "tete", "competencecreature", "tarot", "monnaie", "nombreastral", "tache", "meditation", "casetmr", "recettealchimique", - "musique", "chant", "danse", "jeu", "recettecuisine", "maladie", "poison", "oeuvre", "nourritureboisson", "signedraconique", "gemme", - "possession", "sortreserve" ], - "possession": { - "typepossession": "", - "possede": false, - "possessionid": "", - "possesseurid": "", - "possedeid": "", - "compteur": 0, - "date": 0, - "description": "" - }, - "objet": { - "description": "", - "descriptionmj": "", - "quantite": 1, - "encombrement": 0, - "equipe": false, - "resistance": 0, - "qualite": 0, - "cout": 0 - }, - "gemme": { - "type": "", - "description": "", - "encombrement": 0, - "quantite": 1, - "cout": 0, - "taille": 0, - "purete": 0, - "inertie": 0, - "enchantabilite": 0, - "qualite": 0 - }, - "conteneur": { - "description": "", - "descriptionmj": "", - "capacite": 0, - "encombrement": 0, - "equipe": false, - "qualite": 0, - "contenu": [], - "cout": 0 - }, - "arme": { - "categorie_parade": "", - "description": "", - "descriptionmj": "", - "quantite": 1, - "encombrement": 0, - "equipe": false, - "dommages": "0", - "penetration": 0, - "force": "0", - "resistance": 0, - "competence": "", - "cout": 0, - "portee_courte": 0, - "magique": false, - "ecaille_efficacite": 0, - "resistance_magique": 0, - "portee_moyenne": 0, - "portee_extreme": 0, - "rapide": false, - "deuxmains": false, - "unemain": false, - "initpremierround": "" - }, - "munition": { - "description": "", - "descriptionmj": "", - "quantite": 1, - "encombrement": 0, - "equipe": false, - "qualite": 0, - "cout": 0 - }, - "armure": { - "description": "", - "descriptionmj": "", - "quantite": 1, - "encombrement": 0, - "equipe": false, - "protection": 0, - "deterioration": 0, - "malus": 0, - "cout": 0 - }, - "competence": { - "niveau": 0, - "default_diffLibre": 0, - "base": 0, - "categorie": "", - "xp": 0, - "description": "Compétence : ...", - "descriptionmj": "", - "defaut_carac": "", - "niveau_archetype": 0, - "xp_sort": 0 - }, - "competencecreature": { - "categorie_parade": "", - "niveau": 0, - "default_diffLibre": 0, - "categorie": "", - "carac_value": 0, - "iscombat": false, - "isnaturelle": true, - "ispossession": false, - "dommages": 0, - "description": "Compétence : ...", - "descriptionmj": "" - }, - "sort": { - "description": "", - "descriptionmj": "", - "draconic": "", - "duree": "", - "JR": "", - "cible": "", - "difficulte": "", - "portée": "", - "caseTMR": "", - "caseTMRspeciale": "", - "ptreve": "", - "xp": 0, - "bonuscase": "", - "isrituel": false, - "coutseuil": 0 - }, - "herbe": { - "description": "", - "descriptionmj": "", - "niveau": 0, - "base": 0, - "quantite": 1, - "milieu": "", - "rarete": "", - "categorie": "", - "cout": 0 - }, - "ingredient": { - "description": "", - "descriptionmj": "", - "niveau": 0, - "encombrement": 0, - "base": 0, - "quantite": 1, - "milieu": "", - "rarete": "", - "categorie": "", - "cout": 0 - }, - "tache": { - "carac": "", - "competence": "", - "periodicite": "", - "fatigue": 1, - "difficulte": 0, - "points_de_tache": 4, - "points_de_tache_courant": 0, - "nb_jet_echec": 0, - "nb_jet_succes": 0, - "cacher_points_de_tache": false, - "description": "", - "descriptionmj": "" - }, - "livre": { - "description": "", - "descriptionmj": "", - "competence": "", - "auteur": "", - "quantite": 1, - "difficulte": 0, - "points_de_tache": 0, - "encombrement": 0, - "xp": "", - "niveau_minimum": 0, - "niveau_maximum": 0, - "cout": 0 - }, - "potion": { - "description": "", - "descriptionmj": "", - "quantite": 1, - "encombrement": 0, - "rarete": "", - "categorie": "", - "herbe": "", - "herbebrins": 0, - "herbebonus": 0, - "reposalchimique": false, - "pr": 0, - "prpermanent": false, - "prdate": 0, - "cout": 0 - }, - "rencontresTMR": { - "description": "", - "descriptionmj": "" - }, - "queue": { - "description": "", - "descriptionmj": "", - "refoulement": 0, - "duree": "", - "restant" : 0 - }, - "ombre": { - "description": "", - "descriptionmj": "", - "refoulement": 2, - "duree": "", - "restant" : 0 - }, - "souffle": { - "description": "", - "descriptionmj": "", - "duree": "", - "restant" : 0 - }, - "tete": { - "description": "", - "descriptionmj": "" - }, - "tarot": { - "concept":"", - "aspect":"", - "description": "", - "descriptionmj": "" - }, - "nombreastral": { - "value": 0, - "istrue": false, - "jourindex": 1, - "jourlabel": "" - }, - "monnaie": { - "quantite": "", - "valeur_deniers":0, - "encombrement":0, - "description": "", - "descriptionmj": "" - }, - "meditation": { - "competence": "", - "theme": "", - "support": "", - "heure": "", - "purification": "", - "veture": "", - "comportement": "", - "tmr": "", - "malus" : 0, - "description": "", - "descriptionmj": "" - }, - "casetmr": { - "coord": "", - "type": "", - "label": "", - "specific": "", - "description": "", - "descriptionmj": "", - "sourceid":"" - }, - "recettealchimique": { - "but": "", - "utilisation": "", - "enchantement": "", - "sureffet": "", - "manipulation": "", - "description": "", - "descriptionmj": "" - }, - "musique": { - "niveau": "", - "reference": "", - "description": "", - "descriptionmj": "" - }, - "danse": { - "type": "", - "agilite": false, - "apparence": false, - "niveau": "", - "reference": "", - "description": "", - "descriptionmj": "" - }, - "chant": { - "niveau": "", - "reference": "", - "description": "", - "descriptionmj": "" - }, - "jeu": { - "type": "", - "base": "", - "caraccomp": "", - "reference": "", - "description": "", - "descriptionmj": "" - }, - "recettecuisine": { - "niveau": "", - "ingredients": "", - "duree": "", - "sust": 0, - "exotisme": 0, - "reference": "", - "description": "", - "descriptionmj": "" - }, - "oeuvre": { - "default_carac": "", - "competence": "", - "niveau": 0, - "reference": "", - "description": "", - "descriptionmj": "" - }, - "maladie": { - "identifie": false, - "malignite": 0, - "periodicite": "", - "remedesconnus": false, - "remedes": "", - "dommages":"", - "description": "", - "descriptionmj": "" - }, - "poison": { - "identifie": false, - "malignite": 0, - "periodicite": "", - "remedesconnus": false, - "remedes": "", - "dommages":"", - "active": false, - "description": "", - "descriptionmj": "" - }, - "nourritureboisson": { - "description": "", - "descriptionmj": "", - "sust": 0, - "boisson": false, - "desaltere": 0, - "alcoolise": false, - "force": 0, - "qualite": 0, - "exotisme": 0, - "encombrement": 0, - "quantite": 1, - "cout": 0 - }, - "signedraconique": { - "typesTMR": [], - "ephemere": true, - "duree": "1 round", - "difficulte": 0, - "valeur": { - "norm": 3, - "sign": 5, - "part": 10 - }, - "description": "", - "descriptionmj": "" - }, - "sortreserve": { - "sortid" : "", - "draconic": "", - "coord": "", - "ptreve": 0, - "heurecible": "", - "echectotal": false - } -} } diff --git a/templates/dialog-astrologie-joueur.html b/templates/dialog-astrologie-joueur.html index b7ebc37c..3b7d2fad 100644 --- a/templates/dialog-astrologie-joueur.html +++ b/templates/dialog-astrologie-joueur.html @@ -6,7 +6,7 @@ - {{#select diffConditions}} {{#each ajustementsConditions as |key|}} @@ -14,7 +14,7 @@ {{/select}} - {{#select joursSuivants}} {{#each dates as |date key|}} diff --git a/templates/item-sortreserve-sheet.html b/templates/item-sortreserve-sheet.html index 67b254f6..5ab75960 100644 --- a/templates/item-sortreserve-sheet.html +++ b/templates/item-sortreserve-sheet.html @@ -2,7 +2,6 @@ {{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
- {{log 'sortreserve' this}} {{#if (and system.sortid sort)}}