From 6e26a8d7a6d400e2a371a7549c4602da36a15234 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Mon, 5 Jul 2021 22:20:48 +0400 Subject: [PATCH] [MH2] added tokens and images download; --- .../sources/ScryfallImageSupportTokens.java | 21 +++++++ .../src/main/resources/card-pictures-tok.txt | 39 ++++++++++--- .../src/mage/cards/g/GripOfPhyresis.java | 9 ++- .../keyword/LivingWeaponAbility.java | 4 +- .../game/permanent/token/BeastToken2.java | 2 +- .../mage/game/permanent/token/BirdToken.java | 3 +- .../permanent/token/ClueArtifactToken.java | 18 ++---- .../mage/game/permanent/token/CrabToken.java | 4 ++ .../mage/game/permanent/token/FoodToken.java | 8 ++- .../mage/game/permanent/token/GermToken.java | 55 ------------------- .../game/permanent/token/GoblinToken.java | 4 +- .../permanent/token/IzoniInsectToken.java | 9 +-- .../permanent/token/KarnConstructToken.java | 2 +- .../permanent/token/PhyrexianGermToken.java | 39 +++++++++++++ .../permanent/token/RedWhiteGolemToken.java | 7 +++ .../game/permanent/token/SquirrelToken.java | 13 +---- .../token/ThopterColorlessToken.java | 3 +- ...itaniaProtectorOfArgothElementalToken.java | 27 +++------ .../game/permanent/token/TreasureToken.java | 8 +-- .../game/permanent/token/ZombieToken.java | 2 +- 20 files changed, 146 insertions(+), 131 deletions(-) delete mode 100644 Mage/src/main/java/mage/game/permanent/token/GermToken.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/PhyrexianGermToken.java diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java index 57bb3500af..bc5003a66d 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java @@ -592,6 +592,27 @@ public class ScryfallImageSupportTokens { put("C21/Wurm", "https://api.scryfall.com/cards/tc21/19/en?format=image"); put("C21/Zombie", "https://api.scryfall.com/cards/tc21/9/en?format=image"); + // MH2 + put("MH2/Beast", "https://api.scryfall.com/cards/tmh2/9/en?format=image"); + put("MH2/Bird", "https://api.scryfall.com/cards/tmh2/1/en?format=image"); + put("MH2/Clue/1", "https://api.scryfall.com/cards/tmh2/14/en?format=image"); + put("MH2/Clue/2", "https://api.scryfall.com/cards/tmh2/15/en?format=image"); + put("MH2/Construct", "https://api.scryfall.com/cards/tmh2/16/en?format=image"); + put("MH2/Crab", "https://api.scryfall.com/cards/tmh2/2/en?format=image"); + put("MH2/Elemental", "https://api.scryfall.com/cards/tmh2/10/en?format=image"); + put("MH2/Food/1", "https://api.scryfall.com/cards/tmh2/17/en?format=image"); + put("MH2/Food/2", "https://api.scryfall.com/cards/tmh2/18/en?format=image"); + put("MH2/Goblin", "https://api.scryfall.com/cards/tmh2/8/en?format=image"); + put("MH2/Golem", "https://api.scryfall.com/cards/tmh2/12/en?format=image"); + put("MH2/Insect", "https://api.scryfall.com/cards/tmh2/13/en?format=image"); + put("MH2/Phyrexian Germ", "https://api.scryfall.com/cards/tmh2/3/en?format=image"); + put("MH2/Squirrel", "https://api.scryfall.com/cards/tmh2/11/en?format=image"); + put("MH2/Thopter", "https://api.scryfall.com/cards/tmh2/19/en?format=image"); + put("MH2/Treasure/1", "https://api.scryfall.com/cards/tmh2/20/en?format=image"); + put("MH2/Treasure/2", "https://api.scryfall.com/cards/tmh2/21/en?format=image"); + put("MH2/Zombie Army", "https://api.scryfall.com/cards/tmh2/7/en?format=image"); + put("MH2/Zombie", "https://api.scryfall.com/cards/tmh2/6/en?format=image"); + // generate supported sets supportedSets.clear(); for (String cardName : this.keySet()) { diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 02f2b4c9f8..8be311a057 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -313,7 +313,7 @@ |Generate|TOK:C14|Equipment|||NahiriTheLithomancerEquipmentToken| |Generate|TOK:C14|Fish|||ReefWormFishToken| |Generate|TOK:C14|Gargoyle|||GargoyleToken| -|Generate|TOK:C14|Germ|||GermToken| +|Generate|TOK:C14|Germ|||PhyrexianGermToken| |Generate|TOK:C14|Goat|||GoatToken| |Generate|TOK:C14|Goblin Golem|||TuktukTheReturnedToken| |Generate|TOK:C14|Goblin|||GoblinToken| @@ -344,7 +344,7 @@ |Generate|TOK:C15|Elemental|2||LightningRagerToken| |Generate|TOK:C15|Elephant|||ElephantToken| |Generate|TOK:C15|Frog Lizard|||RapidHybridizationToken| -|Generate|TOK:C15|Germ|||GermToken| +|Generate|TOK:C15|Germ|||PhyrexianGermToken| |Generate|TOK:C15|Gold|| |Generate|TOK:C15|Knight|1||KnightToken| |Generate|TOK:C15|Knight|2||HuntedDragonKnightToken| @@ -849,7 +849,7 @@ |Generate|TOK:M15|Treefolk Warrior|||KalonianTwingroveTreefolkWarriorToken| |Generate|TOK:M15|Zombie|||ZombieToken| |Generate|TOK:MBS|Cat|||CatToken| -|Generate|TOK:MBS|Germ|||GermToken| +|Generate|TOK:MBS|Germ|||PhyrexianGermToken| |Generate|TOK:MBS|Golem|||TitanForgeGolemToken| |Generate|TOK:MBS|Horror|||PhyrexianRebirthHorrorToken| |Generate|TOK:MBS|Myr|||MyrToken| @@ -886,7 +886,7 @@ |Generate|TOK:MM2|Eldrazi Spawn|||EldraziSpawnToken| |Generate|TOK:MM2|Elephant|||ElephantToken| |Generate|TOK:MM2|Faerie Rogue|||FaerieRogueToken| -|Generate|TOK:MM2|Germ|||GermToken| +|Generate|TOK:MM2|Germ|||PhyrexianGermToken| |Generate|TOK:MM2|Golem|||GolemToken| |Generate|TOK:MM2|Insect|||InsectToken| |Generate|TOK:MM2|Myr|||MyrToken| @@ -962,7 +962,7 @@ |Generate|TOK:NEM|Saproling|1||SaprolingBurstToken| |Generate|TOK:NEM|Saproling|2||SaprolingToken| |Generate|TOK:NPH|Beast|||BeastToken| -|Generate|TOK:NPH|Germ|||GermToken| +|Generate|TOK:NPH|Germ|||PhyrexianGermToken| |Generate|TOK:NPH|Goblin|||GoblinTokenWithHaste| |Generate|TOK:NPH|Goblin|||GoblinToken| |Generate|TOK:NPH|Golem|||GolemToken| @@ -1011,7 +1011,7 @@ |Generate|TOK:PC2|Beast|||BeastToken| |Generate|TOK:PC2|Boar|||BoarToken| |Generate|TOK:PC2|Eldrazi Spawn|||EldraziSpawnToken| -|Generate|TOK:PC2|Germ|||GermToken| +|Generate|TOK:PC2|Germ|||PhyrexianGermToken| |Generate|TOK:PC2|Goblin|||GoblinToken| |Generate|TOK:PC2|Hellion|||HellionToken| |Generate|TOK:PC2|Insect|||InsectToken| @@ -1423,7 +1423,7 @@ # OonaQueenFaerieRogueToken is FaerieRogueToken with additional blue color, but ZNC contains only one token - so don't use normal token for it #|Generate|TOK:ZNC|Faerie Rogue|||OonaQueenFaerieRogueToken| # Germ token uses in chest and antology, but scryfall put it here -#|Generate|TOK:ZNC|Germ|||GermToken| +#|Generate|TOK:ZNC|Germ|||PhyrexianGermToken| # |Generate|TOK:ZNC|Goblin Rogue|||GoblinRogueToken| |Generate|TOK:ZNC|Kor Ally|||KorAllyToken| @@ -1540,4 +1540,27 @@ |Generate|TOK:C21|Thopter|||ThopterColorlessToken| |Generate|TOK:C21|Whale|||ReefWormWhaleToken| |Generate|TOK:C21|Wurm|||WurmToken| -|Generate|TOK:C21|Zombie|||ZombieToken| \ No newline at end of file +|Generate|TOK:C21|Zombie|||ZombieToken| + +// MH2 +|Generate|TOK:MH2|Beast|||BeastToken2| +|Generate|TOK:MH2|Bird|||BirdToken| +|Generate|TOK:MH2|Clue|1||ClueArtifactToken| +|Generate|TOK:MH2|Clue|2||ClueArtifactToken| +|Generate|TOK:MH2|Construct|||KarnConstructToken| +|Generate|TOK:MH2|Crab|||CrabToken| +|Generate|TOK:MH2|Elemental|||TitaniaProtectorOfArgothElementalToken| +|Generate|TOK:MH2|Food|1||FoodToken| +|Generate|TOK:MH2|Food|2||FoodToken| +|Generate|TOK:MH2|Goblin|||GoblinToken| +|Generate|TOK:MH2|Golem|||RedWhiteGolemToken| +|Generate|TOK:MH2|Insect|||IzoniInsectToken| +|Generate|TOK:MH2|Phyrexian Germ|||PhyrexianGermToken| +|Generate|TOK:MH2|Squirrel|||SquirrelToken| +|Generate|TOK:MH2|Thopter|||ThopterColorlessToken| +# no need tokens for Eternalize ability, but scryfall have it: https://scryfall.com/card/tmh2/4/timeless-dragon +# no need tokens for Eternalize ability, but scryfall have it: https://scryfall.com/card/tmh2/5/timeless-witness +|Generate|TOK:MH2|Treasure|1||TreasureToken| +|Generate|TOK:MH2|Treasure|2||TreasureToken| +|Generate|TOK:MH2|Zombie|||ZombieToken| +|Generate|TOK:MH2|Zombie Army|||ZombieArmyToken| \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/g/GripOfPhyresis.java b/Mage.Sets/src/mage/cards/g/GripOfPhyresis.java index 06ecc741bf..f06e877cbb 100644 --- a/Mage.Sets/src/mage/cards/g/GripOfPhyresis.java +++ b/Mage.Sets/src/mage/cards/g/GripOfPhyresis.java @@ -1,7 +1,5 @@ - package mage.cards.g; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; @@ -13,13 +11,14 @@ import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.game.permanent.token.GermToken; +import mage.game.permanent.token.PhyrexianGermToken; import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; +import java.util.UUID; + /** - * * @author spjspj */ public final class GripOfPhyresis extends CardImpl { @@ -56,7 +55,7 @@ public final class GripOfPhyresis extends CardImpl { class GripOfPhyresisEffect extends CreateTokenEffect { GripOfPhyresisEffect() { - super(new GermToken()); + super(new PhyrexianGermToken()); } GripOfPhyresisEffect(final GripOfPhyresisEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/keyword/LivingWeaponAbility.java b/Mage/src/main/java/mage/abilities/keyword/LivingWeaponAbility.java index 624458a0c8..b7f0d1495b 100644 --- a/Mage/src/main/java/mage/abilities/keyword/LivingWeaponAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/LivingWeaponAbility.java @@ -2,12 +2,12 @@ package mage.abilities.keyword; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.CreateTokenAttachSourceEffect; -import mage.game.permanent.token.GermToken; +import mage.game.permanent.token.PhyrexianGermToken; public class LivingWeaponAbility extends EntersBattlefieldTriggeredAbility { public LivingWeaponAbility() { - super(new CreateTokenAttachSourceEffect(new GermToken())); + super(new CreateTokenAttachSourceEffect(new PhyrexianGermToken())); } public LivingWeaponAbility(final LivingWeaponAbility ability) { diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java index d1ed8100c4..48cb131ed5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken2.java @@ -20,7 +20,7 @@ public final class BeastToken2 extends TokenImpl { toughness = new MageInt(4); availableImageSetCodes = Arrays.asList("C13", "C14", "C15", "C19", "CMA", "CMD", "GVL", "DDD", - "E01", "ODY", "SCG", "ZEN", "C20", "ZNC", "CMR", "C21"); + "E01", "ODY", "SCG", "ZEN", "C20", "ZNC", "CMR", "C21", "MH2"); } public BeastToken2(final BeastToken2 token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java index 06e9401ca7..c1b13a9e4c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java @@ -23,7 +23,8 @@ public final class BirdToken extends TokenImpl { addAbility(FlyingAbility.getInstance()); - availableImageSetCodes.addAll(Arrays.asList("BNG", "CSP", "DGM", "JUD", "MM3", "RTR", "VMA", "ZEN", "MH1", "C20", "M21", "ZNC", "KHC")); + availableImageSetCodes = Arrays.asList("BNG", "CSP", "DGM", "JUD", "MM3", "RTR", "VMA", "ZEN", + "MH1", "C20", "M21", "ZNC", "KHC", "MH2"); } public BirdToken(final BirdToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java b/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java index c9948238f5..26618d43d2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java @@ -1,4 +1,3 @@ - package mage.game.permanent.token; import mage.abilities.Ability; @@ -11,24 +10,15 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.util.RandomUtil; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; /** * */ public final class ClueArtifactToken extends TokenImpl { - static final private List tokenImageSets = new ArrayList<>(); - - static { - tokenImageSets.addAll(Arrays.asList("SOI", "EDM")); - } - public ClueArtifactToken() { super("Clue", "colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\""); - availableImageSetCodes = tokenImageSets; cardType.add(CardType.ARTIFACT); subtype.add(SubType.CLUE); @@ -38,16 +28,20 @@ public final class ClueArtifactToken extends TokenImpl { cost.setText("Sacrifice this artifact"); ability.addCost(cost); this.addAbility(ability); + + availableImageSetCodes = Arrays.asList("C18", "SOI", "MH2"); } @Override public void setExpansionSetCodeForImage(String code) { super.setExpansionSetCodeForImage(code); + if (getOriginalExpansionSetCode().equals("SOI")) { this.setTokenType(RandomUtil.nextInt(6) + 1); // 6 different images } - if (getOriginalExpansionSetCode().equals("EDM")) { - this.setTokenType(RandomUtil.nextInt(6) + 1); // 6 different images + + if (getOriginalExpansionSetCode().equals("MH2")) { + this.setTokenType(RandomUtil.nextInt(2) + 1); // 2 different images } } diff --git a/Mage/src/main/java/mage/game/permanent/token/CrabToken.java b/Mage/src/main/java/mage/game/permanent/token/CrabToken.java index 34873e02fe..dba07185e1 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CrabToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CrabToken.java @@ -4,6 +4,8 @@ import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; +import java.util.Arrays; + /** * @author TheElk801 */ @@ -16,6 +18,8 @@ public final class CrabToken extends TokenImpl { subtype.add(SubType.CRAB); power = new MageInt(0); toughness = new MageInt(3); + + availableImageSetCodes = Arrays.asList("MH2"); } public CrabToken(final CrabToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/FoodToken.java b/Mage/src/main/java/mage/game/permanent/token/FoodToken.java index 3accc63cc7..d825ed8d1d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FoodToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FoodToken.java @@ -36,7 +36,7 @@ public final class FoodToken extends TokenImpl { ability.addCost(cost); this.addAbility(ability); - availableImageSetCodes = Arrays.asList("ELD", "C21"); + availableImageSetCodes = Arrays.asList("ELD", "C21", "MH2"); } @Override @@ -44,7 +44,11 @@ public final class FoodToken extends TokenImpl { super.setExpansionSetCodeForImage(code); if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ELD")) { - setTokenType(RandomUtil.nextInt(4) + 1); // 1...4 + setTokenType(RandomUtil.nextInt(4) + 1); // 1..4 + } + + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("MH2")) { + setTokenType(RandomUtil.nextInt(2) + 1); // 1..2 } } diff --git a/Mage/src/main/java/mage/game/permanent/token/GermToken.java b/Mage/src/main/java/mage/game/permanent/token/GermToken.java deleted file mode 100644 index c665b8fffd..0000000000 --- a/Mage/src/main/java/mage/game/permanent/token/GermToken.java +++ /dev/null @@ -1,55 +0,0 @@ -package mage.game.permanent.token; - -import mage.MageInt; -import mage.constants.CardType; -import mage.constants.SubType; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * @author spjspj - */ -public final class GermToken extends TokenImpl { - - static final private List tokenImageSets = new ArrayList<>(); - - static { - tokenImageSets.addAll(Arrays.asList("NPH", "MBS", "SOM", "EMA", "C16")); - } - - public GermToken() { - this(null, 0); - } - - public GermToken(String setCode) { - this(setCode, 0); - } - - public GermToken(String setCode, int tokenType) { - super("Phyrexian Germ", "0/0 black Phyrexian Germ creature token"); - availableImageSetCodes = tokenImageSets; - setOriginalExpansionSetCode(setCode); - cardType.add(CardType.CREATURE); - color.setBlack(true); - subtype.add(SubType.PHYREXIAN); - subtype.add(SubType.GERM); - power = new MageInt(0); - toughness = new MageInt(0); - } - - @Override - public void setExpansionSetCodeForImage(String code) { - super.setExpansionSetCodeForImage(code); - } - - public GermToken(final GermToken token) { - super(token); - } - - @Override - public GermToken copy() { - return new GermToken(this); - } -} diff --git a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java index 8ee53c5be3..f89bf0fcb6 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java @@ -5,9 +5,7 @@ import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; import mage.constants.SubType; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; /** * @author North @@ -34,7 +32,7 @@ public final class GoblinToken extends TokenImpl { availableImageSetCodes = Arrays.asList("10E", "ALA", "SOM", "M10", "NPH", "M13", "RTR", "MMA", "M15", "C14", "KTK", "EVG", "DTK", "ORI", "DDG", "DDN", "EVG", "MM2", - "MM3", "EMA", "C16", "DOM", "ANA", "RNA", "WAR", "MH1", "TSR"); + "MM3", "EMA", "C16", "DOM", "ANA", "RNA", "WAR", "MH1", "TSR", "MH2"); } public GoblinToken(final GoblinToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/IzoniInsectToken.java b/Mage/src/main/java/mage/game/permanent/token/IzoniInsectToken.java index 6b7f5a3e1b..86d4386c28 100644 --- a/Mage/src/main/java/mage/game/permanent/token/IzoniInsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/IzoniInsectToken.java @@ -1,13 +1,12 @@ - - package mage.game.permanent.token; +import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; -import mage.MageInt; + +import java.util.Arrays; /** - * * @author TheElk801 */ public final class IzoniInsectToken extends TokenImpl { @@ -20,6 +19,8 @@ public final class IzoniInsectToken extends TokenImpl { subtype.add(SubType.INSECT); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes = Arrays.asList("GRN", "MH2"); } public IzoniInsectToken(final IzoniInsectToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/KarnConstructToken.java b/Mage/src/main/java/mage/game/permanent/token/KarnConstructToken.java index 0f1189534b..ad69296451 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KarnConstructToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KarnConstructToken.java @@ -30,7 +30,7 @@ public final class KarnConstructToken extends TokenImpl { .setText("This creature gets +1/+1 for each artifact you control") )); - availableImageSetCodes = Arrays.asList("DOM", "MH1", "C21"); + availableImageSetCodes = Arrays.asList("DOM", "MH1", "C21", "MH2"); } public KarnConstructToken(final KarnConstructToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/PhyrexianGermToken.java b/Mage/src/main/java/mage/game/permanent/token/PhyrexianGermToken.java new file mode 100644 index 0000000000..c8c9b04df0 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/PhyrexianGermToken.java @@ -0,0 +1,39 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.Arrays; + +/** + * @author spjspj + */ +public final class PhyrexianGermToken extends TokenImpl { + + public PhyrexianGermToken() { + super("Phyrexian Germ", "0/0 black Phyrexian Germ creature token"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add(SubType.PHYREXIAN); + subtype.add(SubType.GERM); + power = new MageInt(0); + toughness = new MageInt(0); + + availableImageSetCodes = Arrays.asList("C14", "C15", "MBS", "MM2", "NPH", "PC2", "MH2"); + } + + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + } + + public PhyrexianGermToken(final PhyrexianGermToken token) { + super(token); + } + + @Override + public PhyrexianGermToken copy() { + return new PhyrexianGermToken(this); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/RedWhiteGolemToken.java b/Mage/src/main/java/mage/game/permanent/token/RedWhiteGolemToken.java index f57f1c7945..a215ef4abf 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RedWhiteGolemToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RedWhiteGolemToken.java @@ -4,6 +4,11 @@ import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; +import java.util.Arrays; + +/** + * @author weirddan455 + */ public class RedWhiteGolemToken extends TokenImpl { public RedWhiteGolemToken() { @@ -15,6 +20,8 @@ public class RedWhiteGolemToken extends TokenImpl { color.setWhite(true); power = new MageInt(4); toughness = new MageInt(4); + + availableImageSetCodes = Arrays.asList("MH2"); } private RedWhiteGolemToken(final RedWhiteGolemToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java b/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java index f3db928d7a..c346cd8eb9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java @@ -4,30 +4,23 @@ import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; /** * @author North */ public final class SquirrelToken extends TokenImpl { - static final private List tokenImageSets = new ArrayList<>(); - - static { - tokenImageSets.addAll(Arrays.asList("CNS", "MH1")); - } - public SquirrelToken() { super("Squirrel", "1/1 green Squirrel creature token"); - availableImageSetCodes = tokenImageSets; cardType.add(CardType.CREATURE); subtype.add(SubType.SQUIRREL); - color.setGreen(true); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes = Arrays.asList("CMD", "CNS", "ODY", "PCY", "TOR", "ULG", "UNH", "WMA", + "WTH", "MH1", "MH2"); } public SquirrelToken(final SquirrelToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java b/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java index bab94fe52e..d20d1282dc 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java @@ -23,7 +23,8 @@ public final class ThopterColorlessToken extends TokenImpl { addAbility(FlyingAbility.getInstance()); - availableImageSetCodes = Arrays.asList("C18", "EXO", "KLD", "MBS", "ORI", "VMA", "M19", "ZNC", "KHC", "C21"); + availableImageSetCodes = Arrays.asList("C18", "EXO", "KLD", "MBS", "ORI", "VMA", "M19", "ZNC", + "KHC", "C21", "MH2"); } @Override diff --git a/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java index 38bd95ccd7..846b80acb2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java @@ -1,39 +1,26 @@ - - package mage.game.permanent.token; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import mage.constants.CardType; -import mage.constants.SubType; + import mage.MageInt; import mage.ObjectColor; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.Arrays; /** - * * @author spjspj */ public final class TitaniaProtectorOfArgothElementalToken extends TokenImpl { - static final private List tokenImageSets = new ArrayList<>(); - - static { - tokenImageSets.addAll(Arrays.asList("C14", "CMA")); - } - public TitaniaProtectorOfArgothElementalToken() { - this((String)null); - } - - public TitaniaProtectorOfArgothElementalToken(String setCode) { super("Elemental", "5/3 green Elemental creature token"); - availableImageSetCodes = tokenImageSets; - this.setOriginalExpansionSetCode(setCode); this.cardType.add(CardType.CREATURE); this.color = ObjectColor.GREEN; this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(3); + + availableImageSetCodes = Arrays.asList("C14", "CMA", "MH2"); } public TitaniaProtectorOfArgothElementalToken(final TitaniaProtectorOfArgothElementalToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java b/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java index 31961b7c5e..b63d64ef8e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java @@ -10,26 +10,24 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.util.RandomUtil; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; /** * @author TheElk801 */ public final class TreasureToken extends TokenImpl { - static final private List tokenImageSets = new ArrayList<>(); - public TreasureToken() { super("Treasure", "Treasure token"); cardType.add(CardType.ARTIFACT); subtype.add(SubType.TREASURE); + + // {T}, Sacrifice this artifact: Add one mana of any color. Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); - availableImageSetCodes = Arrays.asList("XLN", "RNA", "M20", "C19", "C20", "M21", "CMR", "KHM", "STX"); + availableImageSetCodes = Arrays.asList("XLN", "RNA", "M20", "C19", "C20", "M21", "CMR", "KHM", "STX", "MH2"); } public TreasureToken(final TreasureToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java index bfa59f63eb..6cad2f2ea2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java @@ -25,7 +25,7 @@ public final class ZombieToken extends TokenImpl { "CNS", "MMA", "BNG", "KTK", "DTK", "ORI", "OGW", "SOI", "EMN", "EMA", "MM3", "AKH", "CMA", "E01", "RNA", "WAR", "MH1", "M20", "C19", "THB", "M21", - "CMR", "C21"); + "CMR", "C21", "MH2"); } @Override