wip import decks from txt file magic online format
This commit is contained in:
1 parent
b127cb132a
commit
904403508f
3 files changed
+265
-78
No files matched your search
@@ -75,16 +75,6 @@ export function validateDeck(deck: Deck): DeckValidation {
|
||||
}
|
||||
});
|
||||
|
||||
// Check commander requirement
|
||||
if (rules.requiresCommander) {
|
||||
const hasCommander = deck.cards.some(({ card }) =>
|
||||
card.type_line?.toLowerCase().includes('legendary creature')
|
||||
);
|
||||
if (!hasCommander) {
|
||||
errors.push('Deck must have a legendary creature as commander');
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
isValid: errors.length === 0,
|
||||
errors,
|
||||
|
||||
Reference in new issue
Block a user