mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Added new Mythic Edition (MED) set (16 cards, scryfall download)
This commit is contained in:
parent
c29b68f030
commit
00ad61b6bd
4 changed files with 59 additions and 13 deletions
|
|
@ -66,8 +66,9 @@ public enum ScryfallImageSource implements CardImageSource {
|
|||
if (baseUrl == null && card.isCollectorIdWithStr()) {
|
||||
// WARNING, after 2018 it's not compatible and some new sets have GUID files instead card numbers
|
||||
// TODO: replace card number links to API calls (need test with lands, alternative images and double faces), replace not working images by direct links
|
||||
if (card.getCollectorId().startsWith("U")) {
|
||||
// fix for Ultimate Box Topper (PUMA) -- need to use API
|
||||
|
||||
if (card.getCollectorId().startsWith("U") || card.getCollectorIdAsInt() == -1) {
|
||||
// fix for Ultimate Box Topper (PUMA) and Mythic Edition (MED) -- need to use API
|
||||
// ignored and go to API call at the end
|
||||
} else {
|
||||
baseUrl = "https://img.scryfall.com/cards/large/" + localizedCode + "/" + formatSetName(card.getSet(), isToken) + "/"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ public class ScryfallImageSupportCards {
|
|||
put("EURO", "pelp");
|
||||
put("GPX", "pgpx");
|
||||
put("MED", "me1");
|
||||
put("MEDM", "med");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -236,6 +237,7 @@ public class ScryfallImageSupportCards {
|
|||
add("UMA");
|
||||
add("PUMA");
|
||||
add("RNA");
|
||||
add("MEDM");
|
||||
//
|
||||
add("EURO");
|
||||
add("GPX");
|
||||
|
|
|
|||
39
Mage.Sets/src/mage/sets/MythicEdition.java
Normal file
39
Mage.Sets/src/mage/sets/MythicEdition.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
package mage.sets;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public final class MythicEdition extends ExpansionSet {
|
||||
|
||||
private static final MythicEdition instance = new MythicEdition();
|
||||
|
||||
public static MythicEdition getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private MythicEdition() {
|
||||
super("Mythic Edition", "MEDM", ExpansionSet.buildDate(2018, 10, 5), SetType.SUPPLEMENTAL); // MEDM cause MED uses for master edition
|
||||
this.hasBasicLands = false;
|
||||
|
||||
cards.add(new SetCardInfo("Ajani, Mentor of Heroes", "RA5", Rarity.MYTHIC, mage.cards.a.AjaniMentorOfHeroes.class));
|
||||
cards.add(new SetCardInfo("Dack Fayden", "RA6", Rarity.MYTHIC, mage.cards.d.DackFayden.class));
|
||||
cards.add(new SetCardInfo("Daretti, Ingenious Iconoclast", "GR3", Rarity.MYTHIC, mage.cards.d.DarettiIngeniousIconoclast.class));
|
||||
cards.add(new SetCardInfo("Domri, Chaos Bringer", "RA7", Rarity.MYTHIC, mage.cards.d.DomriChaosBringer.class));
|
||||
cards.add(new SetCardInfo("Elspeth, Knight-Errant", "GR1", Rarity.MYTHIC, mage.cards.e.ElspethKnightErrant.class));
|
||||
cards.add(new SetCardInfo("Jaya Ballard", "RA4", Rarity.MYTHIC, mage.cards.j.JayaBallard.class));
|
||||
cards.add(new SetCardInfo("Karn, Scion of Urza", "RA1", Rarity.MYTHIC, mage.cards.k.KarnScionOfUrza.class));
|
||||
cards.add(new SetCardInfo("Kaya, Orzhov Usurper", "RA8", Rarity.MYTHIC, mage.cards.k.KayaOrzhovUsurper.class));
|
||||
cards.add(new SetCardInfo("Liliana, the Last Hope", "GR2", Rarity.MYTHIC, mage.cards.l.LilianaTheLastHope.class));
|
||||
cards.add(new SetCardInfo("Nicol Bolas, Planeswalker", "GR4", Rarity.MYTHIC, mage.cards.n.NicolBolasPlaneswalker.class));
|
||||
cards.add(new SetCardInfo("Ral, Izzet Viceroy", "GR5", Rarity.MYTHIC, mage.cards.r.RalIzzetViceroy.class));
|
||||
cards.add(new SetCardInfo("Sorin Markov", "RA3", Rarity.MYTHIC, mage.cards.s.SorinMarkov.class));
|
||||
cards.add(new SetCardInfo("Tamiyo, the Moon Sage", "RA2", Rarity.MYTHIC, mage.cards.t.TamiyoTheMoonSage.class));
|
||||
cards.add(new SetCardInfo("Teferi, Hero of Dominaria", "GR6", Rarity.MYTHIC, mage.cards.t.TeferiHeroOfDominaria.class));
|
||||
cards.add(new SetCardInfo("Tezzeret, Agent of Bolas", "GR7", Rarity.MYTHIC, mage.cards.t.TezzeretAgentOfBolas.class));
|
||||
cards.add(new SetCardInfo("Vraska, Golgari Queen", "GR8", Rarity.MYTHIC, mage.cards.v.VraskaGolgariQueen.class));
|
||||
}
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ public final class CardUtil {
|
|||
* @param reduceCount
|
||||
*/
|
||||
public static void adjustCost(SpellAbility spellAbility, int reduceCount) {
|
||||
CardUtil.adjustAbilityCost((Ability) spellAbility, reduceCount);
|
||||
CardUtil.adjustAbilityCost(spellAbility, reduceCount);
|
||||
}
|
||||
|
||||
public static ManaCosts<ManaCost> increaseCost(ManaCosts<ManaCost> manaCosts, int increaseCount) {
|
||||
|
|
@ -379,15 +379,20 @@ public final class CardUtil {
|
|||
throw new IllegalArgumentException("Card number is empty.");
|
||||
}
|
||||
|
||||
if (!Character.isDigit(cardNumber.charAt(0))) {
|
||||
// U123
|
||||
return Integer.parseInt(cardNumber.substring(1, cardNumber.length()));
|
||||
} else if (!Character.isDigit(cardNumber.charAt(cardNumber.length() - 1))) {
|
||||
// 123b
|
||||
return Integer.parseInt(cardNumber.substring(0, cardNumber.length() - 1));
|
||||
} else {
|
||||
// 123
|
||||
return Integer.parseInt(cardNumber);
|
||||
try {
|
||||
if (!Character.isDigit(cardNumber.charAt(0))) {
|
||||
// U123
|
||||
return Integer.parseInt(cardNumber.substring(1));
|
||||
} else if (!Character.isDigit(cardNumber.charAt(cardNumber.length() - 1))) {
|
||||
// 123b
|
||||
return Integer.parseInt(cardNumber.substring(0, cardNumber.length() - 1));
|
||||
} else {
|
||||
// 123
|
||||
return Integer.parseInt(cardNumber);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
// wrong numbers like RA5 and etc
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -532,7 +537,6 @@ public final class CardUtil {
|
|||
}
|
||||
} else {
|
||||
title = textSuffix == null ? "" : textSuffix;
|
||||
;
|
||||
}
|
||||
return title;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue