From 6184a9f214e24ac41eac9b80c710d7bc695834f9 Mon Sep 17 00:00:00 2001 From: Byroks Date: Sat, 25 May 2024 12:20:12 +0200 Subject: [PATCH] Fix Bonus bei Wurf anzeige MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: + Situations Boni wird nicht mehr auf den Würfel gerechnet sondern seperat angezeigt wie andere Boni --- lang/de.json | 2 +- source/module/rolls/M5Roll.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lang/de.json b/lang/de.json index 21443eb..4a7f4af 100644 --- a/lang/de.json +++ b/lang/de.json @@ -1,6 +1,6 @@ { "TYPES.Actor.character": "Charakter", - "ACTOR.TypeNpc": "Kreatur / Nichtspielerfigur", + "TYPES.Actor.npc": "Kreatur / Nichtspielerfigur", "ACTOR.TypeVehicle": "Transportmittel / Pferd etc.", "TYPES.Item.item": "Gegenstand", diff --git a/source/module/rolls/M5Roll.ts b/source/module/rolls/M5Roll.ts index d47b4f4..c66c1fc 100644 --- a/source/module/rolls/M5Roll.ts +++ b/source/module/rolls/M5Roll.ts @@ -11,7 +11,12 @@ export class M5Roll { public _total: number = 0; public pool: PoolTerm = null; - constructor(public data: M5RollData, public actor: any, public label: string, public id?: string) { + constructor( + public data: M5RollData, + public actor: any, + public label: string, + public id?: string + ) { //super(null) //this.data = rollData } @@ -26,7 +31,7 @@ export class M5Roll { .map((rollName, index) => { indexMap.set(index, rollName); const formula = this.data.rolls[rollName]; - formula.formula = index === 0 && this.id !== "-1" ? formula.formula.replace(/(\d*d\d*)/, `{$1 + ${this.data.b.modifier}}`) : formula.formula; + formula.formula = index === 0 && this.id !== "-1" ? formula.formula + `+ ${this.data.b.modifier}` : formula.formula; const roll = new Roll(formula.formula, this.data); return roll; }); -- 2.40.1