mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
other: fixed typos in omen related code (#13501);
This commit is contained in:
parent
2a1eebc5fc
commit
1568189c1b
2 changed files with 13 additions and 5 deletions
|
|
@ -54,7 +54,7 @@ public class ScryfallApiCard {
|
|||
this.card_faces.forEach(ScryfallApiCardFace::prepareCompatibleData);
|
||||
}
|
||||
|
||||
// workaround for adventure card name fix:
|
||||
// workaround for adventure/omen card name fix:
|
||||
// - scryfall: Ondu Knotmaster // Throw a Line
|
||||
// - xmage: Ondu Knotmaster
|
||||
if (this.layout.equals("adventure")) {
|
||||
|
|
@ -100,12 +100,12 @@ public class ScryfallApiCard {
|
|||
}
|
||||
this.name = this.card_faces.get(0).name;
|
||||
} else if (this.card_faces.get(0).layout.equals("adventure")) {
|
||||
// adventure card
|
||||
// adventure/omen card
|
||||
// Bloomvine Regent // Claim Territory
|
||||
// https://scryfall.com/card/tdm/381/bloomvine-regent-claim-territory-bloomvine-regent
|
||||
this.name = this.card_faces.get(0).name;
|
||||
if (this.card_faces.get(0).name.equals(this.card_faces.get(1).name)) {
|
||||
throw new IllegalArgumentException("Scryfall: unsupported data type, adventure's reversible_card must have diff names in faces "
|
||||
throw new IllegalArgumentException("Scryfall: unsupported data type, adventure/omen's reversible_card must have diff names in faces "
|
||||
+ this.set + " - " + this.collector_number + " - " + this.name);
|
||||
}
|
||||
} else if (this.card_faces.get(0).layout.equals("token")) {
|
||||
|
|
|
|||
|
|
@ -2560,12 +2560,20 @@ public class VerifyCardDataTest {
|
|||
refRules[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (ref.subtypes.contains("Omen")) {
|
||||
for (int i = 0; i < refRules.length; i++) {
|
||||
refRules[i] = "Omen " +
|
||||
ref.types.get(0) + " - " +
|
||||
ref.faceName + ' ' +
|
||||
ref.manaCost + " - " +
|
||||
refRules[i];
|
||||
}
|
||||
}
|
||||
|
||||
String[] cardRules = card
|
||||
.getRules()
|
||||
.stream()
|
||||
.filter(s -> !(card instanceof CardWithSpellOption) || !s.startsWith("Adventure ") || !s.startsWith("Omen "))
|
||||
.filter(s -> !(card instanceof CardWithSpellOption) || !(s.startsWith("Adventure ") || s.startsWith("Omen ")))
|
||||
.collect(Collectors.joining("\n"))
|
||||
.replace("<br>", "\n")
|
||||
.replace("<br/>", "\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue