From 28ee8607bb0bee5edcabaf49f7d0fa46c4feb6d1 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 4 Dec 2024 00:23:54 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20feuille=20simplifi=C3=A9e=20case=20TMR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cases spéciales des TMRs mal gérée... --- module/actor/export-scriptarium/mapping.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module/actor/export-scriptarium/mapping.js b/module/actor/export-scriptarium/mapping.js index e36db5ff..0db57523 100644 --- a/module/actor/export-scriptarium/mapping.js +++ b/module/actor/export-scriptarium/mapping.js @@ -169,10 +169,10 @@ export class Mapping { arme: arme } } - static dommagesArme(actor, arme, maniement){ + static dommagesArme(actor, arme, maniement) { const dmgArme = RdDItemArme.dommagesReels(arme, maniement) const dommages = Misc.toSignedString(dmgArme + RdDBonus.bonusDmg(actor, maniement, dmgArme)) - switch(arme.system.mortalite) { + switch (arme.system.mortalite) { case 'non-mortel': return `(${dommages})` case 'empoignade': return '-' } @@ -259,6 +259,9 @@ export class Mapping { const diff = 'R' + RdDItemSort.addSpaceToNonNumeric(sort.system.difficulte) return `${sort.name}${ptSeuil} (${caseTMR}) ${diff} ${coutReve}` } + static toVar(caseSpeciale) { + return Grammar.toLowerCaseNoAccent(caseSpeciale).startsWith('var') ? 'var' : caseSpeciale + } static bonusCase(sort) { const list = RdDItemSort.stringToBonuscases(sort.system.bonuscase).sort(Misc.descending(it => it.bonus))