Big WIP...
This commit is contained in:
@ -22,7 +22,7 @@ export class Desorientation extends Draconique {
|
||||
}
|
||||
|
||||
_typesPossibles(actor) {
|
||||
const dejaDesorientes = Misc.distinct(actor.data.items.filter(it => this.isCase(it)).map(it => it.type));
|
||||
const dejaDesorientes = Misc.distinct(actor.items.filter(it => this.isCase(it)).map(it => it.type));
|
||||
return Object.keys(TMRType).filter(it => !dejaDesorientes.includes(it));
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ export class Desorientation extends Draconique {
|
||||
}
|
||||
|
||||
async _creerCasesTmr(actor, type, souffle) {
|
||||
const existants = actor.data.items.filter(it => this.isCase(it)).map(it => it.data.coord);
|
||||
const existants = actor.items.filter(it => this.isCase(it)).map(it => it.system.coord);
|
||||
let tmrs = TMRUtility.filterTMR(it => it.type == type && !existants.includes(it.coord));
|
||||
for (let tmr of tmrs) {
|
||||
await this.createCaseTmr(actor, 'Désorientation: ' + tmr.label, tmr, souffle.id);
|
||||
|
Reference in New Issue
Block a user