forked from public/foundryvtt-reve-de-dragon
Fix effets TMR A0
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ITEM_TYPES } from "../constants.js";
|
||||
import { TMRUtility } from "../tmr-utility.js";
|
||||
import { COORD_TMR_INCONNU, TMRUtility } from "../tmr-utility.js";
|
||||
import { PixiTMR } from "./pixi-tmr.js";
|
||||
|
||||
const registeredEffects = [
|
||||
@@ -12,7 +12,7 @@ export class Draconique {
|
||||
static init() {
|
||||
}
|
||||
|
||||
static isCaseTMR(item) { return item.type == ITEM_TYPES.casetmr; }
|
||||
static isCaseTMR(item) { return item.type == ITEM_TYPES.casetmr }
|
||||
static isQueueDragon(item) { return item.isQueueDragon(); }
|
||||
static isSouffleDragon(item) { return item.type == ITEM_TYPES.souffle; }
|
||||
static isTeteDragon(item) { return item.type == ITEM_TYPES.tete; }
|
||||
@@ -92,7 +92,7 @@ export class Draconique {
|
||||
const tooltip = this.tooltip(linkData);
|
||||
return this._createToken(pixiTMR, linkData, coordTMR, type, tooltip);
|
||||
}
|
||||
|
||||
|
||||
tokens(pixiTMR, linkData, coordTMR, type = undefined) {
|
||||
const tooltip = this.tooltip(linkData);
|
||||
return [this._createToken(pixiTMR, linkData, coordTMR, type, tooltip)];
|
||||
@@ -127,7 +127,7 @@ export class Draconique {
|
||||
* @param {*} coord les coordonnées d'une case. Si undefined toute case du type correspondra,
|
||||
*/
|
||||
isCase(item, coord = undefined) {
|
||||
return Draconique.isCaseTMR(item) && item.system.specific == this.code() && (coord ? item.system.coord == coord : true);
|
||||
return Draconique.isCaseTMR(item) && item.system.specific == this.code() && (coord ? (coord != COORD_TMR_INCONNU && item.system.coord == coord) : true);
|
||||
}
|
||||
|
||||
find(list, coord = undefined) {
|
||||
@@ -150,7 +150,7 @@ export class Draconique {
|
||||
}
|
||||
|
||||
isCaseForSource(item, draconique) {
|
||||
return Draconique.isCaseTMR(item) && item.system.specific == this.code() && item.system.sourceid == draconique.id;
|
||||
return Draconique.isCaseTMR(item) && item.system.specific == this.code() && item.system.sourceid == draconique.id
|
||||
}
|
||||
|
||||
async onVisiteSupprimer(actor, tmr, onRemoveToken) {
|
||||
|
Reference in New Issue
Block a user