From dbb22bbeb7df985e160b68ee7c9a84913555e4e9 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Tue, 30 May 2023 19:25:26 +0200 Subject: [PATCH] Confrontation stuff --- lang/en.json | 23 +++-- lang/fr.json | 22 +++-- modules/actors/ecryme-actor-sheet.js | 6 ++ modules/actors/ecryme-actor.js | 46 ++++++---- modules/common/ecryme-utility.js | 49 +++++----- modules/dialogs/ecryme-confront-dialog.js | 90 +++++++++++++++++++ .../dialogs/ecryme-confront-start-dialog.js | 74 +++++++++++++++ modules/dialogs/ecryme-roll-dialog.js | 1 - modules/items/ecryme-item-sheet.js | 1 - postcss/ecryme.css | 29 +++++- styles/ecryme.css | 29 +++++- templates/actors/actor-sheet.hbs | 3 + templates/dialogs/confront-dialog.hbs | 58 ++++++++++++ templates/dialogs/confront-start-dialog.hbs | 13 +++ templates/dialogs/confrontation-dialog.hbs | 45 ---------- .../dialogs/partial-common-roll-dialog.hbs | 78 ++++++++++++++++ templates/dialogs/roll-dialog-generic.hbs | 78 +--------------- 17 files changed, 467 insertions(+), 178 deletions(-) create mode 100644 modules/dialogs/ecryme-confront-dialog.js create mode 100644 modules/dialogs/ecryme-confront-start-dialog.js create mode 100644 templates/dialogs/confront-dialog.hbs create mode 100644 templates/dialogs/confront-start-dialog.hbs delete mode 100644 templates/dialogs/confrontation-dialog.hbs create mode 100644 templates/dialogs/partial-common-roll-dialog.hbs diff --git a/lang/en.json b/lang/en.json index 64184e3..e7136bd 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,11 +1,13 @@ { - "ACTOR": { - "TypePersonnage": "PC" - }, - "ITEM": { - "TypeTrait": "Trait", - "TypeWeapon": "Weapon", - "TypeEquipment": "Equipment" + "TYPES": { + "Actor":{ + "Personnage": "PC" + }, + "Item": { + "Trait": "Trait", + "Weapon": "Weapon", + "Equipment": "Equipment" + } }, "ECRY": { "chat": { @@ -78,7 +80,12 @@ "traitmalus": "Malus traits", "applyideal": "Apply ideal", "applyspleen": "Apply spleen", - "skilltranscendence": "Self Transcendence" + "skilltranscendence": "Self Transcendence", + "confrontation": "Confrontation", + "rollnormal": "Normal (4d6)", + "rollspleen": "With Spleen (5d6, worst 4 are kept)", + "rollideal": "With Ideal (5d6, best 4 are kept)" + } } } \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json index 8b9a263..697e6e8 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1,11 +1,13 @@ { - "ACTOR": { - "TypePersonnage": "PC" - }, - "ITEM": { - "TypeTrait": "Trait", - "TypeWeapon": "Weapon", - "TypeEquipment": "Equipment" + "TYPES": { + "Actor":{ + "Personnage": "PJ" + }, + "Item": { + "Trait": "Trait", + "Weapon": "Arme", + "Equipment": "Equipement" + } }, "ECRY": { "chat": { @@ -78,7 +80,11 @@ "traitmalus": "Traits malus", "applyideal": "Utiliser l'idéal", "applyspleen": "Utiliser le spleen", - "skilltranscendence": "Dépassement de soi" + "skilltranscendence": "Dépassement de soi", + "confrontation": "Confrontation", + "rollnormal": "Normal (4d6)", + "rollspleen": "Avec le Spleen (5d6, 4 plus bas conservés)", + "rollideal": "Avec l'Idéal (5d6, 4 plus haut conservés)" } } } \ No newline at end of file diff --git a/modules/actors/ecryme-actor-sheet.js b/modules/actors/ecryme-actor-sheet.js index cd6e0eb..ac4724a 100644 --- a/modules/actors/ecryme-actor-sheet.js +++ b/modules/actors/ecryme-actor-sheet.js @@ -115,6 +115,12 @@ export class EcrymeActorSheet extends ActorSheet { let skillKey = $(event.currentTarget).data("skill-key") this.actor.rollSkill(categKey, skillKey) }); + html.find('.roll-skill-confront').click((event) => { + let categKey = $(event.currentTarget).data("category-key") + let skillKey = $(event.currentTarget).data("skill-key") + this.actor.rollSkillConfront(categKey, skillKey) + }); + html.find('.roll-weapon').click((event) => { const armeId = $(event.currentTarget).data("arme-id") this.actor.rollArme(armeId) diff --git a/modules/actors/ecryme-actor.js b/modules/actors/ecryme-actor.js index 4175886..436c4d7 100644 --- a/modules/actors/ecryme-actor.js +++ b/modules/actors/ecryme-actor.js @@ -1,7 +1,7 @@ /* -------------------------------------------- */ import { EcrymeUtility } from "../common/ecryme-utility.js"; import { EcrymeRollDialog } from "../dialogs/ecryme-roll-dialog.js"; - +import { EcrymeConfrontStartDialog } from "../dialogs/ecryme-confront-start-dialog.js"; /* -------------------------------------------- */ /* -------------------------------------------- */ @@ -82,7 +82,7 @@ export class EcrymeActor extends Actor { return comp; } getArchetype() { - let comp = duplicate(this.items.find(item => item.type == 'archetype') || {name: "Pas d'archetype"}) + let comp = duplicate(this.items.find(item => item.type == 'archetype') || { name: "Pas d'archetype" }) if (comp && comp.system) { comp.tarot = EcrymeUtility.getTarot(comp.system.lametutelaire) } @@ -116,9 +116,9 @@ export class EcrymeActor extends Actor { /* -------------------------------------------- */ prepareSkills() { let skills = duplicate(this.system.skills) - for (let categKey in skills) { + for (let categKey in skills) { let category = skills[categKey] - for (let skillKey in category.skilllist) { + for (let skillKey in category.skilllist) { let skill = category.skilllist[skillKey] skill.spec = this.getSpecializations(skillKey) } @@ -221,13 +221,13 @@ export class EcrymeActor extends Actor { } /* -------------------------------------------- */ - clearInitiative(){ + clearInitiative() { this.getFlag("world", "initiative", -1) } /* -------------------------------------------- */ getInitiativeScore(combatId, combatantId) { - let init = Math.floor( (this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2) - let subvalue = new Roll("1d20").roll({async: false}) + let init = Math.floor((this.system.attributs.physique.value + this.system.attributs.habilite.value) / 2) + let subvalue = new Roll("1d20").roll({ async: false }) return init + (subvalue.total / 100) } @@ -285,7 +285,7 @@ export class EcrymeActor extends Actor { spentSkillTranscendence(skill, value) { let newValue = this.system.skills[skill.categKey].skilllist[skill.skillKey].value - value newValue = Math.max(0, newValue) - this.update( { [`system.skills.${skill.categKey}.skilllist.${skill.skillKey}.value`]: newValue}) + this.update({ [`system.skills.${skill.categKey}.skilllist.${skill.skillKey}.value`]: newValue }) } /* -------------------------------------------- */ @@ -298,13 +298,13 @@ export class EcrymeActor extends Actor { rollData.isReroll = false rollData.traits = this.getRollTraits() rollData.spleen = this.getSpleen() - rollData.ideal = this.getIdeal() + rollData.ideal = this.getIdeal() return rollData } /* -------------------------------------------- */ - rollSkill(categKey, skillKey) { + getCommonSkill(categKey, skillKey) { let skill = this.system.skills[categKey].skilllist[skillKey] let rollData = this.getCommonRollData() skill = duplicate(skill) @@ -312,12 +312,29 @@ export class EcrymeActor extends Actor { skill.skillKey = skillKey skill.spec = this.getSpecializations(skillKey) rollData.skill = skill - rollData.mode = "skill" - rollData.title = game.i18n.localize(skill.name) rollData.img = skill.img + return rollData + } + + /* -------------------------------------------- */ + rollSkill(categKey, skillKey) { + let rollData = this.getCommonSkill(categKey, skillKey) + rollData.mode = "skill" + rollData.title = game.i18n.localize(rollData.skill.name) this.startRoll(rollData) } + /* -------------------------------------------- */ + async rollSkillConfront(categKey, skillKey) { + let rollData = this.getCommonSkill(categKey, skillKey) + rollData.mode = "skill" + rollData.title = game.i18n.localize("ECRY.ui.confrontation") + " : " + game.i18n.localize(rollData.skill.name) + rollData.executionDices = [] + rollData.preservationDices = [] + let confrontStartDialog = await EcrymeConfrontStartDialog.create(this, rollData) + confrontStartDialog.render(true) + } + /* -------------------------------------------- */ rollWeapon(weaponId) { let weapon = this.items.get(weaponId) @@ -325,7 +342,7 @@ export class EcrymeActor extends Actor { weapon = duplicate(weapon) let rollData = this.getCommonRollData() if (weapon.system.armetype == "mainsnues" || weapon.system.armetype == "epee") { - rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor( (this.getPhysiqueMalus()+this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2) } + rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor((this.getPhysiqueMalus() + this.system.attributs.physique.value + this.system.attributs.habilite.value) / 2) } } else { rollData.attr = duplicate(this.system.attributs.habilite) } @@ -338,10 +355,9 @@ export class EcrymeActor extends Actor { ui.notifications.warn("Impossible de trouver l'arme concernée ") } } - + /* -------------------------------------------- */ async startRoll(rollData) { - console.log("ROLLDATA", rollData) let rollDialog = await EcrymeRollDialog.create(this, rollData) rollDialog.render(true) } diff --git a/modules/common/ecryme-utility.js b/modules/common/ecryme-utility.js index f0c3cbf..29f4514 100644 --- a/modules/common/ecryme-utility.js +++ b/modules/common/ecryme-utility.js @@ -100,24 +100,24 @@ export class EcrymeUtility { /* -------------------------------------------- */ static chatMenuManager(html, options) { let canTranscendRoll = [] - for(let i=1; i<=10; i++ ) { + for (let i = 1; i <= 10; i++) { canTranscendRoll[i] = function (li) { let message = game.messages.get(li.attr("data-message-id")) let rollData = message.getFlag("world", "rolldata") //console.log(">>>>>>>>>>>>>>>>>>>>>>>>>> Menu !!!!", rollData) - if (rollData.skill && i <= rollData.skill.value && !rollData.transcendUsed && rollData.spec ) { + if (rollData.skill && i <= rollData.skill.value && !rollData.transcendUsed && rollData.spec) { return true - } + } return false } options.push({ - name: game.i18.localize("ECRY.chat.spectranscend") + i, + name: game.i18n.localize("ECRY.chat.spectranscend") + i, icon: '', condition: canTranscendRoll[i], callback: li => { let message = game.messages.get(li.attr("data-message-id")) let rollData = message.getFlag("world", "rolldata") - EcrymeUtility.transcendFromSpec(rollData, i) + EcrymeUtility.transcendFromSpec(rollData, i) } }) } @@ -149,7 +149,8 @@ export class EcrymeUtility { 'systems/fvtt-ecryme/templates/actors/editor-notes-gm.hbs', 'systems/fvtt-ecryme/templates/items/partial-item-nav.hbs', 'systems/fvtt-ecryme/templates/items/partial-item-equipment.hbs', - 'systems/fvtt-ecryme/templates/items/partial-item-description.hbs' + 'systems/fvtt-ecryme/templates/items/partial-item-description.hbs', + 'systems/fvtt-ecryme/templates/dialogs/partial-common-roll-dialog.hbs' ] return loadTemplates(templatePaths); } @@ -303,22 +304,14 @@ export class EcrymeUtility { } /* -------------------------------------------- */ - static async rollEcryme(rollData) { - - let actor = game.actors.get(rollData.actorId) - // Fix difficulty - if (!rollData.difficulty || rollData.difficulty == "-") { - rollData.difficulty = 0 - } - rollData.difficulty = Number(rollData.difficulty) - + static computeRollFormula(rollData, isConfrontation = false) { // Build the dice formula - let diceFormula = "2d6" + let diceFormula = (isConfrontation) ? "4d6" : "2d6" if (rollData.useIdeal) { - diceFormula = "3d6kh2" + diceFormula = (isConfrontation) ? "5d6kh2" : "3d6kh2" } if (rollData.useSpleen) { - diceFormula = "3d6kl2" + diceFormula = (isConfrontation) ? "5d6kl2" : "3d6kl2" } if (rollData.skill) { diceFormula += "+" + rollData.skill.value @@ -352,6 +345,20 @@ export class EcrymeUtility { diceFormula += "+" + rollData.bonusMalusTraits diceFormula += "+" + rollData.bonusMalusPerso rollData.diceFormula = diceFormula + return diceFormula + } + + /* -------------------------------------------- */ + static async rollEcryme(rollData) { + + let actor = game.actors.get(rollData.actorId) + // Fix difficulty + if (!rollData.difficulty || rollData.difficulty == "-") { + rollData.difficulty = 0 + } + rollData.difficulty = Number(rollData.difficulty) + + let diceFormula = this.computeRollFormula(rollData) // Performs roll let myRoll = new Roll(diceFormula).roll({ async: false }) @@ -380,14 +387,14 @@ export class EcrymeUtility { rollData.transcendUsed = true this.computeResults(rollData) //console.log("Adding spec", value, rollData.total) - + let actor = game.actors.get(rollData.actorId) actor.spentSkillTranscendence(rollData.skill, value) - + let msg = await this.createChatWithRollMode(rollData.alias, { content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData) }) - msg.setFlag("world", "rolldata", rollData) + msg.setFlag("world", "rolldata", rollData) } /* -------------------------------------------- */ diff --git a/modules/dialogs/ecryme-confront-dialog.js b/modules/dialogs/ecryme-confront-dialog.js new file mode 100644 index 0000000..cc1bd85 --- /dev/null +++ b/modules/dialogs/ecryme-confront-dialog.js @@ -0,0 +1,90 @@ +import { EcrymeUtility } from "../common/ecryme-utility.js"; +import { EcrymeRollDialog } from "./ecryme-roll-dialog.js"; + +export class EcrymeConfrontDialog extends Dialog { + + /* -------------------------------------------- */ + static async create(actor, rollData) { + + let options = mergeObject(super.defaultOptions, { + classes: ["fvtt-ecryme ecryme-confrontation-dialog"], + dragDrop: [{ dragSelector: ".confront-dice-container", dropSelector: null }], + width: 540, height: 'fit-content', 'z-index': 99999 + }); + + let html = await renderTemplate('systems/fvtt-ecryme/templates/dialogs/confront-dialog.hbs', rollData); + return new EcrymeConfrontDialog(actor, rollData, html, options); + } + + /* -------------------------------------------- */ + constructor(actor, rollData, html, options, close = undefined) { + let conf = { + title: game.i18n.localize("ECRY.ui.confront"), + content: html, + buttons: { + rollNormal: { + icon: '', + label: game.i18n.localize("ECRY.ui.rollnormal"), + callback: () => { this.rollConfront("4d6") } + }, + cancel: { + icon: '', + label: game.i18n.localize("ECRY.ui.cancel"), + callback: () => { this.close() } + } + }, + close: close + } + + super(conf, options); + + this.actor = actor; + this.rollData = rollData; + } + + /* -------------------------------------------- */ + async roll() { + } + + /* ------------------ -------------------------- */ + _onDragStart(event) { + super._onDragStart(event) + const diceData = { + diceIndex : $(event.srcElement).data("dice-idx"), + diceValue : $(event.srcElement).data("dice-value"), + } + event.dataTransfer.setData("text/plain", JSON.stringify( diceData )); + console.log(">>>>> DRAG START!!!!", event) + } + + /* ------------------ -------------------------- */ + async refreshDialog() { + const content = await renderTemplate("systems/fvtt-ecryme/templates/dialogs/confront-dialog.hbs", this.rollData) + this.data.content = content + this.render(true) + } + + /* -------------------------------------------- */ + _onDrop(event) { + let dataJSON = event.dataTransfer.getData('text/plain') + let data = JSON.parse(dataJSON) + let idx = Number(data.diceIndex) + console.log("DATA", data, event, event.srcElement.className) + if ( event.srcElement.className.includes("execution")) { + this.rollData.availableDices[idx].location = "execution" + } + if ( event.srcElement.className.includes("preservation")) { + this.rollData.availableDices[idx].location = "preservation" + } + if ( event.srcElement.className.includes("dice-list")) { + this.rollData.availableDices[idx].location = "mainpool" + } + this.refreshDialog() + } + + /* -------------------------------------------- */ + activateListeners(html) { + super.activateListeners(html); + + } +} \ No newline at end of file diff --git a/modules/dialogs/ecryme-confront-start-dialog.js b/modules/dialogs/ecryme-confront-start-dialog.js new file mode 100644 index 0000000..a42b32c --- /dev/null +++ b/modules/dialogs/ecryme-confront-start-dialog.js @@ -0,0 +1,74 @@ +import { EcrymeUtility } from "../common/ecryme-utility.js"; +import {EcrymeConfrontDialog } from "./ecryme-confront-dialog.js"; + +export class EcrymeConfrontStartDialog extends Dialog { + + /* -------------------------------------------- */ + static async create(actor, rollData) { + + let options = { classes: ["fvtt-ecryme ecryme-confront-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 } + let html = await renderTemplate('systems/fvtt-ecryme/templates/dialogs/confront-start-dialog.hbs', rollData); + return new EcrymeConfrontStartDialog(actor, rollData, html, options); + } + + /* -------------------------------------------- */ + constructor(actor, rollData, html, options, close = undefined) { + let conf = { + title: game.i18n.localize("ECRY.ui.confront"), + content: html, + buttons: { + rollNormal: { + icon: '', + label: game.i18n.localize("ECRY.ui.rollnormal"), + callback: () => { this.rollConfront("4d6") } + }, + rollSpleen: { + icon: '', + label: game.i18n.localize("ECRY.ui.rollspleen"), + callback: () => { this.rollConfront("5d6kl4") } + }, + rollIdeal: { + icon: '', + label: game.i18n.localize("ECRY.ui.rollideal"), + callback: () => { this.rollConfront("5d6kh4") } + }, + cancel: { + icon: '', + label: game.i18n.localize("ECRY.ui.cancel"), + callback: () => { this.close() } + } + }, + close: close + } + + super(conf, options); + + this.actor = actor; + this.rollData = rollData; + } + + /* -------------------------------------------- */ + async rollConfront( diceFormula ) { + // Do the initial roll + let myRoll = new Roll(diceFormula).roll({async: false}) + await EcrymeUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) + // Fill the available dice table + let rollData = this.rollData + rollData.roll = duplicate(myRoll) + rollData.availableDices = [] + for (let result of myRoll.terms[0].results) { + if ( !result.discarded) { + let resultDup = duplicate(result) + resultDup.location = "mainpool" + rollData.availableDices.push(resultDup) + } + } + let confrontDialog = await EcrymeConfrontDialog.create(this.actor, rollData) + confrontDialog.render(true) + } + + /* -------------------------------------------- */ + activateListeners(html) { + super.activateListeners(html); + } +} \ No newline at end of file diff --git a/modules/dialogs/ecryme-roll-dialog.js b/modules/dialogs/ecryme-roll-dialog.js index 7376da7..2fa4833 100644 --- a/modules/dialogs/ecryme-roll-dialog.js +++ b/modules/dialogs/ecryme-roll-dialog.js @@ -12,7 +12,6 @@ export class EcrymeRollDialog extends Dialog { /* -------------------------------------------- */ constructor(actor, rollData, html, options, close = undefined) { - let isCard = rollData.attr && rollData.attr.iscard let conf = { title: game.i18n.localize("ECRY.ui.rolltitle"), content: html, diff --git a/modules/items/ecryme-item-sheet.js b/modules/items/ecryme-item-sheet.js index 000dffc..f81c8fe 100644 --- a/modules/items/ecryme-item-sheet.js +++ b/modules/items/ecryme-item-sheet.js @@ -8,7 +8,6 @@ export class EcrymeItemSheet extends ItemSheet { /** @override */ static get defaultOptions() { - return mergeObject(super.defaultOptions, { classes: ["fvtt-ecryme", "sheet", "item"], template: "systems/fvtt-ecryme/templates/item-sheet.hbs", diff --git a/postcss/ecryme.css b/postcss/ecryme.css index 0884fe2..948c2b5 100644 --- a/postcss/ecryme.css +++ b/postcss/ecryme.css @@ -1325,4 +1325,31 @@ ul, li { .skill-roll-dialog div { margin-top: 4px; margin-bottom: 4px; -} \ No newline at end of file +} + +.confront-dice { + border-width: 0px; +} +.confront-dice-container { + position: relative; + max-width: 128px; + flex-grow: 1; + text-align: center; + color: black; +} +.confront-dice-centered { + position: absolute; + top: 50%; + left: 50%; + font-size: 2rem; + color: darkgreen; + font-family: MailartRubberstamp; + transform: translate(-50%, -80%); +} +.confront-area { + min-height: 96px; + border-width: 2px; + border-color: #000000; + border-radius: 4px; + border: 2px ridge #443307; +} diff --git a/styles/ecryme.css b/styles/ecryme.css index 66b3339..58d4273 100644 --- a/styles/ecryme.css +++ b/styles/ecryme.css @@ -1305,4 +1305,31 @@ ul, li { .skill-roll-dialog div { margin-top: 4px; margin-bottom: 4px; -} \ No newline at end of file +} + +.confront-dice { + border-width: 0px; +} +.confront-dice-container { + position: relative; + max-width: 128px; + flex-grow: 1; + text-align: center; + color: black; +} +.confront-dice-centered { + position: absolute; + top: 50%; + left: 50%; + font-size: 2rem; + color: darkgreen; + font-family: MailartRubberstamp; + transform: translate(-50%, -80%); +} +.confront-area { + min-height: 96px; + border-width: 2px; + border-color: #000000; + border-radius: 4px; + border: 2px ridge #443307; +} diff --git a/templates/actors/actor-sheet.hbs b/templates/actors/actor-sheet.hbs index 91077f4..275865e 100644 --- a/templates/actors/actor-sheet.hbs +++ b/templates/actors/actor-sheet.hbs @@ -75,6 +75,9 @@ {{#each category.skilllist as |skill skillkey|}}
  • + + + {{localize skill.name}} diff --git a/templates/dialogs/confront-dialog.hbs b/templates/dialogs/confront-dialog.hbs new file mode 100644 index 0000000..f651682 --- /dev/null +++ b/templates/dialogs/confront-dialog.hbs @@ -0,0 +1,58 @@ +
    +
    + {{#if img}} + + {{/if}} +

    {{title}}

    +
    + +
    + +
    + +
    + {{#each availableDices as |dice idx|}} + {{#if (eq dice.location "execution")}} +
    + + + + +
    + {{/if}} + {{/each}} +
    + +
    + {{#each availableDices as |dice idx|}} + {{#if (eq dice.location "preservation")}} +
    + + + + +
    + {{/if}} + {{/each}} +
    + +
    + +
    + {{#each availableDices as |dice idx|}} + {{#if (eq dice.location "mainpool")}} +
    + + + + +
    + {{/if}} + {{/each}} +
    + + {{> systems/fvtt-ecryme/templates/dialogs/partial-common-roll-dialog.hbs}} + +
    + +
    \ No newline at end of file diff --git a/templates/dialogs/confront-start-dialog.hbs b/templates/dialogs/confront-start-dialog.hbs new file mode 100644 index 0000000..93d861f --- /dev/null +++ b/templates/dialogs/confront-start-dialog.hbs @@ -0,0 +1,13 @@ +
    +
    + {{#if img}} + + {{/if}} +

    {{title}}

    +
    + +
    + +
    + +
    \ No newline at end of file diff --git a/templates/dialogs/confrontation-dialog.hbs b/templates/dialogs/confrontation-dialog.hbs deleted file mode 100644 index 9f24310..0000000 --- a/templates/dialogs/confrontation-dialog.hbs +++ /dev/null @@ -1,45 +0,0 @@ -
    -
    - {{#if img}} - - {{/if}} -

    {{title}}

    -
    - -
    - -
    - {{attr.label}} : - - {{attr.value}} - -
    - -
    - Degré de la confrontation : - -
    - -
    - Modificateur de confrontation : - -
    - -
    - -
    \ No newline at end of file diff --git a/templates/dialogs/partial-common-roll-dialog.hbs b/templates/dialogs/partial-common-roll-dialog.hbs new file mode 100644 index 0000000..8231bac --- /dev/null +++ b/templates/dialogs/partial-common-roll-dialog.hbs @@ -0,0 +1,78 @@ + {{#if skill}} +
    + {{localize skill.name}} : + + {{skill.value}} + +
    + +
    + {{localize "ECRY.ui.skilltranscendence"}} : + +
    + +
    + {{localize "ECRY.ui.spec"}} : + +
    + + {{#if spleen}} +
    + {{localize "ECRY.ui.applyspleen"}} {{spleen.name}} + +
    + {{/if}} + + {{#if ideal}} +
    + {{localize "ECRY.ui.applyideal"}} {{ideal.name}} + +
    + {{/if}} + +
    + {{localize "ECRY.ui.traitbonus"}} : + +
    + +
    + {{localize "ECRY.ui.traitmalus"}} : + +
    + + {{/if}} + + +
    + Bonus/Malus : + +
    + diff --git a/templates/dialogs/roll-dialog-generic.hbs b/templates/dialogs/roll-dialog-generic.hbs index ddd8bc7..4359a22 100644 --- a/templates/dialogs/roll-dialog-generic.hbs +++ b/templates/dialogs/roll-dialog-generic.hbs @@ -8,83 +8,7 @@
    - {{#if skill}} -
    - {{localize skill.name}} : - - {{skill.value}} - -
    - -
    - {{localize "ECRY.ui.skilltranscendence"}} : - -
    - -
    - {{localize "ECRY.ui.spec"}} : - -
    - - {{#if spleen}} -
    - {{localize "ECRY.ui.applyspleen"}} {{spleen.name}} - -
    - {{/if}} - - {{#if ideal}} -
    - {{localize "ECRY.ui.applyideal"}} {{ideal.name}} - -
    - {{/if}} - -
    - {{localize "ECRY.ui.traitbonus"}} : - -
    - -
    - {{localize "ECRY.ui.traitmalus"}} : - -
    - - {{/if}} - - -
    - Bonus/Malus : - -
    + {{> systems/fvtt-ecryme/templates/dialogs/partial-common-roll-dialog.hbs}}
    Difficulté :