pelerinage

+ suppression des cases quand le souffle/queue sont supprimés
This commit is contained in:
Vincent Vandemeulebrouck
2021-02-12 18:31:49 +01:00
parent b469461cf6
commit 4f35b28aa1
22 changed files with 431 additions and 183 deletions

View File

@ -1,4 +1,5 @@
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
import { Grammar } from "../grammar.js";
import { tmrColors, tmrConstants, tmrTokenZIndex } from "../tmr-utility.js";
import { Draconique } from "./draconique.js";
export class TerreAttache extends Draconique {
@ -7,15 +8,18 @@ export class TerreAttache extends Draconique {
}
type() { return 'tete' }
match(item) { return Draconique.isTeteDragon(item) && item.name.toLowerCase().includes("terre d'attache"); }
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, item) { await this._creerCaseTmr(actor); }
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) {
createSprite(pixiTMR) {
return pixiTMR.sprite(this.code(), {
zIndex: tmrTokenZIndex.tetes,
color: tmrColors.tetes,
@ -23,7 +27,4 @@ export class TerreAttache extends Draconique {
});
}
async _creerCaseTmr(actor) {
await this.createCaseTmr(actor, "Terre d'attache à déterminer", { coord: 'A0' });
}
}