diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js
index 7e9935c..5ee571f 100644
--- a/modules/pegasus-actor.js
+++ b/modules/pegasus-actor.js
@@ -350,6 +350,7 @@ export class PegasusActor extends Actor {
/* -------------------------------------------- */
async computeNRGHealth() {
+ if ( this.isToken) return
if (this.isOwner || game.user.isGM) {
let updates = {}
let phyDiceValue = PegasusUtility.getDiceValue(this.data.data.statistics.phy.value) + this.data.data.secondary.health.bonus + this.data.data.statistics.phy.mod;
@@ -521,15 +522,6 @@ export class PegasusActor extends Actor {
await this.createEmbeddedDocuments('Item', newItems)
}
- /* -------------------------------------------- */
- getShieldValue() {
- let shields = this.data.items.filter(item => item.type == "shield" && item.data.data.equipped)
- let def = 0
- for (let sh of shields) {
- def += sh.data.data.level
- }
- return def
- }
/* -------------------------------------------- */
addHindrancesList( effectsList ) {
@@ -562,15 +554,18 @@ export class PegasusActor extends Actor {
}
}
/* -------------------------------------------- */
- addArmorsShields( rollData, useShield = false) {
- let armors = this.getArmors()
- let armorLevel = 0
- for (let armor of armors) {
- armorLevel += armor.data.resistance
+ addArmorsShields( rollData, statKey = "none", useShield = false) {
+ if (statKey == 'phy') {
+ let armors = this.getArmors()
+ for (let armor of armors) {
+ rollData.armorsList.push( {label: `Armor ${armor.name}`, type: "other", applied: false, value: armor.data.resistance } )
+ }
}
- rollData.armorsList.push( {label: 'Total armor level', type: "other", applied: false, value: armorLevel } )
if (useShield ) {
- rollData.armorsList.push( {label: 'Shield level', type: "other", applied: false, value: this.getShieldValue() } )
+ let shields = this.data.items.filter(item => item.type == "shield" && item.data.data.equipped)
+ for (let sh of shields) {
+ rollData.armorsList.push( {label: `Shield ${sh.name}`, type: "other", applied: false, value: sh.data.data.level } )
+ }
}
}
@@ -593,7 +588,7 @@ export class PegasusActor extends Actor {
}
this.addEffects( rollData)
- this.addArmorsShields(rollData, useShield)
+ this.addArmorsShields(rollData, statKey, useShield)
return rollData
}
diff --git a/system.json b/system.json
index af98eca..f6be718 100644
--- a/system.json
+++ b/system.json
@@ -183,6 +183,6 @@
"templateVersion": 63,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
- "version": "0.2.1",
+ "version": "0.2.3",
"background" : "./images/ui/pegasus_welcome_page.webp"
}
diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html
index 36d7685..8e23ee8 100644
--- a/templates/actor-sheet.html
+++ b/templates/actor-sheet.html
@@ -295,24 +295,6 @@
{{/each}}
-
- Armor
-
-