Commandes pour jet de dés
This commit is contained in:
@ -89,13 +89,22 @@ export class RdDResolutionTable {
|
||||
}
|
||||
|
||||
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)
|
||||
if (rollData.selectedCarac == rollData.carac.volonte) {
|
||||
message += " / moral: " + rollData.moral;
|
||||
let parts = [];
|
||||
if (rollData.diffLibre != undefined) {
|
||||
parts.push(`<strong>libre: ${rollData.diffLibre}</strong>`);
|
||||
}
|
||||
return message;
|
||||
if (rollData.diffConditions != undefined) {
|
||||
parts.push(`conditions: ${Misc.toSignedString(rollData.diffConditions)}`);
|
||||
}
|
||||
if (rollData.etat != undefined) {
|
||||
parts.push(`état: ${rollData.etat}`);
|
||||
}
|
||||
if (rollData.selectedCarac != undefined && rollData.moral != undefined && rollData.selectedCarac.label == 'Volonté') {
|
||||
parts.push(`moral: ${rollData.moral}`);
|
||||
}
|
||||
let message = parts.length > 0 ? "<br>Difficulté " + parts.reduce((a, b) => a + ' / ' + b) : "";
|
||||
|
||||
return message+ RdDResolutionTable.explain(rollData.rolled)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user