diff --git a/lang/fr.json b/lang/fr.json index 6de57cb..d08c7fc 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -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", diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index 035b93c..aa68c9f 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -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, diff --git a/templates/chat-message.hbs b/templates/chat-message.hbs index 6fb5638..822a7e5 100644 --- a/templates/chat-message.hbs +++ b/templates/chat-message.hbs @@ -28,6 +28,14 @@ {{nbDice}}d8 = {{diceSum}} + {{#if skillValue}} + + + {{skillValue}} + {{/if}} + {{#if woundMalus}} + + {{abs woundMalus}} + {{/if}} {{#if modifier}} {{#if (gt modifier 0)}}+{{else}}−{{/if}} {{abs modifier}}