mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
fixed verify test not checking split/aftermath cards correctly
This commit is contained in:
parent
f98069e829
commit
b0a2abb205
2 changed files with 9 additions and 7 deletions
|
@ -40,6 +40,8 @@ public final class MtgJsonCard {
|
|||
|| "flip".equals(layout)
|
||||
|| "adventure".equals(layout)
|
||||
|| "modal_dfc".equals(layout)
|
||||
|| "split".equals(layout)
|
||||
|| "aftermath".equals(layout)
|
||||
|| "meld".equals(layout)) { // mtgjson uses composite names for meld cards, but scryfall uses simple face names
|
||||
return faceName;
|
||||
}
|
||||
|
|
|
@ -262,13 +262,13 @@ public class VerifyCardDataTest {
|
|||
for (Card card : CardScanner.getAllCards()) {
|
||||
cardIndex++;
|
||||
if (card instanceof SplitCard) {
|
||||
check(((SplitCard) card).getLeftHalfCard(), cardIndex, true);
|
||||
check(((SplitCard) card).getRightHalfCard(), cardIndex, true);
|
||||
check(((SplitCard) card).getLeftHalfCard(), cardIndex);
|
||||
check(((SplitCard) card).getRightHalfCard(), cardIndex);
|
||||
} else if (card instanceof ModalDoubleFacesCard) {
|
||||
check(((ModalDoubleFacesCard) card).getLeftHalfCard(), cardIndex, false);
|
||||
check(((ModalDoubleFacesCard) card).getRightHalfCard(), cardIndex, false);
|
||||
check(((ModalDoubleFacesCard) card).getLeftHalfCard(), cardIndex);
|
||||
check(((ModalDoubleFacesCard) card).getRightHalfCard(), cardIndex);
|
||||
} else {
|
||||
check(card, cardIndex, false);
|
||||
check(card, cardIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1231,11 +1231,11 @@ public class VerifyCardDataTest {
|
|||
}
|
||||
}
|
||||
|
||||
private void check(Card card, int cardIndex, boolean skipWarning) {
|
||||
private void check(Card card, int cardIndex) {
|
||||
MtgJsonCard ref = MtgJsonService.cardFromSet(card.getExpansionSetCode(), card.getName(), card.getCardNumber());
|
||||
if (ref != null) {
|
||||
checkAll(card, ref, cardIndex);
|
||||
} else if (!skipWarning && !ONLY_TEXT) {
|
||||
} else {
|
||||
warn(card, "Missing card reference");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue