Fix: case pour trou noir

This commit is contained in:
Vincent Vandemeulebrouck 2023-11-11 22:33:30 +01:00
parent 381242c8d0
commit 5821fc611f

View File

@ -14,8 +14,8 @@ export class TrouNoir extends Draconique {
async onActorCreateOwned(actor, souffle) { async onActorCreateOwned(actor, souffle) {
const existants = actor.items.filter(it => this.isCase(it)).map(it => it.system.coord); 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))); const selectedTMR = await TMRUtility.getTMRAleatoire(tmr => !(TMRUtility.isCaseHumide(tmr) || existants.includes(tmr.coord)));
await this.createCaseTmr(actor, 'Trou noir: ' + tmr.label, tmr, souffle.id); await this.createCaseTmr(actor, 'Trou noir: ' + selectedTMR.label, selectedTMR, souffle.id);
} }
code() { return 'trounoir' } code() { return 'trounoir' }