mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Added Portal Three Kingdoms set to Mage.
This commit is contained in:
parent
8b455aca40
commit
90d75a65a7
5 changed files with 80 additions and 11 deletions
|
@ -51,6 +51,7 @@ public class ConstructedFormats {
|
|||
"* Ice Age Block", "Coldsnap", "Alliances", "Ice Age", "Fourth Edition",
|
||||
"Homelands", "Fallen Empires", "The Dark", "Legends", "Antiquities", "Arabian Nights",
|
||||
"Revised Edition", "Unlimited Edition", "Limited Edition Beta", "Limited Edition Alpha",
|
||||
"Portal Three Kingdoms",
|
||||
"Guru",
|
||||
"Duel Decks: Heroes vs. Monsters",
|
||||
"Duel Decks: Elspeth vs. Tezzeret"
|
||||
|
@ -387,6 +388,9 @@ public class ConstructedFormats {
|
|||
if (format.equals("Guru")) {
|
||||
return Arrays.asList("GUR");
|
||||
}
|
||||
if (format.equals("Portal Three Kingdoms")) {
|
||||
return Arrays.asList("PTK");
|
||||
}
|
||||
if (format.equals("Duel Decks: Elspeth vs. Tezzeret")) {
|
||||
return Arrays.asList("DDF");
|
||||
}
|
||||
|
@ -422,17 +426,17 @@ public class ConstructedFormats {
|
|||
}
|
||||
}
|
||||
|
||||
private static final List<String> standard = new ArrayList<String>();
|
||||
private static final List<String> standard = new ArrayList<>();
|
||||
private static final Date standardDate = new GregorianCalendar(2012, 9, 28).getTime();
|
||||
|
||||
private static final List<String> extended = new ArrayList<String>();
|
||||
private static final List<String> extended = new ArrayList<>();
|
||||
private static final Date extendedDate = new GregorianCalendar(2009, 8, 20).getTime();
|
||||
|
||||
private static final List<String> modern = new ArrayList<String>();
|
||||
private static final List<String> modern = new ArrayList<>();
|
||||
private static final Date modernDate = new GregorianCalendar(2003, 7, 20).getTime();
|
||||
|
||||
// for all sets just return empty list
|
||||
private static final List<String> all = new ArrayList<String>();
|
||||
private static final List<String> all = new ArrayList<>();
|
||||
|
||||
static {
|
||||
buildLists();
|
||||
|
|
|
@ -30,7 +30,8 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
"RAV", "GPT", "DIS",
|
||||
"TSP", "TSB", "PLC", "FUT",
|
||||
"LRW", "MOR",
|
||||
"SHM", "EVE"};
|
||||
"SHM", "EVE",
|
||||
"PTK"};
|
||||
|
||||
private static final String[] withMythics = {"M10", "M11", "M12", "M13", "M14",
|
||||
"DDF", "DDL",
|
||||
|
@ -42,7 +43,7 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
"RTR", "GTC", "DGM",
|
||||
"MMA",
|
||||
"THS", "BNG"};
|
||||
private static final HashMap<String, String> symbolsReplacements = new HashMap<String, String>();
|
||||
private static final HashMap<String, String> symbolsReplacements = new HashMap<>();
|
||||
|
||||
static {
|
||||
symbolsReplacements.put("ARN", "AN");
|
||||
|
@ -89,7 +90,7 @@ public class GathererSets implements Iterable<DownloadJob> {
|
|||
|
||||
@Override
|
||||
public Iterator<DownloadJob> iterator() {
|
||||
ArrayList<DownloadJob> jobs = new ArrayList<DownloadJob>();
|
||||
ArrayList<DownloadJob> jobs = new ArrayList<>();
|
||||
for (String symbol : symbols) {
|
||||
jobs.add(generateDownloadJob(symbol, "C"));
|
||||
jobs.add(generateDownloadJob(symbol, "U"));
|
||||
|
|
|
@ -58,6 +58,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
put("10E", "tenth-edition");
|
||||
put("CSP", "coldsnap");
|
||||
put("CHK", "player-rewards-2004");
|
||||
put("PTK", "portal-three-kingdoms");
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
|
||||
private static CardImageSource instance;
|
||||
private static Map<String, String> setsAliases;
|
||||
private Map<String, Map<String, String>> sets;
|
||||
private final Map<String, Map<String, String>> sets;
|
||||
|
||||
public static CardImageSource getInstance() {
|
||||
if (instance == null) {
|
||||
|
@ -27,8 +27,8 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
public WizardCardsImageSource() {
|
||||
sets = new HashMap<String, Map<String, String>>();
|
||||
setsAliases = new HashMap<String, String>();
|
||||
sets = new HashMap<>();
|
||||
setsAliases = new HashMap<>();
|
||||
setsAliases.put("BNG", "bornofthegods/cig");
|
||||
setsAliases.put("C13", "commander2013/cig");
|
||||
setsAliases.put("THS", "theros/cig");
|
||||
|
@ -55,10 +55,11 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
setsAliases.put("CON", "conflux/spoiler");
|
||||
setsAliases.put("ALA", "shardsofalara/spoiler");
|
||||
setsAliases.put("PC2", "planechase2012edition/cig");
|
||||
setsAliases.put("PTK", "portalthreekingdoms/cig");
|
||||
}
|
||||
|
||||
private Map<String, String> getSetLinks(String cardSet) {
|
||||
Map<String, String> setLinks = new HashMap<String, String>();
|
||||
Map<String, String> setLinks = new HashMap<>();
|
||||
try {
|
||||
Document doc = Jsoup.connect("http://www.wizards.com/magic/tcg/article.aspx?x=mtg/tcg/" + setsAliases.get(cardSet)).get();
|
||||
Elements cardsImages = doc.select("img[height$=370]");
|
||||
|
|
62
Mage.Sets/src/mage/sets/PortalThreeKingdoms.java
Normal file
62
Mage.Sets/src/mage/sets/PortalThreeKingdoms.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets;
|
||||
|
||||
import java.util.GregorianCalendar;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class PortalThreeKingdoms extends ExpansionSet {
|
||||
|
||||
private static final PortalThreeKingdoms fINSTANCE = new PortalThreeKingdoms();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static PortalThreeKingdoms getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private PortalThreeKingdoms() {
|
||||
super("Portal Three Kingsdoms", "PTK", "mage.sets.portalthreekingdoms", new GregorianCalendar(1999, 5, 1).getTime(), SetType.REPRINT);
|
||||
this.hasBasicLands = true;
|
||||
this.hasBoosters = true;
|
||||
this.numBoosterLands = 2;
|
||||
this.numBoosterCommon = 5;
|
||||
this.numBoosterUncommon = 5;
|
||||
this.numBoosterRare = 1;
|
||||
this.ratioBoosterMythic = 0;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue