foundryvtt-reve-de-dragon/module/tmr/terre-attache.js
Vincent Vandemeulebrouck 4f35b28aa1 pelerinage
+ suppression des cases quand le souffle/queue sont supprimés
2021-02-12 19:00:28 +01:00

31 lines
966 B
JavaScript

import { Grammar } from "../grammar.js";
import { tmrColors, tmrConstants, tmrTokenZIndex } from "../tmr-utility.js";
import { Draconique } from "./draconique.js";
export class TerreAttache extends Draconique {
constructor() {
super();
}
type() { return 'tete' }
match(item) { return Draconique.isTeteDragon(item) && Grammar.toLowerCaseNoAccent(item.name).includes("terre d'attache"); }
manualMessage() { return "Vous pouvez re-configurer votre Terre d'Attache" }
async onActorCreateOwned(actor, tete) {
await this.createCaseTmr(actor, "Terre d'attache à déterminer", { coord: 'A0' }, tete._id);
}
code() { return 'attache' }
tooltip(linkData) { return `Terre d'attache en ${this.tmrLabel(linkData)} !` }
img() { return 'icons/svg/anchor.svg' }
createSprite(pixiTMR) {
return pixiTMR.sprite(this.code(), {
zIndex: tmrTokenZIndex.tetes,
color: tmrColors.tetes,
decallage: tmrConstants.topLeft
});
}
}