#49 - Suivi des deplacements en TMR par le MJ
This commit is contained in:
parent
9b29ca0305
commit
7445e9e51b
@ -2119,6 +2119,14 @@ export class RdDActor extends Actor {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
refreshTMRView( tmrData ) {
|
||||
console.log("REFRESH !!!!");
|
||||
if ( this.currentTMR ) {
|
||||
this.currentTMR.forceDemiRevePositionView(tmrData.tmrPos);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async displayTMR(mode = "normal") {
|
||||
let isRapide = mode == "rapide";
|
||||
|
@ -186,7 +186,7 @@ Hooks.once("init", async function () {
|
||||
game.socket.on("system.foundryvtt-reve-de-dragon", data => {
|
||||
RdDUtility.onSocketMesssage(data);
|
||||
RdDCombat.onSocketMessage(data);
|
||||
ChatUtility.onSocketMessage(data);
|
||||
ChatUtility.onSocketMessage(data);
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -589,7 +589,12 @@ export class RdDTMRDialog extends Dialog {
|
||||
myself._updateDemiReve(myself);
|
||||
myself.nbFatigue += 1;
|
||||
myself.updateValuesDisplay();
|
||||
|
||||
game.socket.emit("system.foundryvtt-reve-de-dragon", {
|
||||
msg: "msg_tmr_move", data: {
|
||||
actorId: myself.actor.data._id,
|
||||
tmrPos: tmrPos
|
||||
}
|
||||
});
|
||||
|
||||
if ( deplacementType == 'normal') { // Pas de rencontres après un saut de type passeur/changeur/...
|
||||
await myself.manageRencontre(coordTMR, cellDescr);
|
||||
@ -615,6 +620,11 @@ export class RdDTMRDialog extends Dialog {
|
||||
myself.checkQuitterTMR(); // Vérifier l'état des compteurs reve/fatigue/vie
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async forceDemiRevePositionView( coordTMR ) {
|
||||
this._updateDemiReve(this);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async forceDemiRevePosition( coordTMR ) {
|
||||
await this.actor.updateCoordTMR(coordTMR);
|
||||
|
@ -647,6 +647,11 @@ export class RdDUtility {
|
||||
return game.system.rdd.calendrier.requestNombreAstral(sockmsg.data);
|
||||
case "msg_response_nombre_astral":
|
||||
return RdDUtility.responseNombreAstral(sockmsg.data);
|
||||
case "msg_tmr_move":
|
||||
if ( game.user.isGM ) {
|
||||
let actor = game.actors.get( sockmsg.data.actorId);
|
||||
actor.refreshTMRView( sockmsg.data.tmrPos );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ export class TMRUtility {
|
||||
} else if (rencontre.name == "Rêve de Dragon") {
|
||||
// TODO: xp particulière
|
||||
message += "Vous maîtrisez le Rêve de Dragon !"
|
||||
message += actor.appliquerReveDeDragon(rolled, rencontre.force);
|
||||
message += await actor.appliquerReveDeDragon(rolled, rencontre.force);
|
||||
}
|
||||
return { message: message, state: state };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user