Save and display initialFormula on chat

This commit is contained in:
Vlyan
2021-02-08 19:19:15 +01:00
parent fc56afa28e
commit 0cb0a2f3ea
2 changed files with 7 additions and 1 deletions

View File

@@ -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();

View File

@@ -34,7 +34,7 @@
</div>
{{/if}}
<div class="l5r5e dice-formula">{{formula}}</div>
<div class="l5r5e dice-formula">{{#if l5r5e.initialFormula}}{{l5r5e.initialFormula}}{{else}}{{formula}}{{/if}}</div>
<div class="l5r5e dice-result">
{{#if l5r5e.dicesTypes.l5r}}