diff --git a/module/actor.js b/module/actor.js index 7f74625f..43c69973 100644 --- a/module/actor.js +++ b/module/actor.js @@ -126,9 +126,11 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ getBonusDegat() { - return parseInt(this.data.data.attributs.plusdom.value); + return Misc.toInt(this.data.data.attributs.plusdom.value); + } + getProtectionNaturelle() { + return Misc.toInt(this.data.data.attributs.protection.value); } - /* -------------------------------------------- */ getCompetence(compName) { return RdDUtility.findCompetence(this.data.items, compName); @@ -1909,6 +1911,7 @@ export class RdDActor extends Actor { this.updateEmbeddedEntity("OwnedItem", update); } } + protection += this.getProtectionNaturelle(); console.log("Final protect", protection); return protection; } diff --git a/system.json b/system.json index 84799848..82c818fa 100644 --- a/system.json +++ b/system.json @@ -5,7 +5,7 @@ "version": "1.1.10", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.8", - "templateVersion": 69, + "templateVersion": 70, "author": "LeRatierBretonnien", "esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ], "styles": ["styles/simple.css"], diff --git a/template.json b/template.json index f3ed1b3a..35fdbc9e 100644 --- a/template.json +++ b/template.json @@ -49,7 +49,7 @@ "max": 10, "value": 10, "label": "Endurance", - "derivee": false + "derivee": false }, "resonnance": { "actors" : [] @@ -77,6 +77,12 @@ "value": 0, "label": "Vitesse", "derivee": true + }, + "protection": { + "type": "number", + "value": 0, + "label": "Protection", + "derivee": false } } }, @@ -138,7 +144,7 @@ "max": 10, "value": 10, "label": "Endurance", - "derivee": false + "derivee": false }, "sonne": { "value": false, @@ -178,13 +184,13 @@ "type": "number", "value": 0, "label": "Encombrement", - "derivee": false + "derivee": false }, "protection": { "type": "number", "value": 0, "label": "Protection", - "derivee": false + "derivee": false } }, "compteurs": { @@ -240,7 +246,7 @@ "value": 10, "label": "Dexterité", "xp": 0, - "derivee": false + "derivee": false }, "vue": { "type": "number", @@ -261,7 +267,7 @@ "value": 10, "label": "Odorat-Goût", "xp": 0, - "derivee": false + "derivee": false }, "volonte": { "type": "number", @@ -275,14 +281,14 @@ "value": 10, "label": "Intellect", "xp": 0, - "derivee": false + "derivee": false }, "empathie": { "type": "number", "value": 10, "label": "Empathie", "xp": 0, - "derivee": false + "derivee": false }, "reve": { "type": "number", @@ -400,6 +406,12 @@ "value": 0, "label": "Malus Armure", "derivee": true + }, + "protection": { + "type": "number", + "value": 0, + "label": "Protection naturelle", + "derivee": false } }, "reve": {