Fix Bonus bei Wurf anzeige (#114)
Changes: + Situations Boni wird nicht mehr auf den Würfel gerechnet sondern seperat angezeigt wie andere Boni Reviewed-on: #114 Reviewed-by: Le-Frique <lefrique@live.de>
This commit was merged in pull request #114.
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user