From 496a411fcc28bf1d6a321f952a9c8cee39245268 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 21 Apr 2021 18:58:32 +0200 Subject: [PATCH 1/9] Reformat --- templates/dialog-competence.html | 143 +++++++++++----------- templates/dialog-roll-chant.html | 42 +++---- templates/dialog-roll-danse.html | 8 +- templates/dialog-roll-ethylisme.html | 6 +- templates/dialog-roll-jeu.html | 6 +- templates/dialog-roll-meditation.html | 6 +- templates/dialog-roll-musique.html | 60 +++++---- templates/dialog-roll-oeuvre.html | 60 +++++---- templates/dialog-roll-recettecuisine.html | 6 +- templates/dialog-roll-resolution.html | 23 ++-- templates/dialog-roll-sort.html | 110 ++++++++--------- 11 files changed, 223 insertions(+), 247 deletions(-) diff --git a/templates/dialog-competence.html b/templates/dialog-competence.html index 46d45fec..1e508d8c 100644 --- a/templates/dialog-competence.html +++ b/templates/dialog-competence.html @@ -1,87 +1,84 @@
-

+

-
-
- {{competence.name}} -
- - {{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}} -
- {{#if arme}} - {{#if attackerRoll}} - {{#if attackerRoll.tactique}} +
+
+ {{competence.name}}
- + + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}} +
+ {{#if arme}} + {{#if attackerRoll}} + {{#if attackerRoll.tactique}} +
+ +
+ {{/if}} + {{else}} +
+ + + +
+
+ Charge : Les longueurs d'armes n'interviennent pas dans la charge, il faut gérer une initiative aléatoire dans ce cas. +
Feinte : Vous devez avoir l'initative sur votre adversaire et y renoncer. +
+
+
+
+ {{/if}} + {{#if ajustements.attaqueDefenseurSurpris.used}} +
+
{{/if}} - {{else}} -
- - - -
-
- Charge : Les longueurs d'armes n'interviennent pas dans la charge, il faut gérer une initiative aléatoire dans ce cas. -
Feinte : Vous devez avoir l'initative sur votre adversaire et y renoncer. -
-
-
-
- {{/if}} - {{#if ajustements.attaqueDefenseurSurpris.used}} -
- -
- {{/if}} - {{/if}} + {{/if}} - {{#if arme}} - {{#unless attackerRoll}} -
- {{#if (eq arme.data.mortalite 'non-mortel')}} - - {{else}} - - - -
+ {{/unless}} + {{/if}} - {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}} - {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html"}} -
- -
- {{#if attackerRoll}} -
- - + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}} + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html"}} +
+ +
+ {{#if attackerRoll}} +
+ + +
+ {{else}} + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}} + {{/if}} + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}} + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}} +
- {{else}} - {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}} - {{/if}} - {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}} - {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}} -
-
- -
-
-
-
+
+
+ \ No newline at end of file diff --git a/templates/dialog-roll-danse.html b/templates/dialog-roll-danse.html index 2134cb7a..20025e53 100644 --- a/templates/dialog-roll-danse.html +++ b/templates/dialog-roll-danse.html @@ -3,7 +3,7 @@
- {{competence.name}} + {{competence.name}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}} @@ -21,10 +21,8 @@
-
-
-
-
+
+
- \ No newline at end of file +
+
+ + + \ No newline at end of file From 710a768bb61a004a4b50adcea6b7d596b2f5c9f0 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 21 Apr 2021 19:40:48 +0200 Subject: [PATCH 3/9] =?UTF-8?q?Rework=20jet=20=C3=A9thylisme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor.js | 3 ++- module/rdd-roll-ethylisme.js | 25 +++++++++++------------ templates/dialog-roll-ethylisme.html | 30 ++++++++++------------------ 3 files changed, 25 insertions(+), 33 deletions(-) diff --git a/module/actor.js b/module/actor.js index 66a9dedb..54d52034 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); 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/templates/dialog-roll-ethylisme.html b/templates/dialog-roll-ethylisme.html index af2aa4c6..4c07ddc9 100644 --- a/templates/dialog-roll-ethylisme.html +++ b/templates/dialog-roll-ethylisme.html @@ -1,27 +1,19 @@
- -
- - - -
- -
- +

Boire

+ Chope d'alcool +
+ + + + + +
- -
- -
- -
-
- From 4b7817c9d8915650501f56a863e842c933f91186 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 21 Apr 2021 19:41:41 +0200 Subject: [PATCH 4/9] remove hbs log --- templates/dialog-roll-alchimie.html | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/dialog-roll-alchimie.html b/templates/dialog-roll-alchimie.html index 277f5af3..d6001a79 100644 --- a/templates/dialog-roll-alchimie.html +++ b/templates/dialog-roll-alchimie.html @@ -1,4 +1,3 @@ -{{log 'recette alchimique' this}}

Fabrication: {{recette.name}}

From cc2254112fa220db6fe222e5ac3db95bd9411cab Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 21 Apr 2021 22:01:07 +0200 Subject: [PATCH 5/9] tooltip pour titres --- styles/simple.css | 14 ++++++++++++-- templates/actor-sheet-competence-partial.html | 2 +- templates/actor-sheet.html | 6 +++--- templates/chat-infojet.html | 2 +- templates/dialog-competence.html | 2 +- templates/partial-roll-ajustements.html | 2 +- 6 files changed, 19 insertions(+), 9 deletions(-) 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 @@
- -
-
-
-
+
+
+ \ No newline at end of file From c50c417d5bb2e210ac7243c3a5b6e18e3a0c9633 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 21 Apr 2021 22:01:49 +0200 Subject: [PATCH 7/9] rework musique --- templates/dialog-roll-musique.html | 48 ++++++++++++------------------ 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/templates/dialog-roll-musique.html b/templates/dialog-roll-musique.html index 0de17671..1ff59d94 100644 --- a/templates/dialog-roll-musique.html +++ b/templates/dialog-roll-musique.html @@ -1,36 +1,26 @@
-
-
    -
  • -
  • -
-
- - Sans appel au moral +

Interpréter la mélodie: {{oeuvre.name}}

+ +
+
+ {{competence.name}} +
+ + +
+ {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} +
+
+
+ + +
+ {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}} + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}} +
-
- - - - -
- -
-
From 70b3feede842426dfa5b12bda6b8863bbda15c66 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 21 Apr 2021 22:02:03 +0200 Subject: [PATCH 8/9] Rework oeuvre --- templates/dialog-roll-oeuvre.html | 49 +++++++++++++------------------ 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/templates/dialog-roll-oeuvre.html b/templates/dialog-roll-oeuvre.html index 96efa42c..bcaf114b 100644 --- a/templates/dialog-roll-oeuvre.html +++ b/templates/dialog-roll-oeuvre.html @@ -1,36 +1,27 @@
-
-
    -
  • -
  • -
-
- - Sans appel au moral +

Interpréter une Œuvre: {{oeuvre.name}}

+ +
+
+ {{competence.name}} +
+ + +
+ {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} +
+
+
+ + +
+ {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}} + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}} +
-
- - - - -
- -
-
From b663560b533a22006bc71bf7cc8137f43b055a78 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 21 Apr 2021 22:02:17 +0200 Subject: [PATCH 9/9] Rework cuisine --- module/actor.js | 26 ++++---- templates/dialog-roll-recettecuisine.html | 74 ++++++++++------------- 2 files changed, 47 insertions(+), 53 deletions(-) diff --git a/module/actor.js b/module/actor.js index e1715786..677fea6f 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2335,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); } @@ -2396,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)); } diff --git a/templates/dialog-roll-recettecuisine.html b/templates/dialog-roll-recettecuisine.html index 8ad1d093..a8316dbb 100644 --- a/templates/dialog-roll-recettecuisine.html +++ b/templates/dialog-roll-recettecuisine.html @@ -1,54 +1,44 @@
+

Cuisiner: {{oeuvre.name}} +
+ {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} +
+

+
-
    -
  • -
  • -
  • -
+ {{competence.name}} +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ + +
+
- - - -
-
- - + +
+ {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}} + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}} +
-
-
- - -
-
- - -
-
-
- - Sans appel au moral -
-
-
-
-
+