Merge pull request #1039 from kuangshen04/test-Branch
修复借刀杀人complexTarget没有生效的问题
This commit is contained in:
commit
3dd83a3d99
|
@ -5874,17 +5874,18 @@ export class Game extends Uninstantable {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useCache = !lib.config.compatiblemode && !event.skill && !event.multitarget
|
let useCache = !lib.config.compatiblemode && !event.skill && !event.multitarget;
|
||||||
&& ['button', 'card', 'target'].every(type => {
|
const filterCache = type => {
|
||||||
if (!event[`filter${uppercaseType(type)}`]) return true;
|
if (get.select(event[`select${uppercaseType(type)}`])[1] < 0) return false;
|
||||||
// if (typeof event[`select${uppercaseType(type)}`] === 'function') return false;
|
const cardinfo = get.info(get.card() || {});
|
||||||
if (get.select(event[`select${uppercaseType(type)}`])[1] < 0) return false;
|
if (cardinfo && cardinfo.complexTarget) return false;
|
||||||
if (type === "button") type = "select";
|
if (type === "button") type = "select";
|
||||||
return !event[`complex${uppercaseType(type)}`];
|
return !event[`complex${uppercaseType(type)}`];
|
||||||
});
|
};
|
||||||
|
|
||||||
['button', 'card', 'target'].forEach(type => {
|
['button', 'card', 'target'].forEach(type => {
|
||||||
if (!event[`filter${uppercaseType(type)}`]) return;
|
if (!event[`filter${uppercaseType(type)}`]) return;
|
||||||
|
if (!filterCache(type)) useCache = false;
|
||||||
if (!ok) game.uncheck(type);
|
if (!ok) game.uncheck(type);
|
||||||
else ({ ok, auto = auto } = game.Check[type](event, useCache));
|
else ({ ok, auto = auto } = game.Check[type](event, useCache));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue