Explications des difficultés de jets

This commit is contained in:
Vincent Vandemeulebrouck 2020-12-18 23:48:41 +01:00
parent ea4b7a7b22
commit 15d67e72a3
3 changed files with 21 additions and 25 deletions

View File

@ -1271,8 +1271,7 @@ export class RdDActor extends Actor {
// Final chat message
let chatOptions = {
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + rollData.selectedDraconic.name + " / " + rollData.selectedSort.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) +" / état : " + rollData.etat
+ RdDResolutionTable.explain(rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ explications
}
@ -1310,8 +1309,7 @@ export class RdDActor extends Actor {
// Final chat message
let chatOptions = {
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + resumeCompetence + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) +" / état : " + rollData.etat
+ RdDResolutionTable.explain(rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ explications
}
@ -1410,8 +1408,7 @@ export class RdDActor extends Actor {
// Message de résultat
ChatUtility.chatWithRollMode({
content: "<strong>Test de Tache : " + rollData.tache.name + " - " + rollData.selectedCarac.label + " / " + rollData.competence.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) +" / état : " + rollData.etat
+ "<br>" + RdDResolutionTable.explain(rollData.rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ "<br>Points de taches : " + rollData.rolled.ptTache + ", ajustement qualité: " + rollData.rolled.ptQualite
}, this.name);
// Message spécifique de la tâche
@ -1432,8 +1429,7 @@ export class RdDActor extends Actor {
_competenceResult(rollData) {
ChatUtility.chatWithRollMode({
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + rollData.competence.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) +" / état : " + rollData.etat
+ RdDResolutionTable.explain(rollData.rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ "<br>Points de taches : " + rollData.rolled.ptTache + ", ajustement qualité: " + rollData.rolled.ptQualite
}, this.name);
}

View File

@ -262,8 +262,7 @@ export class RdDCombat {
// Final chat message
let chatOptions = {
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + rollData.competence.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) + " / état : " + rollData.etat
+ RdDResolutionTable.explain(rollData.rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ explications
}
ChatUtility.chatWithRollMode(chatOptions, this.attacker.name)
@ -345,8 +344,7 @@ export class RdDCombat {
console.log("RdDCombat.onAttaqueEchec >>>", rollData);
let chatOptions = {
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + rollData.competence.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) + " / état : " + rollData.etat
+ RdDResolutionTable.explain(rollData.rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ (this.target ? "<br><strong>Cible</strong> : " + this.defender.data.name : "")
}
ChatUtility.chatWithRollMode(chatOptions, this.attacker.name)
@ -456,8 +454,7 @@ export class RdDCombat {
let chatOptions = {
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + rollData.competence.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) + " / état : " + rollData.etat
+ RdDResolutionTable.explain(rollData.rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ "<br><strong>Attaque parée!</strong>"
}
ChatUtility.chatWithRollMode(chatOptions, this.defender.name)
@ -487,8 +484,7 @@ export class RdDCombat {
let chatOptions = {
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + rollData.competence.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) + " / état : " + rollData.etat
+ RdDResolutionTable.explain(rollData.rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ explications
}
@ -557,8 +553,7 @@ export class RdDCombat {
console.log("RdDCombat._onEsquiveNormal >>>", rollData);
let chatOptions = {
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + rollData.competence.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) + " / état : " + rollData.etat
+ RdDResolutionTable.explain(rollData.rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ "<br><strong>Attaque esquivée!</strong>"
}
ChatUtility.chatWithRollMode(chatOptions, this.defender.name)
@ -585,8 +580,7 @@ export class RdDCombat {
let chatOptions = {
content: "<strong>Test : " + rollData.selectedCarac.label + " / " + rollData.competence.name + "</strong>"
+ "<br>Difficultés <strong>libre : " + rollData.diffLibre + "</strong> / conditions : " + Misc.toSignedString(rollData.diffConditions) + " / état : " + rollData.etat
+ RdDResolutionTable.explain(rollData.rolled)
+ RdDResolutionTable.explainRollData(rollData)
+ explications
}

View File

@ -86,7 +86,13 @@ export class RdDResolutionTable {
}
message += '<strong>' + rolled.quality + '</strong>'
return message;
}
static explainRollData(rollData) {
let message = "<br>Difficultés <strong>libre: " + rollData.diffLibre + "</strong> / conditions: " + Misc.toSignedString(rollData.diffConditions)
+ " / état: " + rollData.etat;
message += RdDResolutionTable.explain(rollData.rolled)
return message;
}
/* -------------------------------------------- */
@ -163,7 +169,7 @@ export class RdDResolutionTable {
}
return rollData.rolled.isETotal;
}
/* -------------------------------------------- */
static isParticuliere(rollData) {
if (rollData.arme && rollData.surprise) {
@ -240,11 +246,11 @@ export class RdDResolutionTable {
}
/* -------------------------------------------- */
static buildHTMLResults( caracValue, levelValue) {
let cell = this.computeChances( caracValue, levelValue);
static buildHTMLResults(caracValue, levelValue) {
let cell = this.computeChances(caracValue, levelValue);
let descr = $('<span class="span-valeur competence-label">');
descr.append("Particulière : " + cell.part+ " - Significative : " + cell.sign + " - Réussite : "+cell.score);
descr.append("<br>Echec Particulier : " + cell.epart + " - Echec Total : " + cell.etotal );
descr.append("Particulière : " + cell.part + " - Significative : " + cell.sign + " - Réussite : " + cell.score);
descr.append("<br>Echec Particulier : " + cell.epart + " - Echec Total : " + cell.etotal);
descr.append("</span>");
return descr;
}