mirror of
https://github.com/correl/mage.git
synced 2024-11-14 11:09:31 +00:00
fixed unnecessary verify warnings for split cards
This commit is contained in:
parent
bb46ac5ad6
commit
c1f1ceb9e7
2 changed files with 10 additions and 10 deletions
|
@ -33,7 +33,7 @@ public final class ValentinDeanOfTheVein extends ModalDoubleFacesCard {
|
|||
public ValentinDeanOfTheVein(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo,
|
||||
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.VAMPIRE, SubType.WARLOCK}, "{B}",
|
||||
"Lisette Dean of the Root", new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.DRUID}, "{2}{G}{G}"
|
||||
"Lisette, Dean of the Root", new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.DRUID}, "{2}{G}{G}"
|
||||
);
|
||||
|
||||
// 1.
|
||||
|
|
|
@ -267,13 +267,13 @@ public class VerifyCardDataTest {
|
|||
for (Card card : CardScanner.getAllCards()) {
|
||||
cardIndex++;
|
||||
if (card instanceof SplitCard) {
|
||||
check(((SplitCard) card).getLeftHalfCard(), cardIndex);
|
||||
check(((SplitCard) card).getRightHalfCard(), cardIndex);
|
||||
check(((SplitCard) card).getLeftHalfCard(), cardIndex, true);
|
||||
check(((SplitCard) card).getRightHalfCard(), cardIndex, true);
|
||||
} else if (card instanceof ModalDoubleFacesCard) {
|
||||
check(((ModalDoubleFacesCard) card).getLeftHalfCard(), cardIndex);
|
||||
check(((ModalDoubleFacesCard) card).getRightHalfCard(), cardIndex);
|
||||
check(((ModalDoubleFacesCard) card).getLeftHalfCard(), cardIndex, false);
|
||||
check(((ModalDoubleFacesCard) card).getRightHalfCard(), cardIndex, false);
|
||||
} else {
|
||||
check(card, cardIndex);
|
||||
check(card, cardIndex, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1171,13 +1171,13 @@ public class VerifyCardDataTest {
|
|||
}
|
||||
}
|
||||
|
||||
private void check(Card card, int cardIndex) {
|
||||
private void check(Card card, int cardIndex, boolean skipWarning) {
|
||||
MtgJsonCard ref = MtgJsonService.cardFromSet(card.getExpansionSetCode(), card.getName(), card.getCardNumber());
|
||||
if (ref == null) {
|
||||
if (ref != null) {
|
||||
checkAll(card, ref, cardIndex);
|
||||
} else if (!skipWarning) {
|
||||
warn(card, "Missing card reference");
|
||||
return;
|
||||
}
|
||||
checkAll(card, ref, cardIndex);
|
||||
}
|
||||
|
||||
private boolean contains(Collection<String> options, String value) {
|
||||
|
|
Loading…
Reference in a new issue