Commit 728a0d8f authored by nanahira's avatar nanahira

impl get_original_code_rule

parent 3e46585b
Pipeline #43568 failed with stages
in 1 minute and 28 seconds
...@@ -6,6 +6,7 @@ import { ...@@ -6,6 +6,7 @@ import {
YGOProLFListItem, YGOProLFListItem,
} from 'ygopro-lflist-encode'; } from 'ygopro-lflist-encode';
import { OcgcoreCommonConstants } from 'ygopro-msg-encode'; import { OcgcoreCommonConstants } from 'ygopro-msg-encode';
import { getOriginalCodeRule } from './get-original-code-rule';
import { readCardWithReader } from './read-card-with-reader'; import { readCardWithReader } from './read-card-with-reader';
// Constants from ygopro // Constants from ygopro
...@@ -131,8 +132,8 @@ export const checkDeck = ( ...@@ -131,8 +132,8 @@ export const checkDeck = (
} }
} }
// Count cards (use alias if available) // Count cards (use alias if available, recursively resolve alias chain)
const countCode = cardData.alias || code; const countCode = getOriginalCodeRule(code, cardData.alias ?? 0, reader);
const count = (cardCount.get(countCode) || 0) + 1; const count = (cardCount.get(countCode) || 0) + 1;
cardCount.set(countCode, count); cardCount.set(countCode, count);
......
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