Fix DR/Parry bonuses

This commit is contained in:
LeRatierBretonnien 2023-03-22 13:38:49 +01:00
parent 2813e5a694
commit ed494e69b9
3 changed files with 7 additions and 5 deletions

View File

@ -1,2 +1,4 @@
# fvtt-pegasus-rpg
# fvtt-warhero

View File

@ -708,7 +708,7 @@ export class WarheroActor extends Actor {
}
/* -------------------------------------------- */
computeDRTotal() {
let armors = this.items.filter(it => it.type == "armor")
let armors = this.items.filter(it => it.type == "armor" && it.system.slotlocation == 'armor')
let dr = 0
for (let armor of armors) {
dr += armor.system.damagereduction
@ -717,7 +717,7 @@ export class WarheroActor extends Actor {
}
/* -------------------------------------------- */
computeParryBonusTotal() {
let shields = this.items.filter(it => it.type == "shield")
let shields = this.items.filter(it => it.type == "shield" && it.system.slotlocation == 'shield')
let parry = 0
for (let shield of shields) {
parry += shield.system.parrybonus

View File

@ -107,7 +107,7 @@
"styles": [
"styles/simple.css"
],
"version": "10.0.43",
"version": "10.0.44",
"compatibility": {
"minimum": "10",
"verified": "10",
@ -115,7 +115,7 @@
},
"title": "Warhero RPG",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.43.zip",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.44.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
"background": "images/ui/warhero_welcome_page.webp",
"id": "fvtt-warhero"