Tests: fixed miss cards from mtgjson checks in verify

This commit is contained in:
Oleg Agafonov 2023-03-20 22:28:04 +04:00
parent 2c15ac39fc
commit d757a22acf

View file

@ -34,18 +34,17 @@ public final class MtgJsonCard {
public List<String> printings; // set codes with that card public List<String> printings; // set codes with that card
public String getRealCardName() { public String getRealCardName() {
// double faces cards must be split in different cards in xmage (so use faceName instead name) // xmage split a double faced card to two different cards, but mtgjson/scryfall uses full name,
// for card searching // so use faceName property for full name searching
if ("transform".equals(layout) if ("transform".equals(layout)
|| "flip".equals(layout) || "flip".equals(layout)
|| "adventure".equals(layout) || "adventure".equals(layout)
|| "modal_dfc".equals(layout) || "modal_dfc".equals(layout)
|| "reversible_card".equals(layout) // example: Zndrsplt, Eye of Wisdom || "reversible_card".equals(layout) // reversible_card - example: Zndrsplt, Eye of Wisdom
|| "split".equals(layout) || "meld".equals(layout)) { // meld - mtgjson uses composite names for meld cards, but scryfall uses simple face names
|| "aftermath".equals(layout)
|| "meld".equals(layout)) { // mtgjson uses composite names for meld cards, but scryfall uses simple face names
return faceName; return faceName;
} }
return asciiName != null ? asciiName : name; return asciiName != null ? asciiName : name;
} }
} }