Commit 66d418aa authored by Chunchi Che's avatar Chunchi Che

fix card alias

parent 0145b453
Pipeline #23396 passed with stages
in 21 minutes and 58 seconds
......@@ -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