From a380876ea65e5e2e298ea1cfca595a65ee296197 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Fri, 22 Jan 2021 14:33:51 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Ajout=20image=20comp=C3=A9tence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/simple.css | 1 + templates/chat-resultat-attaque.html | 1 + templates/chat-resultat-competence.html | 1 + templates/chat-resultat-esquive.html | 1 + templates/chat-resultat-general.html | 3 +++ templates/chat-resultat-meditation.html | 1 + templates/chat-resultat-parade.html | 1 + templates/chat-resultat-sort.html | 1 + templates/chat-resultat-tache.html | 1 + 9 files changed, 11 insertions(+) diff --git a/styles/simple.css b/styles/simple.css index adf19db3..0a123137 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -864,6 +864,7 @@ ul, li { } .chat-message .chat-icon { border: 0; + padding: 2px 6px 2px 2px; float: left; } diff --git a/templates/chat-resultat-attaque.html b/templates/chat-resultat-attaque.html index e754daec..a48ddec3 100644 --- a/templates/chat-resultat-attaque.html +++ b/templates/chat-resultat-attaque.html @@ -1,3 +1,4 @@ +{{competence.name}}

{{alias}} attaque à {{diffLibre}}: {{arme.name}}

{{selectedCarac.label}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}} diff --git a/templates/chat-resultat-competence.html b/templates/chat-resultat-competence.html index 65047838..79ae2bb5 100644 --- a/templates/chat-resultat-competence.html +++ b/templates/chat-resultat-competence.html @@ -1,3 +1,4 @@ +{{competence.name}}

{{alias}} {{show.title}}: {{#if selectedCarac}}{{selectedCarac.label}} diff --git a/templates/chat-resultat-esquive.html b/templates/chat-resultat-esquive.html index 4efa70dd..e802e32f 100644 --- a/templates/chat-resultat-esquive.html +++ b/templates/chat-resultat-esquive.html @@ -1,3 +1,4 @@ +{{competence.name}}

{{alias}} esquive une attaque à {{diffLibre}}

{{selectedCarac.label}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}} diff --git a/templates/chat-resultat-general.html b/templates/chat-resultat-general.html index 35f60a46..01299c8e 100644 --- a/templates/chat-resultat-general.html +++ b/templates/chat-resultat-general.html @@ -1,3 +1,6 @@ +{{#if competence.img}} + {{competence.name}} +{{/if}}

{{alias}} {{#if show.title}}{{show.title}}: {{/if}} {{#if selectedCarac}}{{selectedCarac.label}} diff --git a/templates/chat-resultat-meditation.html b/templates/chat-resultat-meditation.html index 0fea9f11..2b0aa1e1 100644 --- a/templates/chat-resultat-meditation.html +++ b/templates/chat-resultat-meditation.html @@ -1,3 +1,4 @@ +{{competence.name}}

{{alias}} a médité : {{meditation.name}}

diff --git a/templates/chat-resultat-parade.html b/templates/chat-resultat-parade.html index 25cc4636..dbff81a1 100644 --- a/templates/chat-resultat-parade.html +++ b/templates/chat-resultat-parade.html @@ -1,3 +1,4 @@ +{{competence.name}}

{{alias}} pare une attaque à {{diffLibre}} - {{arme.name}}

{{selectedCarac.label}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}} diff --git a/templates/chat-resultat-sort.html b/templates/chat-resultat-sort.html index c6c374eb..ecb16352 100644 --- a/templates/chat-resultat-sort.html +++ b/templates/chat-resultat-sort.html @@ -1,3 +1,4 @@ +{{competence.name}}

{{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}} le {{#if selectedSort.data.isrituel}}rituel{{else}}sort{{/if}} diff --git a/templates/chat-resultat-tache.html b/templates/chat-resultat-tache.html index 380a4103..71c5cd34 100644 --- a/templates/chat-resultat-tache.html +++ b/templates/chat-resultat-tache.html @@ -1,3 +1,4 @@ +{{competence.name}}

{{alias}} travaille à sa tâche {{tache.name}}
{{selectedCarac.label}}/{{competence.name}} From a99a08ab212aa6165fc6211f14065e9c10107998 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Fri, 22 Jan 2021 14:35:14 +0100 Subject: [PATCH 2/2] Fix bonus de case sorts --- module/item-sort.js | 2 +- module/rdd-resolution-table.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/item-sort.js b/module/item-sort.js index 6bff1c59..1ebf950b 100644 --- a/module/item-sort.js +++ b/module/item-sort.js @@ -114,7 +114,7 @@ export class RdDItemSort extends Item { let bonusCaseList = this.buildBonusCaseList(sort.data.bonuscase, false); for( let bc of bonusCaseList) { if (bc.case == coordTMR) { // Case existante - return bc.bonus; + return Number(bc.bonus); } } return 0; diff --git a/module/rdd-resolution-table.js b/module/rdd-resolution-table.js index 16c2a806..395b3659 100644 --- a/module/rdd-resolution-table.js +++ b/module/rdd-resolution-table.js @@ -134,7 +134,7 @@ export class RdDResolutionTable { /* -------------------------------------------- */ static _updateChancesWithBonus(chances, bonus) { if (bonus) { - let newScore = chances.score + bonus; + let newScore = Number(chances.score) + bonus; mergeObject(chances, this._computeCell(null, newScore), { overwrite: true }); } }