diff --git a/system/scripts/dice/roll.js b/system/scripts/dice/roll.js index fc0302b..8361f11 100644 --- a/system/scripts/dice/roll.js +++ b/system/scripts/dice/roll.js @@ -19,6 +19,7 @@ export class RollL5r5e extends Roll { keepLimit: null, isInitiativeRoll: false, skillAssistance: 0, + initialFormula: null, dicesTypes: { std: false, l5r: false, @@ -72,6 +73,11 @@ export class RollL5r5e extends Roll { super.evaluate({ minimize, maximize }); this._rolled = true; + // Save initial formula + if (!this.l5r5e.initialFormula) { + this.l5r5e.initialFormula = this.formula; + } + // Compute summary this.l5rSummary(); diff --git a/system/templates/dice/chat-roll.html b/system/templates/dice/chat-roll.html index 2fa2b1e..8807ce9 100644 --- a/system/templates/dice/chat-roll.html +++ b/system/templates/dice/chat-roll.html @@ -34,7 +34,7 @@ {{/if}} -
{{formula}}
+
{{#if l5r5e.initialFormula}}{{l5r5e.initialFormula}}{{else}}{{formula}}{{/if}}
{{#if l5r5e.dicesTypes.l5r}}