foundryvtt-reve-de-dragon/module/tmr/pont-impraticable.js

35 lines
1.0 KiB
JavaScript

import { Grammar } from "../grammar.js";
import { TMRUtility } from "../tmr-utility.js";
import { tmrTokenZIndex } from "../tmr-constants.js";
import { Draconique } from "./draconique.js";
export class PontImpraticable extends Draconique {
type() { return 'souffle' }
match(item) { return Draconique.isSouffleDragon(item) && Grammar.toLowerCaseNoAccent(item.name).includes('impraticabilite des ponts'); }
async onActorCreateOwned(actor, souffle) {
const ponts = TMRUtility.getListTMR('pont');
for (let tmr of ponts) {
await this.createCaseTmr(actor, 'Pont impraticable', tmr, souffle.id);
}
}
code() { return 'pont-impraticable' }
tooltip(linkData) { return `Pont impraticable` }
img() { return 'systems/foundryvtt-reve-de-dragon/icons/tmr/debordement.svg' }
createSprite(pixiTMR) {
return pixiTMR.sprite(this.code(),
{
zIndex: tmrTokenZIndex.casehumide,
decallage: pixiTMR.sizes.decallage(0, 2/3),
taille: () => pixiTMR.sizes.half,
});
}
async _creerCaseTmr(actor) {
}
}