fix: affiche tous les composants dans la ligne formule du chat
Le total Foundry incluait skillValue + woundMalus mais la décomposition ne les montrait pas, ce qui rendait le total incompréhensible. - _getChatCardData : passe skillValue dans le contexte - chat-message.hbs : affiche skillValue (titre tooltip) et woundMalus séparément dans la ligne 'diceSum + skillValue ± woundMalus ± modifier ± aspectMod = total' - lang : ajoute Roll.skillValue Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -143,7 +143,8 @@
|
||||
"visibility": "Visibilité",
|
||||
"visibilityPublic": "Public",
|
||||
"visibilityGM": "MJ uniquement",
|
||||
"visibilitySelf": "Secret (moi)"
|
||||
"visibilitySelf": "Secret (moi)",
|
||||
"skillValue": "Valeur de compétence"
|
||||
},
|
||||
"Moon": {
|
||||
"none": "Aucune phase",
|
||||
|
||||
@@ -199,6 +199,7 @@ export class CelestopolRoll extends Roll {
|
||||
const threshold = SYSTEM.DIFFICULTY_CHOICES[this.options.difficulty]?.value ?? 0
|
||||
const margin = this.options.margin
|
||||
const woundMalus = this.options.woundMalus ?? 0
|
||||
const skillValue = this.options.skillValue ?? 0
|
||||
const woundLevelId = this.options.woundLevel ?? 0
|
||||
const woundLabel = woundLevelId > 0
|
||||
? game.i18n.localize(SYSTEM.WOUND_LEVELS[woundLevelId]?.label ?? "")
|
||||
@@ -240,8 +241,9 @@ export class CelestopolRoll extends Roll {
|
||||
margin,
|
||||
marginAbs: margin !== null ? Math.abs(margin) : null,
|
||||
marginAbove: margin !== null && margin >= 0,
|
||||
modifier: this.options.modifier,
|
||||
modifier: this.options.modifier ?? 0,
|
||||
aspectMod: this.options.aspectMod ?? 0,
|
||||
skillValue,
|
||||
useDestin: this.options.useDestin ?? false,
|
||||
nbDice: this.options.nbDice ?? diceResults.length,
|
||||
woundMalus,
|
||||
|
||||
@@ -28,6 +28,14 @@
|
||||
<span class="fl-ndice">{{nbDice}}d8</span>
|
||||
<span class="fl-eq"> = </span>
|
||||
<span class="fl-sum">{{diceSum}}</span>
|
||||
{{#if skillValue}}
|
||||
<span class="fl-op">+</span>
|
||||
<span class="fl-mod" title="{{localize "CELESTOPOL.Roll.skillValue"}}">{{skillValue}}</span>
|
||||
{{/if}}
|
||||
{{#if woundMalus}}
|
||||
<span class="fl-op">−</span>
|
||||
<span class="fl-mod wound" title="{{localize "CELESTOPOL.Roll.woundMalus"}}">{{abs woundMalus}}</span>
|
||||
{{/if}}
|
||||
{{#if modifier}}
|
||||
<span class="fl-op">{{#if (gt modifier 0)}}+{{else}}−{{/if}}</span>
|
||||
<span class="fl-mod">{{abs modifier}}</span>
|
||||
|
||||
Reference in New Issue
Block a user