From 5821fc611f1545aa47ee240a20d8fb7934470b7c Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 11 Nov 2023 22:33:30 +0100 Subject: [PATCH] Fix: case pour trou noir --- module/tmr/trou-noir.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/tmr/trou-noir.js b/module/tmr/trou-noir.js index 7ab77d2a..23b995aa 100644 --- a/module/tmr/trou-noir.js +++ b/module/tmr/trou-noir.js @@ -14,8 +14,8 @@ export class TrouNoir extends Draconique { async onActorCreateOwned(actor, souffle) { const existants = actor.items.filter(it => this.isCase(it)).map(it => it.system.coord); - const tmr = await TMRUtility.getTMRAleatoire(it => !(TMRUtility.isCaseHumide(it) || existants.includes(it.system.coord))); - await this.createCaseTmr(actor, 'Trou noir: ' + tmr.label, tmr, souffle.id); + const selectedTMR = await TMRUtility.getTMRAleatoire(tmr => !(TMRUtility.isCaseHumide(tmr) || existants.includes(tmr.coord))); + await this.createCaseTmr(actor, 'Trou noir: ' + selectedTMR.label, selectedTMR, souffle.id); } code() { return 'trounoir' }