Commit f7897383 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/card_alias' into 'main'

修复组卡页异图卡可以找过三张的问题

See merge request !302
parents 0145b453 66d418aa
......@@ -8,6 +8,7 @@ export interface CardMeta {
}
export interface CardData {
alias?: number;
ot?: number;
setcode?: number;
type?: number;
......
......@@ -94,8 +94,14 @@ export const editDeckStore = proxy({
const max = 3; // 这里无需参考禁卡表
const numOfSameCards =
editDeckStore.getAll().filter((c) => c.id === card.id).length -
(source !== "search" ? 1 : 0);
editDeckStore
.getAll()
.filter(
(c) =>
c.id === card.id ||
c.data.alias === card.id ||
c.id === card.data.alias,
).length - (source !== "search" ? 1 : 0);
if (numOfSameCards >= max) {
result = false;
......
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