forked from public/foundryvtt-reve-de-dragon
Test rencontres
This commit is contained in:
@ -114,18 +114,19 @@ export class RdDTMRDialog extends Dialog {
|
||||
+ RdDResolutionTable.explain(rolled);
|
||||
|
||||
if (rolled.isEchec) {
|
||||
TMRUtility.processRencontreEchec(this.actor, this.currentRencontre, rolled);
|
||||
message += TMRUtility.processRencontreEchec(this.actor, this.currentRencontre, rolled);
|
||||
this._tellToUser("Vous avez <strong>échoué</strong> à maîtriser un " + this.currentRencontre.name + " de force " + this.currentRencontre.force
|
||||
+ "<br>Vous quittez brutalement les Terres Médianes !" + message);
|
||||
this.close();
|
||||
} else {
|
||||
TMRUtility.processRencontreReussite(this.actor, this.currentRencontre, rolled);
|
||||
message += TMRUtility.processRencontreReussite(this.actor, this.currentRencontre, rolled);
|
||||
this._tellToUser("Vous avez <strong>réussi</strong> à maîtriser un " + this.currentRencontre.name + " de force " + this.currentRencontre.force + message);
|
||||
}
|
||||
console.log("-> matriser", this.currentRencontre);
|
||||
this.updateValuesDisplay();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
_tellToUser(message) {
|
||||
ChatMessage.create({ title: "TMR", content: message, user: game.user._id, whisper: ChatMessage.getWhisperRecipients("GM") });
|
||||
}
|
||||
@ -139,9 +140,9 @@ export class RdDTMRDialog extends Dialog {
|
||||
let rencontre = this.rencontresExistantes.find(prev => prev.coord == coordTMR);
|
||||
if (rencontre == undefined) {
|
||||
let deRencontre = new Roll("d7").roll();
|
||||
if (deRencontre.total == 7) {
|
||||
//if (deRencontre.total == 7) {
|
||||
rencontre = await TMRUtility.rencontreTMRRoll(coordTMR, cellDescr);
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
if (rencontre) { // Manages it
|
||||
|
Reference in New Issue
Block a user