Fix: urgence draconique
This commit is contained in:
parent
5821fc611f
commit
9093eadb23
@ -8,15 +8,11 @@ import { Draconique } from "./draconique.js";
|
||||
|
||||
export class UrgenceDraconique extends Draconique {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
type() { return 'queue' }
|
||||
match(item) { return Draconique.isQueueDragon(item) && Grammar.toLowerCaseNoAccent(item.name).includes('urgence draconique'); }
|
||||
manualMessage() { return false }
|
||||
async onActorCreateOwned(actor, queue) {
|
||||
const coordSortsReserve = (actor.system.reve.reserve?.list.map(it => it.coord)) ?? [];
|
||||
const coordSortsReserve = actor.itemTypes[TYPES.sortreserve].map(it => it.system.coord) ?? [];
|
||||
if (coordSortsReserve.length == 0) {
|
||||
// La queue se transforme en idée fixe
|
||||
const ideeFixe = await RdDRollTables.getIdeeFixe();
|
||||
@ -26,7 +22,6 @@ export class UrgenceDraconique extends Draconique {
|
||||
});
|
||||
await actor.createEmbeddedDocuments('Item', [ideeFixe]);
|
||||
await actor.deleteEmbeddedDocuments('Item', [queue.id]);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
const demiReve = actor.getDemiReve();
|
||||
|
Loading…
Reference in New Issue
Block a user