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

35 lines
1.0 KiB
JavaScript
Raw Permalink Normal View History

import { Grammar } from "../grammar.js";
import { TMRUtility } from "../tmr-utility.js";
2023-11-15 22:14:00 +01:00
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) {
2023-11-15 22:14:00 +01:00
await this.createCaseTmr(actor, 'Pont impraticable', tmr, souffle.id);
}
}
code() { return 'pont-impraticable' }
2023-11-15 22:14:00 +01:00
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,
2023-11-15 22:14:00 +01:00
decallage: pixiTMR.sizes.decallage(0, 2/3),
taille: () => pixiTMR.sizes.half,
});
}
async _creerCaseTmr(actor) {
}
}