mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Some changes for token download.
This commit is contained in:
parent
c7e64ac9fe
commit
fe80d292ab
4 changed files with 79 additions and 34 deletions
|
@ -13,7 +13,7 @@ import org.mage.plugins.card.utils.CardImageUtils;
|
|||
public class MagicCardsImageSource implements CardImageSource {
|
||||
|
||||
private static CardImageSource instance = new MagicCardsImageSource();
|
||||
|
||||
|
||||
private static final Map<String, String> setNameTokenReplacement = new HashMap<String, String>() {
|
||||
{
|
||||
put("BFZ", "battle-for-zendikar");
|
||||
|
@ -31,8 +31,8 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
put("MM2", "modern-masters-2015");
|
||||
put("PTC", "prerelease-events");
|
||||
put("DTK", "dragons-of-tarkir");
|
||||
put("GRC","wpngateway");
|
||||
put("MBP","media-inserts");
|
||||
put("GRC", "wpngateway");
|
||||
put("MBP", "media-inserts");
|
||||
put("MLP", "launch-party");
|
||||
put("WMCQ", "world-magic-cup-qualifier");
|
||||
put("GPX", "grand-prix");
|
||||
|
@ -40,7 +40,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
put("MGDC", "magic-game-day-cards");
|
||||
put("FNMP", "friday-night-magic");
|
||||
put("FRF", "fate-reforged");
|
||||
put("C14", "commander-2014-edition");
|
||||
put("C14", "commander-2014");
|
||||
put("KTK", "khans-of-tarkir");
|
||||
put("VMA", "vintage-masters");
|
||||
put("CNS", "conspiracy");
|
||||
|
@ -130,7 +130,7 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
String set = CardImageUtils.updateSet(cardSet, true);
|
||||
|
||||
String preferedLanguage = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_PREF_LANGUAGE, "en");
|
||||
|
||||
|
||||
StringBuilder url = new StringBuilder("http://magiccards.info/scans/").append(preferedLanguage).append("/");
|
||||
url.append(set.toLowerCase()).append("/").append(collectorId);
|
||||
|
||||
|
|
|
@ -61,14 +61,19 @@
|
|||
#|Generate|TOK:PTC|Wolf|
|
||||
#|Generate|TOK:PTC|Wurm|
|
||||
|
||||
#|Generate|TOK:DTK|Djinn Monk|
|
||||
#|Generate|TOK:DTK|Dragon|
|
||||
#|Generate|TOK:DTK|Goblin|
|
||||
#|Generate|TOK:DTK|Morph|
|
||||
#|Generate|TOK:DTK|Warrior|
|
||||
#|Generate|TOK:DTK|Zombie|
|
||||
#|Generate|TOK:DTK|Zombie Horror|
|
||||
#|Generate|EMBLEM!:DTK|Emblem Narset Transcendent|
|
||||
|Generate|TOK:DTK|Djinn Monk|
|
||||
|Generate|TOK:DTK|Dragon|
|
||||
|Generate|TOK:DTK|Goblin|
|
||||
|Generate|TOK:DTK|Morph|
|
||||
|Generate|TOK:DTK|Warrior|
|
||||
|Generate|TOK:DTK|Zombie|
|
||||
|Generate|TOK:DTK|Zombie Horror|
|
||||
|Generate|EMBLEM!:DTK|Emblem Narset|
|
||||
|
||||
|Generate|TOK:FRF|Monk|
|
||||
|Generate|TOK:FRF|Spirit|
|
||||
|Generate|TOK:FRF|Warrior|
|
||||
|Generate|TOK:FRF|Manifest|
|
||||
|
||||
#|Generate|TOK:GRC|Bird|
|
||||
#|Generate|TOK:GRC|Golem|
|
||||
|
@ -105,21 +110,59 @@
|
|||
|Generate|TOK:FNMP|Wolf|
|
||||
#|Generate|TOK:FNMP|Wurm|
|
||||
|
||||
|Generate|TOK:C14|Angel|
|
||||
|Generate|TOK:C14|Cat|
|
||||
|Generate|TOK:C14|Goat|
|
||||
|Generate|TOK:C14|Kor Soldier|
|
||||
|Generate|TOK:C14|Pegasus|
|
||||
|Generate|TOK:C14|Soldier|
|
||||
|Generate|TOK:C14|Spirit|
|
||||
|Generate|TOK:C14|Fish|
|
||||
|Generate|TOK:C14|Kraken|
|
||||
|Generate|TOK:C14|Whale|
|
||||
|Generate|TOK:C14|Zombie 1|
|
||||
|Generate|TOK:C14|Demon 1|
|
||||
|Generate|TOK:C14|Demon 2|
|
||||
|Generate|TOK:C14|Germ|
|
||||
|Generate|TOK:C14|Horror|
|
||||
|Generate|TOK:C14|Zombie 2|
|
||||
|Generate|TOK:C14|Goblin|
|
||||
|Generate|TOK:C14|Ape|
|
||||
|Generate|TOK:C14|Beast 1|
|
||||
|Generate|TOK:C14|Beast 2|
|
||||
|Generate|TOK:C14|Elemental|
|
||||
|Generate|TOK:C14|Elephant|
|
||||
|Generate|TOK:C14|Elf Druid|
|
||||
|Generate|TOK:C14|Elf Warrior|
|
||||
|Generate|TOK:C14|Treefolk|
|
||||
|Generate|TOK:C14|Wolf|
|
||||
|Generate|TOK:C14|Gargoyle|
|
||||
|Generate|TOK:C14|Myr|
|
||||
|Generate|TOK:C14|Pentavite|
|
||||
|Generate|TOK:C14|Stoneforged Blade|
|
||||
|Generate|TOK:C14|Tuktuk the Returned|
|
||||
|Generate|TOK:C14|Wurm 1|
|
||||
|Generate|TOK:C14|Wurm 2|
|
||||
|Generate|EMBLEM!:C14|Emblem Teferi
|
||||
|Generate|EMBLEM!:C14|Emblem Nixilis
|
||||
|Generate|EMBLEM!:C14|Emblem Daretti
|
||||
|
||||
|
||||
|Generate|TOK:DDN|Goblin|
|
||||
|
||||
#|Generate|TOK:KTK|Bear|
|
||||
#|Generate|TOK:KTK|Bird|
|
||||
#|Generate|TOK:KTK|Goblin|
|
||||
#|Generate|TOK:KTK|Morph|
|
||||
#|Generate|TOK:KTK|Snake|
|
||||
#|Generate|TOK:KTK|Spirit Warrior|
|
||||
#|Generate|TOK:KTK|Spirit|
|
||||
#|Generate|TOK:KTK|Vampire|
|
||||
#|Generate|TOK:KTK|Warrior 1|
|
||||
#|Generate|TOK:KTK|Warrior 2|
|
||||
#|Generate|TOK:KTK|Zombie|
|
||||
#|Generate|EMBLEM!:KTK|Emblem Sarkhan, the Dragonspeaker|
|
||||
#|Generate|EMBLEM!:KTK|Emblem Sorin, Solemn Visitor|
|
||||
|Generate|TOK:KTK|Bear|
|
||||
|Generate|TOK:KTK|Bird|
|
||||
|Generate|TOK:KTK|Goblin|
|
||||
|Generate|TOK:KTK|Morph|
|
||||
|Generate|TOK:KTK|Snake|
|
||||
|Generate|TOK:KTK|Spirit Warrior|
|
||||
|Generate|TOK:KTK|Spirit|
|
||||
|Generate|TOK:KTK|Vampire|
|
||||
|Generate|TOK:KTK|Warrior 1|
|
||||
|Generate|TOK:KTK|Warrior 2|
|
||||
|Generate|TOK:KTK|Zombie|
|
||||
|Generate|EMBLEM!:KTK|Emblem Sarkhan|
|
||||
|Generate|EMBLEM!:KTK|Emblem Sorin|
|
||||
|
||||
|Generate|TOK:M15|Sliver|
|
||||
|Generate|TOK:M15|Soldier|
|
||||
|
@ -448,4 +491,4 @@
|
|||
|
||||
|Generate|TOK:CSP|Marit Lage|
|
||||
|
||||
|Generate|TOK:CHK|Spirit|
|
||||
#|Generate|TOK:CHK|Spirit|
|
|
@ -51,7 +51,6 @@ import mage.filter.FilterCard;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -65,7 +64,6 @@ public class TeferiTemporalArchmage extends CardImpl {
|
|||
this.expansionSetCode = "C14";
|
||||
this.subtype.add("Teferi");
|
||||
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false));
|
||||
|
||||
// +1: Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library.
|
||||
|
@ -73,13 +71,13 @@ public class TeferiTemporalArchmage extends CardImpl {
|
|||
new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false), 1));
|
||||
|
||||
// -1: Untap up to four target permanents.
|
||||
LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new UntapTargetEffect(), -1);
|
||||
loyaltyAbility.addTarget(new TargetPermanent(0,4, new FilterPermanent(), false));
|
||||
LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new UntapTargetEffect(), -1);
|
||||
loyaltyAbility.addTarget(new TargetPermanent(0, 4, new FilterPermanent(), false));
|
||||
this.addAbility(loyaltyAbility);
|
||||
|
||||
// -10: You get an emblem with "You may activate loyalty abilities of planeswalkers you control on any player's turn any time you could cast an instant."
|
||||
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new TeferiTemporalArchmageEmblem()), -10));
|
||||
|
||||
|
||||
// Teferi, Temporal Archmage can be your commander.
|
||||
this.addAbility(CanBeYourCommanderAbility.getInstance());
|
||||
|
||||
|
@ -96,7 +94,9 @@ public class TeferiTemporalArchmage extends CardImpl {
|
|||
}
|
||||
|
||||
class TeferiTemporalArchmageEmblem extends Emblem {
|
||||
|
||||
// "You may activate loyalty abilities of planeswalkers you control on any player's turn any time you could cast an instant."
|
||||
|
||||
public TeferiTemporalArchmageEmblem() {
|
||||
this.setName("EMBLEM: Teferi, Temporal Archmage");
|
||||
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new TeferiTemporalArchmageAsThoughEffect()));
|
||||
|
@ -114,7 +114,6 @@ class TeferiTemporalArchmageAsThoughEffect extends AsThoughEffectImpl {
|
|||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
|
@ -135,7 +134,7 @@ class TeferiTemporalArchmageAsThoughEffect extends AsThoughEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return false; // Not used
|
||||
return false; // Not used
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,6 +62,9 @@ public class ZombieToken extends Token {
|
|||
if (getOriginalExpansionSetCode().equals("ISD")) {
|
||||
this.setTokenType(new Random().nextInt(3) + 1);
|
||||
}
|
||||
if (getOriginalExpansionSetCode().equals("C14")) {
|
||||
this.setTokenType(2);
|
||||
}
|
||||
}
|
||||
|
||||
public ZombieToken(final ZombieToken token) {
|
||||
|
|
Loading…
Reference in a new issue