diff --git a/modules/vadentis-actor-sheet.js b/modules/vadentis-actor-sheet.js index fea07e2..65e7650 100644 --- a/modules/vadentis-actor-sheet.js +++ b/modules/vadentis-actor-sheet.js @@ -63,7 +63,7 @@ export class VadentisActorSheet extends ActorSheet { formData.optionsBase = VadentisUtility.createDirectOptionList(0, 50); formData.optionsMalus = VadentisUtility.createDirectReverseOptionList(-50, 0); formData.optionsBonus = VadentisUtility.createDirectOptionList(0, 50); - formData.optionsPV = VadentisUtility.createDirectIntegerOptionList(-50, 999); + formData.optionsPV = VadentisUtility.createOptionList(-50, 999); formData.optionsPE = VadentisUtility.createOptionList(-50, 999); formData.optionsPA = VadentisUtility.createOptionList(0, 20); diff --git a/modules/vadentis-actor.js b/modules/vadentis-actor.js index e5cb86e..e020f82 100644 --- a/modules/vadentis-actor.js +++ b/modules/vadentis-actor.js @@ -31,7 +31,7 @@ export class VadentisActor extends Actor { return super.create(data, options); } // If the created actor has items (only applicable to duplicated actors) bypass the new actor creation logic - if (system.items) { + if (data.items) { let actor = super.create(data, options); return actor; } @@ -193,7 +193,7 @@ export class VadentisActor extends Actor { /* -------------------------------------------- */ async rollDamage( weapon, damageType ) { - let formula = VadentisUtility.processDamageString( weapon.system.data[damageType], this ); + let formula = VadentisUtility.processDamageString( weapon.system[damageType], this ); let degatsRoll = await VadentisUtility.processRoll( formula ); let msgData = { alias: this.name, @@ -209,7 +209,7 @@ export class VadentisActor extends Actor { /* -------------------------------------------- */ async rollSortDevotionDamage( sort, damageType ) { - let formula = VadentisUtility.processDamageString( sort.system.data[damageType], this ); + let formula = VadentisUtility.processDamageString( sort.system[damageType], this ); let degatsRoll = await VadentisUtility.processRoll( formula ); let msgData = { alias: this.name, @@ -353,7 +353,7 @@ export class VadentisActor extends Actor { } let statValue = competence.system.base + competence.system.malus + competence.system.bonus; - let formulaFull = this.buildTexteFormula( competence.data ); + let formulaFull = this.buildTexteFormula( competence.system ); let myRoll = await VadentisUtility.processRoll("1d20+"+statValue, msgData.rollMode ); msgData.msg = `${formulaFull} => ${myRoll.total}`; console.log(formulaFull, myRoll) diff --git a/system.json b/system.json index 6f507c3..ca6ae70 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "foundryvtt-vadentis", "title": "Vadentis", "description": "Système Vadentis pour FoundryVTT", - "version": "11.0.0", + "version": "11.0.1", "compatibility": { "minimum": "11", "verified": "12" @@ -223,6 +223,6 @@ "socket": true, "url": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis", "manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis/-/raw/master/system.json", - "download": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis/archive/foundryvtt-vadentis-v11.0.0.zip", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis/archive/foundryvtt-vadentis-v11.0.1.zip", "license": "LICENSE.txt" } diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index d5b61a1..ecbe73f 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -266,6 +266,9 @@ Total {{#each data.combat as |mycombat key|}} + {{#if (eq mycombat.label "Esquive")}} + + {{else}}