From 8407e23d3f942f325651a7d7434af115ac6717c7 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Wed, 8 Jun 2022 00:42:41 +0100 Subject: [PATCH] Removed duplicate haste elemental token class --- .../src/main/resources/card-pictures-tok.txt | 2 +- .../src/mage/cards/e/ElementalMastery.java | 4 +-- .../src/mage/cards/t/TemptWithVengeance.java | 4 +-- ...lToken.java => Elemental11HasteToken.java} | 14 +++++--- .../TemptWithVengeanceElementalToken.java | 33 ------------------- 5 files changed, 14 insertions(+), 43 deletions(-) rename Mage/src/main/java/mage/game/permanent/token/{ElementalMasteryElementalToken.java => Elemental11HasteToken.java} (69%) delete mode 100644 Mage/src/main/java/mage/game/permanent/token/TemptWithVengeanceElementalToken.java diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index bcd408a945..1fdd2b67df 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -990,7 +990,7 @@ |Generate|TOK:SCG|Goblin|||GoblinToken| |Generate|TOK:SCG|Soldier|||SoldierToken| |Generate|TOK:SHM|Elemental|1||DinOfTheFireherdToken| -|Generate|TOK:SHM|Elemental|2||ElementalMasteryElementalToken| +|Generate|TOK:SHM|Elemental|2||Elemental11HasteToken| |Generate|TOK:SHM|Elf Warrior|1||ElfWarriorToken| |Generate|TOK:SHM|Elf Warrior|2||GreenWhiteElfWarriorToken| |Generate|TOK:SHM|Faerie Rogue|||OonaQueenFaerieRogueToken| diff --git a/Mage.Sets/src/mage/cards/e/ElementalMastery.java b/Mage.Sets/src/mage/cards/e/ElementalMastery.java index 9a22c6aa67..1e398e15ca 100644 --- a/Mage.Sets/src/mage/cards/e/ElementalMastery.java +++ b/Mage.Sets/src/mage/cards/e/ElementalMastery.java @@ -20,7 +20,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.game.permanent.token.ElementalMasteryElementalToken; +import mage.game.permanent.token.Elemental11HasteToken; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -78,7 +78,7 @@ class ElementalMasteryEffect extends OneShotEffect { if (creatureAttached != null) { int power = creatureAttached.getPower().getValue(); if (power > 0) { - CreateTokenEffect effect = new CreateTokenEffect(new ElementalMasteryElementalToken(), power); + CreateTokenEffect effect = new CreateTokenEffect(new Elemental11HasteToken(), power); effect.apply(game, source); effect.exileTokensCreatedAtNextEndStep(game, source); return true; diff --git a/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java b/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java index 3dfc7c4d51..9055f6d66b 100644 --- a/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java +++ b/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java @@ -9,7 +9,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.game.Game; -import mage.game.permanent.token.TemptWithVengeanceElementalToken; +import mage.game.permanent.token.Elemental11HasteToken; import mage.game.permanent.token.Token; import mage.players.Player; @@ -58,7 +58,7 @@ class TemptWithVengeanceEffect extends OneShotEffect { int xValue = source.getManaCostsToPay().getX(); if (controller != null && xValue > 0) { - Token tokenCopy = new TemptWithVengeanceElementalToken(); + Token tokenCopy = new Elemental11HasteToken(); tokenCopy.putOntoBattlefield(xValue, game, source, source.getControllerId(), false, false); int opponentsAddedTokens = 0; diff --git a/Mage/src/main/java/mage/game/permanent/token/ElementalMasteryElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/Elemental11HasteToken.java similarity index 69% rename from Mage/src/main/java/mage/game/permanent/token/ElementalMasteryElementalToken.java rename to Mage/src/main/java/mage/game/permanent/token/Elemental11HasteToken.java index 67a186493d..a4417a7162 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElementalMasteryElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/Elemental11HasteToken.java @@ -6,13 +6,15 @@ import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; import mage.constants.SubType; +import java.util.Arrays; + /** * * @author spjspj */ -public final class ElementalMasteryElementalToken extends TokenImpl { +public final class Elemental11HasteToken extends TokenImpl { - public ElementalMasteryElementalToken() { + public Elemental11HasteToken() { super("Elemental Token", "1/1 red Elemental creature token with haste"); cardType.add(CardType.CREATURE); subtype.add(SubType.ELEMENTAL); @@ -20,6 +22,8 @@ public final class ElementalMasteryElementalToken extends TokenImpl { power = new MageInt(1); toughness = new MageInt(1); addAbility(HasteAbility.getInstance()); + + availableImageSetCodes = Arrays.asList("SHM"); } @Override @@ -31,11 +35,11 @@ public final class ElementalMasteryElementalToken extends TokenImpl { } } - public ElementalMasteryElementalToken(final ElementalMasteryElementalToken token) { + public Elemental11HasteToken(final Elemental11HasteToken token) { super(token); } - public ElementalMasteryElementalToken copy() { - return new ElementalMasteryElementalToken(this); + public Elemental11HasteToken copy() { + return new Elemental11HasteToken(this); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/TemptWithVengeanceElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/TemptWithVengeanceElementalToken.java deleted file mode 100644 index a039d095e7..0000000000 --- a/Mage/src/main/java/mage/game/permanent/token/TemptWithVengeanceElementalToken.java +++ /dev/null @@ -1,33 +0,0 @@ - -package mage.game.permanent.token; - -import mage.constants.CardType; -import mage.constants.SubType; -import mage.MageInt; -import mage.abilities.keyword.HasteAbility; - -/** - * - * @author spjspj - */ -public final class TemptWithVengeanceElementalToken extends TokenImpl { - - public TemptWithVengeanceElementalToken() { - super("Elemental Token", "1/1 red Elemental creature tokens with haste"); - cardType.add(CardType.CREATURE); - subtype.add(SubType.ELEMENTAL); - - color.setRed(true); - power = new MageInt(1); - toughness = new MageInt(1); - this.addAbility(HasteAbility.getInstance()); - } - - public TemptWithVengeanceElementalToken(final TemptWithVengeanceElementalToken token) { - super(token); - } - - public TemptWithVengeanceElementalToken copy() { - return new TemptWithVengeanceElementalToken(this); - } -}