diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 5a06e9a..9e4c2c9 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -1467,7 +1467,7 @@ export class PegasusActor extends Actor { updates['system.momentum.max'] = momentum } - let mrLevel = (this.system.statistics.agi.value + + this.system.statistics.agi.mod + this.system.statistics.str.value + this.system.statistics.str.mod) - (this.system.statistics.phy.value+this.system.statistics.phy.mod) + let mrLevel = (this.system.statistics.agi.value + this.system.statistics.agi.mod + this.system.statistics.str.value + this.system.statistics.str.mod) - (this.system.statistics.phy.value+this.system.statistics.phy.mod) mrLevel = (mrLevel < 1) ? 1 : mrLevel; if (mrLevel != this.system.mr.value) { updates['system.mr.value'] = mrLevel @@ -1573,10 +1573,11 @@ export class PegasusActor extends Actor { for (let e of effects) { meleeBonus += Number(e.system.effectlevel) } - this.baseMDL = this.system.biodata.sizenum + this.system.biodata.sizebonus + this.system.statistics.str.value + this.system.statistics.str.bonuseffect + meleeBonus + this.baseMDL = this.system.biodata.sizenum + this.system.biodata.sizebonus + this.system.statistics.str.value + + this.system.statistics.str.mod + this.system.statistics.str.bonuseffect + meleeBonus let weaponsMelee = this.items.filter(it => it.type == "weapon" && it.system.damagestatistic.toLowerCase() == "str") for (let w of weaponsMelee) { - let damage = Number(w.system.damage) + this.system.biodata.sizenum + this.system.biodata.sizebonus + this.system.statistics.str.value + this.system.statistics.str.bonuseffect + meleeBonus + let damage = this.baseMDL + Number(w.system.damage) if (damage != w.system.mdl) { updates.push({ _id: w.id, "system.mdl": damage }) } @@ -1590,9 +1591,10 @@ export class PegasusActor extends Actor { if (role?.name?.toLowerCase() == "ranged") { // Add ranged bonus to ADRL roleBonus = this.getRoleLevel() } + this.baseRDL = roleBonus + rangedBonus let weaponsRanged = this.items.filter(it => it.type == "weapon" && it.system.damagestatistic.toLowerCase() == "pre") for (let w of weaponsRanged) { - let damage = roleBonus + Number(w.system.damage) + rangedBonus + let damage = this.baseRDL + Number(w.system.damage) if (damage != w.system.rdl) { updates.push({ _id: w.id, "system.rdl": damage }) } @@ -1607,10 +1609,11 @@ export class PegasusActor extends Actor { if (role?.name?.toLowerCase() == "defender") { // Add defender bonus to ADRL roleBonus = this.getRoleLevel() } - this.baseADRL = roleBonus + this.system.statistics.phy.value + this.system.statistics.phy.bonuseffect + this.system.biodata.sizenum + this.system.biodata.sizebonus + this.baseADRL = roleBonus + armorBonus + this.system.statistics.phy.value + this.system.statistics.phy.mod + + this.system.statistics.phy.bonuseffect + this.system.biodata.sizenum + this.system.biodata.sizebonus let armors = this.items.filter(it => it.type == "armor") for (let a of armors) { - let adrl = roleBonus + this.system.statistics.phy.value + this.system.statistics.phy.bonuseffect + this.system.biodata.sizenum + this.system.biodata.sizebonus + a.system.resistance + armorBonus + let adrl = this.baseADRL + a.system.resistance if (adrl != a.system.adrl) { updates.push({ _id: a.id, "system.adrl": adrl }) } diff --git a/system.json b/system.json index 6f9365c..3f9b0d8 100644 --- a/system.json +++ b/system.json @@ -252,7 +252,7 @@ ], "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "11.0.17", - "download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.17.zip", + "version": "11.0.18", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.18.zip", "background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp" } \ No newline at end of file