diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 952d09f..5b7a683 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -912,12 +912,16 @@ export class PegasusActor extends Actor { getStat(statKey) { let stat if (this.type == "character" && statKey == 'mr') { - stat = duplicate(this.system.mr); + stat = duplicate(this.system.mr) } else { - stat = duplicate(this.system.statistics[statKey]); + stat = duplicate(this.system.statistics[statKey]) } - stat.dice = PegasusUtility.getDiceFromLevel(stat.value || stat.level); - return stat; + if ( stat.currentlevel) { + stat.dice = PegasusUtility.getDiceFromLevel(stat.currentlevel) + } else { + stat.dice = PegasusUtility.getDiceFromLevel(stat.value || stat.level) + } + return stat } /* -------------------------------------------- */ @@ -1828,8 +1832,12 @@ export class PegasusActor extends Actor { rollData.stat = this.getStat(statKey) if (rollData.stat.value != undefined) { rollData.stat.level = rollData.stat.value // Normalize + rollData.statDicesLevel = rollData.stat.level + rollData.stat.bonuseffect + } + if (rollData.stat.currentlevel) { + rollData.stat.level = rollData.stat.currentlevel + rollData.statDicesLevel = rollData.stat.currentlevel } - rollData.statDicesLevel = rollData.stat.level + rollData.stat.bonuseffect rollData.statMod = rollData.stat.mod if (vehicle) { rollData.vehicle = duplicate(vehicle) @@ -2009,7 +2017,7 @@ export class PegasusActor extends Actor { /*-------------------------------------------- */ rollStat(statKey) { - let stat = this.getStat(statKey); + let stat = this.getStat(statKey) if (stat) { let rollData = this.getCommonRollData(statKey) rollData.mode = "stat"