Commit a499f22b authored by Chunchi Che's avatar Chunchi Che

fix isDeclarable

parent 78a03e35
Pipeline #26761 passed with stages
in 7 minutes and 28 seconds
...@@ -301,6 +301,9 @@ const OPCODE_ISTYPE = 0x40000102; ...@@ -301,6 +301,9 @@ const OPCODE_ISTYPE = 0x40000102;
const OPCODE_ISRACE = 0x40000103; const OPCODE_ISRACE = 0x40000103;
const OPCODE_ISATTRIBUTE = 0x40000104; const OPCODE_ISATTRIBUTE = 0x40000104;
const CARD_MARINE_DOLPHIN = 78734254;
const CARD_TWINKLE_MOSS = 13857930;
/* /*
* 判断一张卡是否能被宣言 * 判断一张卡是否能被宣言
* 用于处理`AnnounceCard` * 用于处理`AnnounceCard`
...@@ -418,7 +421,15 @@ export function isDeclarable(card: CardMeta, opcodes: number[]): boolean { ...@@ -418,7 +421,15 @@ export function isDeclarable(card: CardMeta, opcodes: number[]): boolean {
} }
} }
return false; if (stack.length !== 1 || stack.pop() === 0) return false;
return (
card.id === CARD_MARINE_DOLPHIN ||
card.id === CARD_TWINKLE_MOSS ||
(!(card.data.alias !== 0) &&
(card.data.type ?? 0 & (TYPE_MONSTER + TYPE_TOKEN)) !==
TYPE_MONSTER + TYPE_TOKEN)
);
} }
function ifSetCard(setCodeToAnalyse: number, setCodeFromCard: number): boolean { function ifSetCard(setCodeToAnalyse: number, setCodeFromCard: number): boolean {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment