Fix #160 - Add new values...

This commit is contained in:
2022-11-27 20:39:45 +01:00
parent fcde81b0a4
commit 7755d87e48
3 changed files with 29 additions and 4 deletions

View File

@@ -136,11 +136,34 @@ export class PegasusActor extends Actor {
}
/* -------------------------------------------- */
getMT() {
return PegasusUtility.getDiceValue(this.system.statistics.mnd.value) + this.system.statistics.mnd.mod + PegasusUtility.getDiceValue(this.system.statistics.mnd.bonuseffect)
let modifier = 0
for(let effect of this.items) {
if (effect.type =="effect" && effect.system.affectstatus && effect.system.affectedstatus =="mt") {
if ( effect.system.genre == "positive") {
modifier += effect.system.effectlevel
}
if ( effect.system.genre == "negative") {
modifier -= effect.system.effectlevel
}
}
}
return PegasusUtility.getDiceValue(this.system.statistics.mnd.value) + this.system.statistics.mnd.mod + PegasusUtility.getDiceValue(this.system.statistics.mnd.bonuseffect) + modifier
}
/* -------------------------------------------- */
getKBV() {
return this.system.statistics.phy.value + this.system.statistics.phy.mod + this.system.statistics.phy.bonuseffect
let modifier = 0
for(let effect of this.items) {
if (effect.type =="effect" && effect.system.affectstatus && effect.system.affectedstatus == "kbv") {
if ( effect.system.genre == "positive") {
modifier += effect.system.effectlevel
}
if ( effect.system.genre == "negative") {
modifier -= effect.system.effectlevel
}
}
}
return this.system.statistics.phy.value + this.system.statistics.phy.mod + this.system.statistics.phy.bonuseffect + modifier
}
/* -------------------------------------------- */
getEncumbranceCapacity() {