Rendu des résultats spéciaux

This commit is contained in:
Vincent Vandemeulebrouck 2021-01-02 19:27:15 +01:00
parent 2d4778f403
commit 1bdda17c16
3 changed files with 20 additions and 7 deletions

View File

@ -180,7 +180,7 @@ export class RdDResolutionTable {
rolled.caracValue = caracValue; rolled.caracValue = caracValue;
rolled.finalLevel = finalLevel; rolled.finalLevel = finalLevel;
rolled.bonus = bonus; rolled.bonus = bonus;
rolled.factor = RdDResolutionTable._getFractionHtml(diviseur); rolled.factorHtml = RdDResolutionTable._getFractionHtml(diviseur);
return rolled; return rolled;
} }
@ -320,11 +320,19 @@ export class RdDResolutionTable {
/* -------------------------------------------- */ /* -------------------------------------------- */
static buildHTMLResults(caracValue, levelValue) { static buildHTMLResults(caracValue, levelValue) {
let cell = this.computeChances(caracValue, levelValue); let cell = this.computeChances(caracValue, levelValue);
let descr = $('<span class="span-valeur competence-label">'); cell.epart = cell.epart>99? 'N/A' : cell.epart;
descr.append("Particulière : " + cell.part + " - Significative : " + cell.sign + " - Réussite : " + cell.score); cell.etotal = cell.etotal>100? 'N/A' : cell.etotal;
descr.append("<br>Echec Particulier : " + cell.epart + " - Echec Total : " + cell.etotal); cell.score = Math.min(cell.score, 99);
descr.append("</span>");
return descr; return `
<span class="span-valeur competence-label">
Particulière: <span class="rdd-roll-part">${cell.part}</span>
- Significative: <span class="rdd-roll-sign">${cell.sign}</span>
- Réussite: <span class="rdd-roll-norm">${cell.score}</span>
- Echec Particulier: <span class="rdd-roll-epart">${cell.epart}</span>
- Echec Total: <span class="rdd-roll-etotal">${cell.etotal}</span>
</span>
`
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -410,6 +410,11 @@ table {border: 1px solid #7a7971;}
background-color: lightblue; background-color: lightblue;
} }
#resolutionValeurs{
font-size: 0.8rem;
padding: 5px;
}
/* ======================================== */ /* ======================================== */
/* Sheet */ /* Sheet */
.window-app.sheet .window-content .sheet-header{ .window-app.sheet .window-content .sheet-header{

View File

@ -14,7 +14,7 @@
{{/each}} {{/each}}
</div> </div>
{{/if}} {{/if}}
{{#if rolled.factor}}<span class="rdd-diviseur">&times;{{{rolled.factor}}}</span>{{/if}} {{#if rolled.factorHtml}}<span class="rdd-diviseur">&times;{{{rolled.factorHtml}}}</span>{{/if}}
</span> </span>
<span>= {{rolled.score}}%</span> <span>= {{rolled.score}}%</span>
</div> </div>