diff --git a/module/actor-sheet.js b/module/actor-sheet.js index cba5cf81..1a9d1567 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -218,7 +218,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet { } // Points de reve actuel - this.html.find('.ptreve-actuel a').click(async event => this.actor.rollCarac('reve-actuel', true)) + this.html.find('.roll-reve-actuel').click(async event => this.actor.rollCarac('reve-actuel', true)) this.html.find('.empoignade-label a').click(async event => RdDEmpoignade.onAttaqueEmpoignadeFromItem(RdDSheetUtility.getItem(event, this.actor))) this.html.find('.arme-label a').click(async event => this.actor.rollArme(foundry.utils.duplicate(this._getEventArmeCombat(event)))) diff --git a/module/actor/export-scriptarium/actor-encart-sheet.js b/module/actor/export-scriptarium/actor-encart-sheet.js index 9fbbc6d1..8b997b95 100644 --- a/module/actor/export-scriptarium/actor-encart-sheet.js +++ b/module/actor/export-scriptarium/actor-encart-sheet.js @@ -10,7 +10,9 @@ export class RdDActorExportSheet extends RdDActorSheet { await loadTemplates([ "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs", "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs", + "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-compteur.hbs", "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs", + "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee-compteur.hbs", "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/competences.hbs", "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/esquive.hbs", "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs", @@ -46,6 +48,7 @@ export class RdDActorExportSheet extends RdDActorSheet { return Object.fromEntries(Mapping.getMapping().map(it => [it.column, { colName: it.colName ?? it.column, column: it.column, + rollClass: it.rollClass, value: it.getter(this.actor, context) }])) } diff --git a/module/actor/export-scriptarium/mapping.js b/module/actor/export-scriptarium/mapping.js index baa94bc2..3ffa059c 100644 --- a/module/actor/export-scriptarium/mapping.js +++ b/module/actor/export-scriptarium/mapping.js @@ -57,35 +57,38 @@ const MAPPING_BASE = [ { column: "metier", colName: 'Métier', getter: (actor, context) => actor.system.metier }, { column: "biographie", colName: 'Biographie', getter: (actor, context) => actor.system.biographie }, { column: "taille", getter: (actor, context) => actor.system.carac.taille.value }, - { column: "apparence", getter: (actor, context) => actor.system.carac.apparence.value }, - { column: "constitution", getter: (actor, context) => actor.system.carac.constitution.value }, - { column: "force", getter: (actor, context) => actor.system.carac.force.value }, - { column: "agilite", colName: 'Agilité', getter: (actor, context) => actor.system.carac.agilite.value }, - { column: "dexterite", colName: 'Dextérité', getter: (actor, context) => actor.system.carac.dexterite.value }, - { column: "vue", getter: (actor, context) => actor.system.carac.vue.value }, - { column: "ouie", colName: 'Ouïe', getter: (actor, context) => actor.system.carac.ouie.value }, - { column: "odoratgout", colName: 'Odo-goût', getter: (actor, context) => actor.system.carac.odoratgout.value }, - { column: "volonte", colName: 'Volonté', getter: (actor, context) => actor.system.carac.volonte.value }, - { column: "intellect", getter: (actor, context) => actor.system.carac.intellect.value }, - { column: "empathie", getter: (actor, context) => actor.system.carac.empathie.value }, - { column: "reve", colName: 'Rêve', getter: (actor, context) => actor.system.carac.reve.value }, - { column: "chance", getter: (actor, context) => actor.system.carac.chance.value }, - { column: "melee", colName: 'Mêlée', getter: (actor, context) => actor.system.carac.melee.value }, - { column: "tir", getter: (actor, context) => actor.system.carac.tir.value }, - { column: "lancer", getter: (actor, context) => actor.system.carac.lancer.value }, - { column: "derobee", colName: 'Dérobée', getter: (actor, context) => actor.system.carac.derobee.value }, + { column: "apparence", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.apparence.value }, + { column: "constitution", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.constitution.value }, + { column: "force", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.force.value }, + { column: "agilite", rollClass: 'roll-carac', colName: 'Agilité', getter: (actor, context) => actor.system.carac.agilite.value }, + { column: "dexterite", rollClass: 'roll-carac', colName: 'Dextérité', getter: (actor, context) => actor.system.carac.dexterite.value }, + { column: "vue", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.vue.value }, + { column: "ouie", rollClass: 'roll-carac', colName: 'Ouïe', getter: (actor, context) => actor.system.carac.ouie.value }, + { column: "odoratgout", rollClass: 'roll-carac', colName: 'Odo-goût', getter: (actor, context) => actor.system.carac.odoratgout.value }, + { column: "volonte", rollClass: 'roll-carac', colName: 'Volonté', getter: (actor, context) => actor.system.carac.volonte.value }, + { column: "intellect", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.intellect.value }, + { column: "empathie", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.empathie.value }, + { column: "reve", rollClass: 'roll-carac', colName: 'Rêve', getter: (actor, context) => actor.system.carac.reve.value }, + { column: "chance", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.chance.value }, + { column: "melee", rollClass: 'roll-carac', colName: 'Mêlée', getter: (actor, context) => actor.system.carac.melee.value }, + { column: "tir", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.tir.value }, + { column: "lancer", rollClass: 'roll-carac', getter: (actor, context) => actor.system.carac.lancer.value }, + { column: "derobee", rollClass: 'roll-carac', colName: 'Dérobée', getter: (actor, context) => actor.system.carac.derobee.value }, { column: "vie", getter: (actor, context) => actor.system.sante.vie.max }, + { column: "endurance", getter: (actor, context) => actor.system.sante.endurance.max }, { column: "plusdom", colName: '+dom', getter: (actor, context) => actor.system.attributs.plusdom.value }, { column: "protectionnaturelle", colName: 'Protection naturelle', getter: (actor, context) => actor.system.attributs.protection.value > 0 ? actor.system.attributs.protection.value : '' }, - { column: "endurance", getter: (actor, context) => actor.system.sante.endurance.max }, { column: "description", getter: (actor, context) => Mapping.getDescription(actor) }, { column: "armure", getter: (actor, context) => Mapping.getArmure(actor, context) }, { column: "protectionarmure", colName: 'Protection', getter: (actor, context) => Mapping.getProtectionArmure(actor, context) }, { column: "malus_armure", getter: (actor, context) => Mapping.getMalusArmure(actor, context) }, + { column: "reve_actuel", rollClass: 'roll-reve-actuel', colName: 'Rêve actuel', getter: (actor, context) => actor.system.reve.reve.value }, + { column: "vie_actuel", rollClass: 'jet-vie', getter: (actor, context) => actor.system.sante.vie.value }, + { column: "endurance_actuel", rollClass: 'jet-vie', getter: (actor, context) => actor.system.sante.endurance.value }, { column: "esquive", getter: (actor, context) => Mapping.getEsquive(context) }, { column: "esquive_armure", getter: (actor, context) => Mapping.getEsquiveArmure(context) }, { column: "competences", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_COMPETENCES) }, - { column: "draconic", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_DRACONIC) }, + { column: "draconic", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_DRACONIC) }, ] const MAPPING_ARMES = TABLEAU_ARMES.map(i => ColumnMappingFactory.createMappingArme('name', i)) @@ -212,7 +215,7 @@ export class Mapping { } static prepareSorts(actor) { - const codeVoies = Mapping.getCompetencesCategorie(actor, CATEGORIES_DRACONIC) + const codeVoies = Mapping.getCompetencesCategorie(actor, CATEGORIES_DRACONIC) .map(it => RdDItemSort.getVoieCode(it)) return actor.itemTypes[ITEM_TYPES.sort].map(it => Mapping.prepareSort(it, codeVoies)) @@ -263,7 +266,7 @@ export class Mapping { const poids = actor.system.poids const cheveux = actor.system.cheveux ? `cheveux ${actor.system.cheveux}` : undefined const yeux = actor.system.yeux ? `yeux ${actor.system.yeux}` : undefined - const beaute = actor.system.beaute ? `Beauté ${actor.system.beaute}` : undefined + const beaute = actor.system.beaute ? `beauté ${actor.system.beaute}` : undefined const list = [race, hn, age, taille, poids, cheveux, yeux, beaute] return Misc.join(list.filter(it => it), ', ') } diff --git a/templates/actor/export-scriptarium/actor-encart-sheet.hbs b/templates/actor/export-scriptarium/actor-encart-sheet.hbs index 8b9e713f..3b5cccca 100644 --- a/templates/actor/export-scriptarium/actor-encart-sheet.hbs +++ b/templates/actor/export-scriptarium/actor-encart-sheet.hbs @@ -26,7 +26,7 @@ {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.volonte}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.empathie}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.intellect}} - {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.reve}} + {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-compteur.hbs" carac=export.reve actuel=export.reve_actuel}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac.hbs" carac=export.chance}}