Protection naturelle #68

Prise en compte de la protection naturelle pour tous
This commit is contained in:
Vincent Vandemeulebrouck 2020-12-15 18:36:18 +01:00
parent 9077c9f26b
commit bdea0c5b8d
3 changed files with 26 additions and 11 deletions

View File

@ -126,9 +126,11 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getBonusDegat() { 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) { getCompetence(compName) {
return RdDUtility.findCompetence(this.data.items, compName); return RdDUtility.findCompetence(this.data.items, compName);
@ -1909,6 +1911,7 @@ export class RdDActor extends Actor {
this.updateEmbeddedEntity("OwnedItem", update); this.updateEmbeddedEntity("OwnedItem", update);
} }
} }
protection += this.getProtectionNaturelle();
console.log("Final protect", protection); console.log("Final protect", protection);
return protection; return protection;
} }

View File

@ -5,7 +5,7 @@
"version": "1.1.10", "version": "1.1.10",
"minimumCoreVersion": "0.7.5", "minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.8", "compatibleCoreVersion": "0.7.8",
"templateVersion": 69, "templateVersion": 70,
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",
"esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ], "esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ],
"styles": ["styles/simple.css"], "styles": ["styles/simple.css"],

View File

@ -49,7 +49,7 @@
"max": 10, "max": 10,
"value": 10, "value": 10,
"label": "Endurance", "label": "Endurance",
"derivee": false "derivee": false
}, },
"resonnance": { "resonnance": {
"actors" : [] "actors" : []
@ -77,6 +77,12 @@
"value": 0, "value": 0,
"label": "Vitesse", "label": "Vitesse",
"derivee": true "derivee": true
},
"protection": {
"type": "number",
"value": 0,
"label": "Protection",
"derivee": false
} }
} }
}, },
@ -138,7 +144,7 @@
"max": 10, "max": 10,
"value": 10, "value": 10,
"label": "Endurance", "label": "Endurance",
"derivee": false "derivee": false
}, },
"sonne": { "sonne": {
"value": false, "value": false,
@ -178,13 +184,13 @@
"type": "number", "type": "number",
"value": 0, "value": 0,
"label": "Encombrement", "label": "Encombrement",
"derivee": false "derivee": false
}, },
"protection": { "protection": {
"type": "number", "type": "number",
"value": 0, "value": 0,
"label": "Protection", "label": "Protection",
"derivee": false "derivee": false
} }
}, },
"compteurs": { "compteurs": {
@ -240,7 +246,7 @@
"value": 10, "value": 10,
"label": "Dexterité", "label": "Dexterité",
"xp": 0, "xp": 0,
"derivee": false "derivee": false
}, },
"vue": { "vue": {
"type": "number", "type": "number",
@ -261,7 +267,7 @@
"value": 10, "value": 10,
"label": "Odorat-Goût", "label": "Odorat-Goût",
"xp": 0, "xp": 0,
"derivee": false "derivee": false
}, },
"volonte": { "volonte": {
"type": "number", "type": "number",
@ -275,14 +281,14 @@
"value": 10, "value": 10,
"label": "Intellect", "label": "Intellect",
"xp": 0, "xp": 0,
"derivee": false "derivee": false
}, },
"empathie": { "empathie": {
"type": "number", "type": "number",
"value": 10, "value": 10,
"label": "Empathie", "label": "Empathie",
"xp": 0, "xp": 0,
"derivee": false "derivee": false
}, },
"reve": { "reve": {
"type": "number", "type": "number",
@ -400,6 +406,12 @@
"value": 0, "value": 0,
"label": "Malus Armure", "label": "Malus Armure",
"derivee": true "derivee": true
},
"protection": {
"type": "number",
"value": 0,
"label": "Protection naturelle",
"derivee": false
} }
}, },
"reve": { "reve": {