mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
updated verify to handle adventures correctly
This commit is contained in:
parent
6d4b7ee601
commit
38481ef1e5
1 changed files with 22 additions and 6 deletions
|
|
@ -263,12 +263,12 @@ public class VerifyCardDataTest {
|
||||||
int cardIndex = 0;
|
int cardIndex = 0;
|
||||||
for (Card card : CardScanner.getAllCards()) {
|
for (Card card : CardScanner.getAllCards()) {
|
||||||
cardIndex++;
|
cardIndex++;
|
||||||
if (card instanceof SplitCard) {
|
if (card instanceof CardWithHalves) {
|
||||||
check(((SplitCard) card).getLeftHalfCard(), cardIndex);
|
check(((CardWithHalves) card).getLeftHalfCard(), cardIndex);
|
||||||
check(((SplitCard) card).getRightHalfCard(), cardIndex);
|
check(((CardWithHalves) card).getRightHalfCard(), cardIndex);
|
||||||
} else if (card instanceof ModalDoubleFacesCard) {
|
} else if (card instanceof AdventureCard) {
|
||||||
check(((ModalDoubleFacesCard) card).getLeftHalfCard(), cardIndex);
|
check(card, cardIndex);
|
||||||
check(((ModalDoubleFacesCard) card).getRightHalfCard(), cardIndex);
|
check(((AdventureCard) card).getSpellCard(), cardIndex);
|
||||||
} else {
|
} else {
|
||||||
check(card, cardIndex);
|
check(card, cardIndex);
|
||||||
}
|
}
|
||||||
|
|
@ -1673,9 +1673,25 @@ public class VerifyCardDataTest {
|
||||||
refRules[i] = prepareRule(card.getName(), refRules[i]);
|
refRules[i] = prepareRule(card.getName(), refRules[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ref.subtypes.contains("Adventure")) {
|
||||||
|
for (int i = 0; i < refRules.length; i++) {
|
||||||
|
refRules[i] = new StringBuilder("Adventure ")
|
||||||
|
.append(ref.types.get(0))
|
||||||
|
.append(" - ")
|
||||||
|
.append(ref.faceName)
|
||||||
|
.append(' ')
|
||||||
|
.append(ref.manaCost)
|
||||||
|
.append(" - ")
|
||||||
|
.append(refRules[i])
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
String[] cardRules = card
|
String[] cardRules = card
|
||||||
.getRules()
|
.getRules()
|
||||||
.stream()
|
.stream()
|
||||||
|
.filter(s -> !(card instanceof AdventureCard) || !s.startsWith("Adventure "))
|
||||||
.collect(Collectors.joining("\n"))
|
.collect(Collectors.joining("\n"))
|
||||||
.replace("<br>", "\n")
|
.replace("<br>", "\n")
|
||||||
.replace("<br/>", "\n")
|
.replace("<br/>", "\n")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue