From 773d06f8d5709195a701d1864e337e63f9cbafeb Mon Sep 17 00:00:00 2001 From: sladecraven Date: Thu, 8 Apr 2021 13:58:51 +0200 Subject: [PATCH] Ehance UI and weapon damages --- modules/vadentis-actor-sheet.js | 13 +++++- modules/vadentis-actor.js | 70 +++++++++++++++++++++++++++----- modules/vadentis-combat.js | 38 ++++++++++++++++++ modules/vadentis-utility.js | 71 ++++++++++++++++++++++++++++----- packs/donnees.db | 11 +++++ packs/eglises.db | 7 ++++ styles/simple.css | 21 ++++++---- system.json | 4 +- template.json | 1 + templates/actor-sheet.html | 32 ++++++--------- 10 files changed, 218 insertions(+), 50 deletions(-) diff --git a/modules/vadentis-actor-sheet.js b/modules/vadentis-actor-sheet.js index a23e5ea..0047ba6 100644 --- a/modules/vadentis-actor-sheet.js +++ b/modules/vadentis-actor-sheet.js @@ -38,7 +38,7 @@ export class VadentisActorSheet extends ActorSheet { data.equipements = this.actor.getEquipements(); data.optionsBase = VadentisUtility.createDirectOptionList(0, 50); - data.optionsMalus = VadentisUtility.createDirectOptionList(-50, 0); + data.optionsMalus = VadentisUtility.createDirectReverseOptionList(-50, 0); data.optionsBonus = VadentisUtility.createDirectOptionList(0, 50); data.optionsPV = VadentisUtility.createOptionList(-50, 200); data.optionsPE = VadentisUtility.createOptionList(-50, 200); @@ -103,6 +103,17 @@ export class VadentisActorSheet extends ActorSheet { const weapon = this.actor.getOwnedItem(li.data("item-id")); this.actor.rollWeapon(weapon); }); + html.find('.weapon-damage').click((event) => { + const li = $(event.currentTarget).parents(".item"); + const weapon = this.actor.getOwnedItem(li.data("item-id")); + this.actor.rollDamage(weapon, 'damage'); + }); + html.find('.weapon-damage-critical').click((event) => { + const li = $(event.currentTarget).parents(".item"); + const weapon = this.actor.getOwnedItem(li.data("item-id")); + this.actor.rollDamage(weapon, 'criticaldamage'); + }); + html.find('.competence-base').change((event) => { let skillName = event.currentTarget.attributes.skillname.value; this.actor.updateCompetence(skillName, "base", parseInt(event.target.value)); diff --git a/modules/vadentis-actor.js b/modules/vadentis-actor.js index d64129c..da91de7 100644 --- a/modules/vadentis-actor.js +++ b/modules/vadentis-actor.js @@ -1,5 +1,9 @@ +/* -------------------------------------------- */ import { VadentisUtility } from "./vadentis-utility.js"; +/* -------------------------------------------- */ +const MIN_PV = -50; +const MIN_PE = -50; /* -------------------------------------------- */ /** @@ -114,36 +118,84 @@ export class VadentisActor extends Actor { myRoll.evaluate(); myRoll.toMessage( { flavor: `Lancer de ${name} : ${devotionSort.name} (${formulaFull})` } ); - if (myRoll.total >= devotionSort.data.difficulty) { + if (myRoll.results[0] > 1 && myRoll.total >= devotionSort.data.difficulty) { let content = `${this.name} a réussi son ${name} et perd ${devotionSort.data.pe} Points d'Energie. L'effet suivant se produit:
${devotionSort.data.effect}`; let newEnergie = this.data.data.stats.pointsenergie.value - devotionSort.data.pe; await this.update( {'data.stats.pointsenergie.value': newEnergie }); if ( devotionSort.data.damage != "") { + let degatsText = `
Et provoque les dégats suivants : `; + let formula = devotionSort.data.damage; if (myRoll.results[0] == 20 ) { // Critique ? - content += `
Et provoque les dégats critiques suivants : ${devotionSort.data.damagecritical}`; - } else { - content += `
Et provoque les dégats suivants : ${devotionSort.data.damage}`; + degatsText += `
Et provoque les dégats critiques suivants : `; + formula = devotionSort.data.damagecritical; + } + content += degatsText; + /*let myRoll = new Roll(formula); + myRoll.evaluate(); + if (game.modules.get("dice-so-nice") && game.modules.get("dice-so-nice").active) { + await game.dice3d.showForRoll(degatsRoll, game.user, true); } + content += myRoll.total + `(${devotionSort.data.damagecritical})`; */ + content += `${devotionSort.data.damagecritical}`; } if ( newEnergie < 0) { - content += `
Les Points d'Energie de ${this.name} sont négatifs ! Il convient d'éditer ses Points de Vie en conséquence.`; + content += `
Attention : Les Points d'Energie de ${this.name} sont négatifs ! Il convient d'éditer ses Points de Vie en conséquence.`; } ChatMessage.create( { content: content} ); } else { - ChatMessage.create( { content: `${this.name} a échoué son lancer de ${name}` } ); + if (myRoll.results[0] == 1 ) { // Critique ? + ChatMessage.create( { content: `${this.name} a fait un échec critique à son lancer de ${name}` } ); + } else { + ChatMessage.create( { content: `${this.name} a échoué son lancer de ${name}` } ); + } } } + /* -------------------------------------------- */ + async rollDamage( weapon, damageType ) { + let formula = VadentisUtility.processDamageString( weapon.data.data[damageType], this ); + let degatsRoll = await VadentisUtility.processRoll( formula ); + + ChatMessage.create( { content: `${this.name} frappe avec ${weapon.name} et produit ${degatsRoll.total} Points de Dégâts (${formula}).` } ); + } + + /* -------------------------------------------- */ + async applyDamage( damageValue ) { + let pvData = this.data.data.stats.pointsvie; + let newValue = Math.max( pvData.value - damageValue, MIN_PV); + await this.update( {'data.stats.pointsvie.value': newValue }); + ChatMessage.create( { content: `${this.name} vient de perdre ${damageValue} Points de Vie. Ses Points de Vie actuels sont désormais de ${newValue}.` } ); + } + + /* -------------------------------------------- */ + _getCombatValue(mydata) { + if ( Number(mydata.base)) { + return mydata.base + mydata.malus + mydata.bonus; + }else { + return Number(mydata.base[0]) + Number(mydata.malus[0]) + Number(mydata.bonus[0]); + } + } + + /* -------------------------------------------- */ + getInitiativeScore( ) { + let initData = this.data.data.combat.initiative; + return this._getCombatValue( initData); + } /* -------------------------------------------- */ getDefenseScore( ) { let defenseData = this.data.data.combat.defense; - return defenseData.base + defenseData.malus + defenseData.bonus; + return this._getCombatValue( defenseData); + } + /* -------------------------------------------- */ + getForceScore( ) { + let forceData = this.data.data.combat.force; + return this._getCombatValue( forceData); } /* -------------------------------------------- */ getAttaqueScore( ) { let attaqueData = this.data.data.combat.attaque; - return attaqueData.base + attaqueData.malus + attaqueData.bonus; + return this._getCombatValue( attaqueData); } /* -------------------------------------------- */ @@ -193,7 +245,7 @@ export class VadentisActor extends Actor { /* -------------------------------------------- */ rollCombat( combatName ) { let stat = this.data.data.combat[combatName]; - let statValue = stat.base + stat.malus + stat.bonus; + let statValue = this._getCombatValue( stat ); let formulaFull = `1d20+${stat.base}+${stat.malus}+${stat.bonus}`; let myRoll = new Roll("1d20+"+statValue); myRoll.evaluate(); diff --git a/modules/vadentis-combat.js b/modules/vadentis-combat.js index 257864d..681bdc6 100644 --- a/modules/vadentis-combat.js +++ b/modules/vadentis-combat.js @@ -3,5 +3,43 @@ import { VadentisUtility } from "./vadentis-utility.js"; /* -------------------------------------------- */ export class VadentisCombat extends Combat { + /* -------------------------------------------- */ + async rollInitiative(ids, formula = undefined, messageOptions = {} ) { + console.log("Initiative is requested !!!"); + + ids = typeof ids === "string" ? [ids] : ids; + const currentId = this.combatant._id; + for (let cId = 0; cId < ids.length; cId++) { + const c = this.getCombatant(ids[cId]); + let initBonus = c.actor ? c.actor.getInitiativeScore() : 0; + console.log("Init for ", initBonus); + const roll = super._getInitiativeRoll(c, "1d20+"+initBonus); + + if (roll.total <= 0) roll.total = 0; + console.log("Compute init for", roll.total); + await this.updateEmbeddedEntity("Combatant", { _id: c._id, initiative: roll.total }); + + // Send a chat message + let rollMode = messageOptions.rollMode || game.settings.get("core", "rollMode"); + let messageData = mergeObject( + { + speaker: { + scene: canvas.scene._id, + actor: c.actor ? c.actor._id : null, + token: c.token._id, + alias: c.token.name, + sound: CONFIG.sounds.dice, + }, + flavor: `${c.token.name} a fait son jet d'Initiative (1d20+${initBonus}) +
+ `, + }, + messageOptions + ); + roll.toMessage(messageData, { rollMode, create: true }); + } + + return this; + } } diff --git a/modules/vadentis-utility.js b/modules/vadentis-utility.js index 2b1763e..09de322 100644 --- a/modules/vadentis-utility.js +++ b/modules/vadentis-utility.js @@ -18,11 +18,22 @@ export class VadentisUtility extends Entity { return loadTemplates(templatePaths); } + /* -------------------------------------------- */ + static updateCombat( combat, round, diff, id ) { + if (game.user.isGM && combat.data.round != 0 && combat.turns && combat.data.active) { + let turn = combat.turns.find(t => t.tokenId == combat.current.tokenId); + ChatMessage.create( { content: `Round ${combat.data.round} : C'est au tour de ${turn.actor.name}
` } ); + + canvas.tokens.get(turn.token._id).control(); + canvas.tokens.cycleTokens(1, true); + } + } + /* -------------------------------------------- */ static createOptionList( min, max) { let options = "" for(let i=min; i<=max; i++) { - options+= `\n`; + options += `\n`; } return options; } @@ -31,10 +42,18 @@ export class VadentisUtility extends Entity { static createDirectOptionList( min, max) { let options = {}; for(let i=min; i<=max; i++) { - options[i] = i; + options[`${i}`] = `${i}`; } return options; + } + /* -------------------------------------------- */ + static createDirectReverseOptionList( min, max) { + let options = {}; + for(let i=max; i>=min; i--) { + options[`${i}`] = `${i}`; } + return options; + } /* -------------------------------------------- */ static getTarget() { @@ -46,6 +65,25 @@ export class VadentisUtility extends Entity { return undefined; } + /* -------------------------------------------- */ + static processDamageString( formula, actor ) { + let workFormula = formula.toLowerCase(); + if ( workFormula.includes('bonus de force')) { + workFormula = workFormula.replace('bonus de force', actor.getForceScore()); + } + return workFormula; + } + + /* -------------------------------------------- */ + static async processRoll( formula ) { + let myRoll = new Roll(formula); + myRoll.evaluate(); + if (game.modules.get("dice-so-nice") && game.modules.get("dice-so-nice").active) { + await game.dice3d.showForRoll(myRoll, game.user, true); + } + return myRoll; + } + /* -------------------------------------------- */ static async performAttack( combatData) { let attacker = game.actors.get(combatData.attackerActorId); @@ -53,16 +91,27 @@ export class VadentisUtility extends Entity { if( attacker && defender) { let defense = defender.getDefenseScore(); let attaque = attacker.getAttaqueScore(); - console.log("Attaque : ", attaque); - let myRoll = new Roll("1d20"+attaque); - myRoll.evaluate() - if (game.modules.get("dice-so-nice") && game.modules.get("dice-so-nice").active) { - await game.dice3d.showForRoll(myRoll, game.user, true); - } - if (myRoll.total >= defense) { // Success ! - ChatMessage.create( { content: `${attacker.name} a réussi son attaque sur ${defender.name} (${myRoll.total} / ${defense}) !
Les dégâts sont de : ${combatData.arme.data.damage}`}); + + let myRoll = await this.processRoll("1d20+"+attaque); + if (myRoll.results[0] > 1 && myRoll.total >= defense) { // Success ! + let degats = `normaux : ${combatData.arme.data.damage}`; + let formula = combatData.arme.data.damage.toLowerCase(); + if ( myRoll.results[0] == 20) { + degats = `critiques : ${combatData.arme.data.criticaldamage}`; + formula = combatData.arme.data.criticaldamage.toLowerCase(); + } + ChatMessage.create( { content: `${attacker.name} a réussi son attaque sur ${defender.name} (${myRoll.total} / ${defense}) !
Les dégâts sont ${degats}`}); + + formula = this.processDamageString( formula, attacker ); + let degatsRoll = await this.processRoll(formula); + ChatMessage.create( { content: `Et les dégats infligés sont de ${degatsRoll.total} (${formula}) à appliquer à ${defender.name}`}); + defender.applyDamage( degatsRoll.total ); } else { //Echec - ChatMessage.create( { content: `${attacker.name} a raté son attaque sur ${defender.name} (${myRoll.total} / ${defense}) !` }); + if ( myRoll.results[0] == 1) { + ChatMessage.create( { content: `${attacker.name} a fait un échec critique et a raté son attaque sur ${defender.name} (${myRoll.total} / ${defense}) !` }); + } else { + ChatMessage.create( { content: `${attacker.name} a raté son attaque sur ${defender.name} (${myRoll.total} / ${defense}) !` }); + } } } else { ui.notifications.warn("Impossible de trouver l'attaquant et le défenseur.") diff --git a/packs/donnees.db b/packs/donnees.db index 30cd38f..6100c98 100644 --- a/packs/donnees.db +++ b/packs/donnees.db @@ -6,3 +6,14 @@ {"name":"Donnée de la Foudre","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[],"_id":"gypftiVXTACPuTg2"} {"name":"Donnée de la Terre","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[],"_id":"huZaByOsJ4OgOQM0"} {"name":"Donnée de l'Eau","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[],"_id":"xhNHMkKLL4kW0Sts"} +{"_id":"xhNHMkKLL4kW0Sts","name":"Donnée de l'Eau","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_eau.webp","effects":[]} +{"_id":"xhNHMkKLL4kW0Sts","name":"Donnée de l'Eau","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[]} +{"_id":"xhNHMkKLL4kW0Sts","name":"Donnée de l'Eau","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[]} +{"_id":"xhNHMkKLL4kW0Sts","name":"Donnée de l'Eau","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_eau.webp","effects":[]} +{"_id":"5rTJDLgO7HjQsPbr","name":"Donnée de l'Ombre","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_ombre.webp","effects":[]} +{"_id":"gypftiVXTACPuTg2","name":"Donnée de la Foudre","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_foudre.webp","effects":[]} +{"_id":"grt6xY5BY1kPGsmV","name":"Donnée de la Lumière","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_lumi%C3%A8re.webp","effects":[]} +{"_id":"huZaByOsJ4OgOQM0","name":"Donnée de la Terre","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_terre.webp","effects":[]} +{"_id":"aIpYtzCM1yWCDAU6","name":"Donnée des Sentiments","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_sentiments.webp","effects":[]} +{"_id":"RrwN3NGZQZmlE1xn","name":"Donnée du Feu","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_feu.webp","effects":[]} +{"_id":"3Rm5NhRowtPPXDGY","name":"Donnée du Vent","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"donnee","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/donn%C3%A9e_vent.webp","effects":[]} diff --git a/packs/eglises.db b/packs/eglises.db index 71880dd..a1af8ff 100644 --- a/packs/eglises.db +++ b/packs/eglises.db @@ -5,3 +5,10 @@ {"name":"Adorateurs de Yeshua","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[],"_id":"TV6QiHWXprN8PBjm"} {"name":"Eglise du Soleil","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[],"_id":"muPAkVllu9D6cE7Q"} {"name":"Eglise du Temps","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[],"_id":"nEAicuYriaP3hmc2"} +{"_id":"TV6QiHWXprN8PBjm","name":"Adorateurs de Yeshua","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[]} +{"_id":"1gQX3Uq6tVXAtQcX","name":"Eglise des 26","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/eglise_26.webp","effects":[]} +{"_id":"KWX1EDBkp1yPhoa0","name":"Eglise des Ombres","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/eglise_ombres.webp","effects":[]} +{"_id":"muPAkVllu9D6cE7Q","name":"Eglise du Soleil","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/eglise_soleil.webp","effects":[]} +{"_id":"nEAicuYriaP3hmc2","name":"Eglise du Temps","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/eglise_temps.webp","effects":[]} +{"_id":"5T2uht7mCGI9rzyo","name":"Eglise Estuanienne","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"systems/foundryvtt-vadentis/images/icons/eglise_estuanienne.webp","effects":[]} +{"_id":"9bBe6gQLAnM5dpFq","name":"Les Elus d'Estuans","permission":{"default":0,"sCecJLVlaPEcY7nF":3},"type":"eglise","data":{"description":""},"flags":{},"img":"icons/svg/mystery-man.svg","effects":[]} diff --git a/styles/simple.css b/styles/simple.css index ff31c01..3aaab21 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -95,7 +95,12 @@ text-shadow: 0 0 10px red; cursor: pointer; } - +input:disabled { + color:#1c2058; +} +select:disabled { + color:#1c2058; +} table {border: 1px solid #7a7971;} .grid, .grid-2col { @@ -383,7 +388,7 @@ table {border: 1px solid #7a7971;} text-align: right; } -.rdddialog .dialog-roll-sort s{ +.rdddialog .dialog-roll-sort { width: 600px; height: 430px; z-index: 9999; @@ -444,7 +449,7 @@ table {border: 1px solid #7a7971;} /* ======================================== */ /* Sheet */ .window-app.sheet .window-content .sheet-header{ - background: #011d33 url("img/bg_header.webp") no-repeat left top; + background: #011d33 url("../images/ui/texture_feuille_perso_principale.webp") no-repeat left top; color: rgba(255, 255, 255, 1); } @@ -456,7 +461,7 @@ table {border: 1px solid #7a7971;} } .window-app .window-content, .window-app.sheet .window-content .sheet-body{ - background: rgb(245,245,240) url("img/bg_left.jpg") no-repeat left top; + background: rgb(245,245,240) url("../images/ui/texture_feuille_perso_onglets.webp") no-repeat left top; } section.sheet-body{padding: 0.25rem 0.5rem;} @@ -481,7 +486,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;} border-top: 0 none; border-bottom: 0 none; color: rgba(52, 52, 52, 0.95); - background: rgb(245,245,240) url("img/bg_menu.jpg") no-repeat left top; + background: rgb(245,245,240) url("../images/ui/texture_feuille_perso_onglets.webp") no-repeat left top; } nav.sheet-tabs .item { @@ -890,7 +895,7 @@ ul, li { /* Sidebar CSS */ #sidebar { font-size: 1rem; - background: rgb(105,85,65) url("img/bg_sid_dark.jpg") no-repeat right bottom; + background: rgb(105,85,65) url("../images/ui/texture_feuille_perso_principale.webp") no-repeat right bottom; background-position: 100%; color: rgba(220,220,220,0.75); } @@ -1373,7 +1378,7 @@ display: inline-flex; color: #CCC } #pause > img { - content: url(img/rdd_pause.png); + content: url(../images/ui/logo_transparent.webp); height: 256px; width: 256px; top: -75px; @@ -1381,7 +1386,7 @@ display: inline-flex; } #logo { - content : url(img/logo.png); + content : url(../images/ui/logo_complet.webp); width: 80px; height: 68px; } diff --git a/system.json b/system.json index bc9175b..7a57c4e 100644 --- a/system.json +++ b/system.json @@ -2,11 +2,11 @@ "name": "foundryvtt-vadentis", "title": "Vadentis", "description": "Système Vadentis pour FoundryVTT", - "version": "0.0.11", + "version": "0.0.13", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.9", - "templateVersion": 9, + "templateVersion": 11, "author": "Uberwald", "esmodules": [ "modules/vadentis-main.js" ], "styles": ["styles/simple.css"], diff --git a/template.json b/template.json index d47e4d0..6b18937 100644 --- a/template.json +++ b/template.json @@ -102,6 +102,7 @@ "effect": "", "notes": "", "damage": "", + "ismaintain": false, "damagecritical": "" }, "equipcommun": { diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 35fe2c3..00e05ab 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -26,8 +26,8 @@ {{!-- Carac Tab --}}
Editable/Vérouillé - {{#if editScore}}Editable{{else}}Vérouillé{{/if}} + src="systems/foundryvtt-vadentis/images/icons/{{#if editScore}}unlocked.svg{{else}}locked.svg{{/if}}" alt="Editable/Vérouillé" + >{{#if editScore}}Editable{{else}}Vérouillé{{/if}}
@@ -126,8 +126,8 @@
  • {{mycombat.label}} + {{selectOptions @root.optionsBase selected=mycombat.base localize=false}} + @@ -218,23 +218,17 @@ Bonus Malus
  • - {{#each data.combat as |combat key|}} + {{#each data.combat as |mycombat key|}}
  • - {{combat.label}} - + {{selectOptions @root.optionsBase selected=mycombat.base localize=false}} - + {{selectOptions @root.optionsMalus selected=mycombat.malus localize=false}} - + {{selectOptions @root.optionsBonus selected=mycombat.bonus localize=false}}
  • {{/each}} @@ -246,7 +240,7 @@
  • {{arme.name}} - {{arme.data.damage}} / {{arme.data.criticaldamage}} + {{arme.data.damage}} / {{arme.data.criticaldamage}}
  • {{/if}} {{/each}}