diff --git a/noname/library/element/gameEvent.js b/noname/library/element/gameEvent.js index e4d77f1af..9fbd5bfa6 100644 --- a/noname/library/element/gameEvent.js +++ b/noname/library/element/gameEvent.js @@ -170,6 +170,10 @@ export class GameEvent { * @type { string } */ name; + /** + * @type { Function | void | null } + */ + filterStop; /** * @param {keyof this} key * @param {number} [value] @@ -760,6 +764,7 @@ export class GameEvent { if (!lib.hookmap[name] && !lib.config.compatiblemode) return; if (!game.players || !game.players.length) return; const event = this; + if (event.filterStop && event.filterStop()) return; let start = [_status.currentPhase, event.source, event.player, game.me, game.players[0]].find(i => get.itemtype(i) == 'player'); if (!start) return; if (!game.players.includes(start) && !game.dead.includes(start)) start = game.findNext(start);