mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Fixed wrong MtgJsonV4 data format (#5415);
This commit is contained in:
parent
a922cb4d07
commit
41a2573319
8 changed files with 69 additions and 102 deletions
|
@ -1,8 +0,0 @@
|
|||
package mage.verify;
|
||||
|
||||
public class Booster {
|
||||
|
||||
public Booster(String mythic){
|
||||
|
||||
}
|
||||
}
|
|
@ -3,59 +3,49 @@ package mage.verify;
|
|||
import java.util.List;
|
||||
|
||||
class JsonCard {
|
||||
// docs: https://mtgjson.com/v4/docs.html
|
||||
|
||||
public String uuid;
|
||||
public String convertedManaCost;
|
||||
public List<ForeignData> foreignData;
|
||||
public boolean isReserved;
|
||||
public String side;
|
||||
public Legality legalities;
|
||||
public List<String> printings;
|
||||
public List<Ruling> rulings;
|
||||
public String artist;
|
||||
public String borderColor;
|
||||
public List<String> colorIdentity;
|
||||
public List<String> colorIndicator;
|
||||
public String layout;
|
||||
public String name;
|
||||
public List<String> names; // flip cards
|
||||
public String manaCost;
|
||||
public List<String> colors;
|
||||
public float convertedManaCost;
|
||||
public float faceConvertedManaCost;
|
||||
public String flavorText;
|
||||
public List<JsonForeignData> foreignData;
|
||||
public String frameVersion;
|
||||
public boolean hasFoil;
|
||||
public boolean hasNonFoil;
|
||||
public String multiverseId;
|
||||
public String frameVersion;
|
||||
public int cmc;
|
||||
public List<String> colors;
|
||||
public List<String> colorIdentity;
|
||||
public String type;
|
||||
public List<String> supertypes;
|
||||
public List<String> types;
|
||||
public List<String> subtypes;
|
||||
public String text;
|
||||
public String power;
|
||||
public String toughness;
|
||||
public boolean isOnlineOnly;
|
||||
public boolean isOversized;
|
||||
public boolean isReserved;
|
||||
public boolean isTimeshifted;
|
||||
public String layout;
|
||||
public JsonLegalities legalities;
|
||||
public String loyalty;
|
||||
public String imageName;
|
||||
public boolean starter; // only available in boxed sets and not in boosters
|
||||
public int hand; // vanguard
|
||||
public int life; // vanguard
|
||||
public String manaCost;
|
||||
public int multiverseId;
|
||||
public String name;
|
||||
public List<String> names;
|
||||
public String number;
|
||||
public String originalText;
|
||||
public String originalType;
|
||||
public String flavorText;
|
||||
public boolean isOnlineOnly;
|
||||
|
||||
// only available in AllSets.json
|
||||
public String artist;
|
||||
public String flavor;
|
||||
public String id;
|
||||
public int multiverseid;
|
||||
public List<String> printings;
|
||||
public String power;
|
||||
public String rarity;
|
||||
public boolean reserved;
|
||||
public int[] variations;
|
||||
public String number;
|
||||
public String mciNumber;
|
||||
public String releaseDate; // promos
|
||||
public String border;
|
||||
public List<JsonRuling> rulings;
|
||||
public List<String> subtypes;
|
||||
public List<String> supertypes;
|
||||
public String text;
|
||||
public String toughness;
|
||||
public String type;
|
||||
public List<String> types;
|
||||
public String uuid;
|
||||
public List<String> variations;
|
||||
public String watermark;
|
||||
public boolean timeshifted;
|
||||
public String borderColor;
|
||||
public boolean isOversized;
|
||||
public String faceConvertedManaCost;
|
||||
|
||||
// unknown
|
||||
public boolean starter;
|
||||
public String side;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package mage.verify;
|
||||
|
||||
public class ForeignData {
|
||||
|
||||
|
||||
public String language;
|
||||
public String name;
|
||||
public String type;
|
||||
public String text;
|
||||
public class JsonForeignData {
|
||||
public String flavorText;
|
||||
public String multiverseId;
|
||||
public String language;
|
||||
public int multiverseId;
|
||||
public String name;
|
||||
public String text;
|
||||
public String type;
|
||||
}
|
|
@ -2,18 +2,18 @@ package mage.verify;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Legality {
|
||||
public class JsonLegalities {
|
||||
@JsonProperty("1v1")
|
||||
public String oneVersusOne;
|
||||
public String brawl;
|
||||
public String commander;
|
||||
public String duel;
|
||||
public String frontier;
|
||||
public String future;
|
||||
public String legacy;
|
||||
public String modern;
|
||||
public String penny;
|
||||
public String pauper;
|
||||
public String standard;
|
||||
public String vintage;
|
||||
public String frontier;
|
||||
public String modern;
|
||||
public String pauper;
|
||||
public String brawl;
|
||||
public String future;
|
||||
public String standard;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package mage.verify;
|
||||
|
||||
public class Meta {
|
||||
public class JsonMeta {
|
||||
public String date;
|
||||
public String version;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package mage.verify;
|
||||
|
||||
public class Ruling {
|
||||
public String text;
|
||||
public class JsonRuling {
|
||||
public String date;
|
||||
public String text;
|
||||
}
|
|
@ -1,36 +1,20 @@
|
|||
package mage.verify;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
class JsonSet {
|
||||
public String name;
|
||||
public String code;
|
||||
public String oldCode;
|
||||
public String gathererCode;
|
||||
public String magicCardsInfoCode;
|
||||
public String[] magicRaritiesCodes;
|
||||
public String[] alternativeNames;
|
||||
public String releaseDate;
|
||||
public String border;
|
||||
public String type;
|
||||
public List<Object> booster; // [String|[String]]
|
||||
public List<JsonCard> cards;
|
||||
public String block;
|
||||
public boolean onlineOnly;
|
||||
public String mkm_id;
|
||||
public String mkm_name;
|
||||
public Map<String, String> translations;
|
||||
public int baseSetSize;
|
||||
@JsonIgnore
|
||||
public List<Booster> boosterV3;
|
||||
public String borderColor;
|
||||
public Meta meta;
|
||||
public String mtgoCode;
|
||||
public List<Token> tokens;
|
||||
public int totalSetSize;
|
||||
public boolean isOnlineOnly;
|
||||
public String block;
|
||||
public List<Object> boosterV3; // [["rare", "mythic rare"], "uncommon", "uncommon", "uncommon", "common"]
|
||||
public List<JsonCard> cards;
|
||||
public String code;
|
||||
public boolean isFoilOnly;
|
||||
public boolean isOnlineOnly;
|
||||
public JsonMeta meta;
|
||||
public String mtgoCode;
|
||||
public String name;
|
||||
public String releaseDate;
|
||||
public List<JsonToken> tokens;
|
||||
public int totalSetSize;
|
||||
public String type;
|
||||
}
|
||||
|
|
|
@ -2,17 +2,20 @@ package mage.verify;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class Token {
|
||||
public class JsonToken {
|
||||
public String artist;
|
||||
public String borderColor;
|
||||
public List<String> colorIdentity;
|
||||
public List<String> colorIndicator;
|
||||
public List<String> colors;
|
||||
public String loyalty;
|
||||
public String name;
|
||||
public String number;
|
||||
public String power;
|
||||
public String toughness;
|
||||
public List<String> reverseRelated;
|
||||
public String side;
|
||||
public String text;
|
||||
public String toughness;
|
||||
public String type;
|
||||
public String uuid;
|
||||
public String watermark;
|
Loading…
Reference in a new issue