#56 Afficher valeur réussites
This commit is contained in:
parent
2097907f91
commit
da6db4d38c
@ -155,6 +155,7 @@ export class RdDResolutionTable {
|
|||||||
return rollData.rolled.isEchec;
|
return rollData.rolled.isEchec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static isEchecTotal(rollData) {
|
static isEchecTotal(rollData) {
|
||||||
if (rollData.arme && rollData.surprise == 'demi') {
|
if (rollData.arme && rollData.surprise == 'demi') {
|
||||||
return rollData.rolled.isEchec;
|
return rollData.rolled.isEchec;
|
||||||
@ -162,6 +163,7 @@ export class RdDResolutionTable {
|
|||||||
return rollData.rolled.isETotal;
|
return rollData.rolled.isETotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static isParticuliere(rollData) {
|
static isParticuliere(rollData) {
|
||||||
if (rollData.arme && rollData.surprise) {
|
if (rollData.arme && rollData.surprise) {
|
||||||
return false;
|
return false;
|
||||||
@ -169,6 +171,7 @@ export class RdDResolutionTable {
|
|||||||
return rollData.rolled.isPart;
|
return rollData.rolled.isPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static isReussite(rollData) {
|
static isReussite(rollData) {
|
||||||
switch (rollData.surprise) {
|
switch (rollData.surprise) {
|
||||||
case 'demi': return rollData.rolled.isSign;
|
case 'demi': return rollData.rolled.isSign;
|
||||||
@ -235,6 +238,17 @@ export class RdDResolutionTable {
|
|||||||
return Math.ceil(score / 10) + 91;
|
return Math.ceil(score / 10) + 91;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static buildHTMLResults( caracValue, levelValue) {
|
||||||
|
let cell = this.computeChances( caracValue, levelValue);
|
||||||
|
let descr = $('<span class="span-valeur competence-label">');
|
||||||
|
descr.append("Réussite : "+cell.score+ " - Particulière : " + cell.part + " - Significative : " + cell.sign);
|
||||||
|
descr.append("<br>Echec Particulier : " + cell.epart + " - Echec Total : " + cell.etotal );
|
||||||
|
descr.append("</span>");
|
||||||
|
|
||||||
|
return descr;
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static buildHTMLTableExtract(caracValue, levelValue) {
|
static buildHTMLTableExtract(caracValue, levelValue) {
|
||||||
return this.buildHTMLTable(caracValue, levelValue, caracValue - 2, caracValue + 2, levelValue - 5, levelValue + 5)
|
return this.buildHTMLTable(caracValue, levelValue, caracValue - 2, caracValue + 2, levelValue - 5, levelValue + 5)
|
||||||
|
@ -124,6 +124,8 @@ export class RdDRoll extends Dialog {
|
|||||||
$("#compdialogTitle").text(RdDRoll._getTitle(rollData));
|
$("#compdialogTitle").text(RdDRoll._getTitle(rollData));
|
||||||
$(".table-resolution").remove();
|
$(".table-resolution").remove();
|
||||||
$("#resolutionTable").append(RdDResolutionTable.buildHTMLTableExtract(caracValue, rollLevel));
|
$("#resolutionTable").append(RdDResolutionTable.buildHTMLTableExtract(caracValue, rollLevel));
|
||||||
|
$(".span-valeur").remove();
|
||||||
|
$("#resolutionValeurs").append(RdDResolutionTable.buildHTMLResults(caracValue, rollLevel));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup everything onload
|
// Setup everything onload
|
||||||
|
@ -51,9 +51,11 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Ajustement final : </label><label id="roll-param">10 / 0</label> <label name="addon-message" id="addon-message"></label>
|
<label>Ajustement final : </label><label id="roll-param">10 / 0</label> <label name="addon-message" id="addon-message"></label>
|
||||||
</div>
|
</div>
|
||||||
<div id="resolutionTable">
|
<div id="resolutionTable">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div id="resolutionValeurs">
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -25,8 +25,9 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Ajustement final : </label><label id="roll-param">10 / 0</label> <label name="addon-message" id="addon-message"></label>
|
<label>Ajustement final : </label><label id="roll-param">10 / 0</label> <label name="addon-message" id="addon-message"></label>
|
||||||
</div>
|
</div>
|
||||||
<div id="resolutionTable">
|
<div id="resolutionTable">
|
||||||
|
</div>
|
||||||
|
<div id="resolutionValeurs">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -23,5 +23,7 @@
|
|||||||
|
|
||||||
<div id="resolutionTable">
|
<div id="resolutionTable">
|
||||||
</div>
|
</div>
|
||||||
|
<div id="resolutionValeurs">
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
@ -66,7 +66,8 @@
|
|||||||
<label>Ajustement final : </label><label id="roll-param">10 / 0</label> <label name="addon-message" id="addon-message"></label>
|
<label>Ajustement final : </label><label id="roll-param">10 / 0</label> <label name="addon-message" id="addon-message"></label>
|
||||||
</div>
|
</div>
|
||||||
<div id="resolutionTable">
|
<div id="resolutionTable">
|
||||||
|
</div>
|
||||||
|
<div id="resolutionValeurs">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user