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;
|
||||
}
|
||||
|
||||
const useCache = !lib.config.compatiblemode && !event.skill && !event.multitarget
|
||||
&& ['button', 'card', 'target'].every(type => {
|
||||
if (!event[`filter${uppercaseType(type)}`]) return true;
|
||||
// if (typeof event[`select${uppercaseType(type)}`] === 'function') return false;
|
||||
if (get.select(event[`select${uppercaseType(type)}`])[1] < 0) return false;
|
||||
if (type === "button") type = "select";
|
||||
return !event[`complex${uppercaseType(type)}`];
|
||||
});
|
||||
let useCache = !lib.config.compatiblemode && !event.skill && !event.multitarget;
|
||||
const filterCache = type => {
|
||||
if (get.select(event[`select${uppercaseType(type)}`])[1] < 0) return false;
|
||||
const cardinfo = get.info(get.card() || {});
|
||||
if (cardinfo && cardinfo.complexTarget) return false;
|
||||
if (type === "button") type = "select";
|
||||
return !event[`complex${uppercaseType(type)}`];
|
||||
};
|
||||
|
||||
['button', 'card', 'target'].forEach(type => {
|
||||
if (!event[`filter${uppercaseType(type)}`]) return;
|
||||
if (!filterCache(type)) useCache = false;
|
||||
if (!ok) game.uncheck(type);
|
||||
else ({ ok, auto = auto } = game.Check[type](event, useCache));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue