Commit f7897383 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/card_alias' into 'main'

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

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