diff --git a/module/actor.js b/module/actor.js index 66a9dedb..677fea6f 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1590,7 +1590,8 @@ export class RdDActor extends Actor { etat: this.getEtatGeneral({ ethylisme: true }), diffNbDoses: -Number(actorData.data.compteurs.ethylisme.nb_doses || 0), finalLevel: 0, - diffConditions: 0 + diffConditions: 0, + ajustementsForce: CONFIG.RDD.difficultesLibres, } let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-ethylisme.html', rollData); new RdDRollDialogEthylisme(html, rollData, this, r => this.performEthylisme(r)).render(true); @@ -2334,16 +2335,20 @@ export class RdDActor extends Actor { console.log("rollArt !!!", artData); - const dialog = await RdDRoll.create(this, artData, { html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${artData.art}.html` }, { - name: `jet-${artData.art}`, - label: `${artData.verbe} ${oeuvre.name}`, - height: 600, - callbacks: [ - this.createCallbackExperience(), - this.createCallbackAppelAuMoral(), - { action: r => callBackResult(r) } - ] - }); + const dialog = await RdDRoll.create(this, artData, + { + html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${oeuvre.type}.html`, + options: { height: 500, } + }, + { + name: `jet-${artData.art}`, + label: `${artData.verbe} ${oeuvre.name}`, + callbacks: [ + this.createCallbackExperience(), + this.createCallbackAppelAuMoral(), + { action: r => callBackResult(r) } + ] + }); dialog.render(true); } @@ -2395,13 +2400,13 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ async rollRecetteCuisine(id) { + const oeuvre = Misc.data(this.getRecetteCuisine(id)); const artData = { art: 'cuisine', verbe: 'Cuisiner', proportions: 1, ajouterEquipement: false }; - const oeuvre = Misc.data(this.getRecetteCuisine(id)); await this._rollArt(artData, 'odoratgout', oeuvre, r => this._resultRecetteCuisine(r)); } @@ -2481,16 +2486,20 @@ export class RdDActor extends Actor { console.log("rollMeditation !!!", meditationData); - const dialog = await RdDRoll.create(this, meditationData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html' }, { - name: 'jet-meditation', - label: 'Jet de Meditation ' + meditation.name, - height: 600, - callbacks: [ - this.createCallbackExperience(), - { condition: r => r.rolled.isETotal, action: r => this._meditationETotal(r) }, - { action: r => this._meditationResult(r) } - ] - }); + const dialog = await RdDRoll.create(this, meditationData, + { + html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html', + options: { height: 575, } + }, + { + name: 'jet-meditation', + label: "Jet de méditation", + callbacks: [ + this.createCallbackExperience(), + { condition: r => r.rolled.isETotal, action: r => this._meditationETotal(r) }, + { action: r => this._meditationResult(r) } + ] + }); dialog.render(true); } diff --git a/module/rdd-roll-ethylisme.js b/module/rdd-roll-ethylisme.js index 6eb77c34..0b4e636e 100644 --- a/module/rdd-roll-ethylisme.js +++ b/module/rdd-roll-ethylisme.js @@ -16,7 +16,7 @@ export class RdDRollDialogEthylisme extends Dialog { default: "rollButton", buttons: { "rollButton": { label: "Test d'éthylisme", callback: html => this.onButton(html) } } }; - let dialogOptions = { classes: ["rdddialog"], width: 400, height: 220, 'z-index': 99999 } + let dialogOptions = { classes: ["rdddialog"], width: 400, height: 270, 'z-index': 99999 } super(dialogConf, dialogOptions) //console.log("ETH", rollData); @@ -36,28 +36,27 @@ export class RdDRollDialogEthylisme extends Dialog { this.bringToTop(); // Ensure top level // Get the rollData stuff var rollData = this.rollData; - - function updateRollResult(rollData) { - - rollData.finalLevel = Number(rollData.etat) + Number(rollData.forceAlcool) + rollData.diffNbDoses; - - // Mise à jour valeurs - $("#roll-param").text(rollData.vieValue + " / " + Misc.toSignedString(rollData.finalLevel)); - $(".table-resolution").remove(); - $("#resolutionTable").append(RdDResolutionTable.buildHTMLTableExtract(rollData.vieValue, rollData.finalLevel)); - } + var dialog = this; // Setup everything onload $(function () { $("#forceAlcool").val(Misc.toInt(rollData.forceAlcool)); - updateRollResult(rollData); + dialog.updateRollResult(); }); // Update ! html.find('#forceAlcool').change((event) => { rollData.forceAlcool = Misc.toInt(event.currentTarget.value); // Update the selected bonus/malus - updateRollResult(rollData); + dialog.updateRollResult(); }); } + async updateRollResult() { + + this.rollData.finalLevel = Number(this.rollData.etat) + Number(this.rollData.forceAlcool) + this.rollData.diffNbDoses; + + // Mise à jour valeurs + $("#roll-param").text(this.rollData.vieValue + " / " + Misc.toSignedString(this.rollData.finalLevel)); + $(".table-resolution").remove(); + } } diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index 7c9d6a21..cd0b9347 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -655,7 +655,7 @@ export class RdDTMRDialog extends Dialog { const dialog = await RdDRoll.create(this.actor, rollData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-maitrise-tmr.html', - options: { height: 350 }, + options: { height: 420 }, close: html => { this.maximize(); } // Re-display TMR }, { diff --git a/styles/simple.css b/styles/simple.css index 254dd5b0..d7fdb732 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1292,6 +1292,9 @@ display: inline-flex; .tooltip { position: relative; display: inline-block; +} + +.tooltip-dotted { border-bottom: 1px dotted black; /* If you want dots under the hoverable text */ } @@ -1332,9 +1335,16 @@ display: inline-flex; padding: 3px 0; } -.tooltip-nobottom { - border-bottom: unset; /* If you want dots under the hoverable text */ +.tooltip .ttt-titre { + text-align: justify; + width: 100%; + top: 30px; + background: rgba(220,220,210,0.95); + border-radius: 6px; + font-size: 0.9rem; + padding: 3px; } + .tooltip .ttt-xp { width: 250px; background: rgba(220,220,210,0.95); diff --git a/templates/actor-sheet-competence-partial.html b/templates/actor-sheet-competence-partial.html index 7d938044..4e87bf5d 100644 --- a/templates/actor-sheet-competence-partial.html +++ b/templates/actor-sheet-competence-partial.html @@ -6,7 +6,7 @@ {{/if}} {{#if data.isLevelUp}} - + Vous pouvez dépenser {{data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}} diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 70145c11..5c3f8eef 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -66,7 +66,7 @@ {{/if}}
- Malus de fatigue : {{calc.fatigue.malus}} + Malus de fatigue : {{calc.fatigue.malus}} {{{calc.fatigue.html}}} {{calc.resumeBlessures}} @@ -134,13 +134,13 @@