diff --git a/module/rdd-resolution-table.js b/module/rdd-resolution-table.js index 6285151f..ef4518a8 100644 --- a/module/rdd-resolution-table.js +++ b/module/rdd-resolution-table.js @@ -180,7 +180,7 @@ export class RdDResolutionTable { rolled.caracValue = caracValue; rolled.finalLevel = finalLevel; rolled.bonus = bonus; - rolled.factor = RdDResolutionTable._getFractionHtml(diviseur); + rolled.factorHtml = RdDResolutionTable._getFractionHtml(diviseur); return rolled; } @@ -320,11 +320,19 @@ export class RdDResolutionTable { /* -------------------------------------------- */ static buildHTMLResults(caracValue, levelValue) { let cell = this.computeChances(caracValue, levelValue); - let descr = $(''); - descr.append("Particulière : " + cell.part + " - Significative : " + cell.sign + " - Réussite : " + cell.score); - descr.append("
Echec Particulier : " + cell.epart + " - Echec Total : " + cell.etotal); - descr.append("
"); - return descr; + cell.epart = cell.epart>99? 'N/A' : cell.epart; + cell.etotal = cell.etotal>100? 'N/A' : cell.etotal; + cell.score = Math.min(cell.score, 99); + + return ` + +Particulière: ${cell.part} +- Significative: ${cell.sign} +- Réussite: ${cell.score} +- Echec Particulier: ${cell.epart} +- Echec Total: ${cell.etotal} + +` } /* -------------------------------------------- */ diff --git a/styles/simple.css b/styles/simple.css index 4588e8f0..76ad3e7f 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -410,6 +410,11 @@ table {border: 1px solid #7a7971;} background-color: lightblue; } +#resolutionValeurs{ + font-size: 0.8rem; + padding: 5px; +} + /* ======================================== */ /* Sheet */ .window-app.sheet .window-content .sheet-header{ diff --git a/templates/chat-infojet.html b/templates/chat-infojet.html index 4d493711..1e89bd77 100644 --- a/templates/chat-infojet.html +++ b/templates/chat-infojet.html @@ -14,7 +14,7 @@ {{/each}} {{/if}} - {{#if rolled.factor}}×{{{rolled.factor}}}{{/if}} + {{#if rolled.factorHtml}}×{{{rolled.factorHtml}}}{{/if}} = {{rolled.score}}%