foundryvtt-reve-de-dragon/module/tmr/terre-attache.js
Vincent Vandemeulebrouck 42bd63c999 simplifications sur EffetsDraconiques
ajout de methode tmrLabel pour les tooltips

ajout de l'item en paramètre aux ajouts/suppressions
ajout d'un 'sourceId' pour les casetmr liées à un souffle/queue/tête
2021-02-12 01:45:25 +01:00

26 lines
907 B
JavaScript

import { tmrColors, tmrConstants, TMRUtility } 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) && item.name.toLowerCase().includes("terre d'attache"); }
manualMessage() { return "Vous pouvez re-configurer votre Terre d'Attache" }
async onActorCreateOwned(actor, item) { await this._creerCaseTmr(actor); }
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(), { color: tmrColors.tetes, decallage: tmrConstants.topLeft });
}
async _creerCaseTmr(actor) {
await this.createCaseTmr(actor, "Terre d'attache à déterminer", {coord:'A0'});
}
}