Fix: encaissement joueur à valider par MJ

This commit is contained in:
Vincent Vandemeulebrouck 2023-11-12 21:03:41 +01:00
parent 306d7c2150
commit 511ee5f241
3 changed files with 8 additions and 7 deletions

View File

@ -256,7 +256,7 @@ export class RdDActor extends RdDBaseActorSang {
const isMaladeEmpoisonne = maladiesPoisons.length > 0;
this._messageRecuperationMaladiePoisons(maladiesPoisons, message);
await this._recuperationBlessures(message, isMaladeEmpoisonne);
await this._recupererBlessures(message, isMaladeEmpoisonne);
await this._recupererVie(message, isMaladeEmpoisonne);
}
@ -367,7 +367,7 @@ export class RdDActor extends RdDBaseActorSang {
}
/* -------------------------------------------- */
async _recuperationBlessures(message, isMaladeEmpoisonne) {
async _recupererBlessures(message, isMaladeEmpoisonne) {
const timestamp = game.system.rdd.calendrier.getTimestamp()
const blessures = this.filterItems(it => it.system.gravite > 0, TYPES.blessure).sort(Misc.ascending(it => it.system.gravite))
@ -661,7 +661,7 @@ export class RdDActor extends RdDBaseActorSang {
/* -------------------------------------------- */
async sortMisEnReserve(sort, draconic, coord, ptreve) {
await this.createEmbeddedDocuments("Item", [{
type: 'sortreserve',
type: TYPES.sortreserve,
name: sort.name,
img: sort.img,
system: { sortid: sort._id, draconic: (draconic?.name ?? sort.system.draconic), ptreve: ptreve, coord: coord, heurecible: 'Vaisseau' }

View File

@ -427,7 +427,7 @@ export class RdDBaseActorReve extends RdDBaseActor {
RdDBaseActor.remoteActorCall({
tokenId: this.token?.id,
actorId: this.id,
method: 'appliquerEncaissement',
method: 'encaisserDommages',
args: [rollData, show, attackerId]
});
return;

View File

@ -16,6 +16,7 @@ import { RdDDice } from "./rdd-dice.js";
import { STATUSES } from "./settings/status-effects.js";
import { RdDRencontre } from "./item/rencontre.js";
import { RdDTimestamp } from "./time/rdd-timestamp.js";
import { TYPES } from "./item.js";
/* -------------------------------------------- */
@ -110,11 +111,11 @@ export class RdDTMRDialog extends Dialog {
}
get sortsReserve() {
return this.actor.itemTypes['sortreserve'];
return this.actor.itemTypes[TYPES.sortreserve];
}
getSortsReserve(coord) {
return this.actor.itemTypes['sortreserve'].filter(// Reserve sur une case fleuve ou normale
return this.actor.itemTypes[TYPES.sortreserve].filter(// Reserve sur une case fleuve ou normale
TMRUtility.getTMR(coord).type == 'fleuve'
? it => TMRUtility.getTMR(it.system.coord).type == 'fleuve'
: it => it.system.coord == coord
@ -166,7 +167,7 @@ export class RdDTMRDialog extends Dialog {
return this.rencontresExistantes.map(it => this._tokenRencontre(it));
}
_getTokensSortsReserve() {
return this.actor.itemTypes['sortreserve'].map(it => this._tokenSortEnReserve(it));
return this.actor.itemTypes[TYPES.sortreserve].map(it => this._tokenSortEnReserve(it));
}
/* -------------------------------------------- */