扩大filterStop的使用范围
This commit is contained in:
parent
7044ba0a37
commit
c072280a05
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue