From cb6e6b234f7b1d19b183a38a11e5a487bde12a7b Mon Sep 17 00:00:00 2001 From: PurpleCrowbar Date: Sun, 5 Jun 2022 13:40:55 +0100 Subject: [PATCH] Removed duplicate enchantment bird token class --- .../src/main/resources/card-pictures-tok.txt | 4 +- .../src/mage/cards/a/AerieWorshippers.java | 4 +- Mage.Sets/src/mage/cards/r/RiseOfEagles.java | 4 +- .../token/AerieWorshippersBirdToken.java | 38 -------------- .../mage/game/permanent/token/BirdToken.java | 3 ++ .../permanent/token/EnchantmentBirdToken.java | 49 +++++++++++++++++++ .../token/RiseOfEaglesBirdToken.java | 36 -------------- 7 files changed, 58 insertions(+), 80 deletions(-) delete mode 100644 Mage/src/main/java/mage/game/permanent/token/AerieWorshippersBirdToken.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/EnchantmentBirdToken.java delete mode 100644 Mage/src/main/java/mage/game/permanent/token/RiseOfEaglesBirdToken.java diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 7f9ab642d3..b554273d90 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -278,8 +278,8 @@ |Generate|TOK:BFZ|Kor Ally|||KorAllyToken| |Generate|TOK:BFZ|Octopus|||OctopusToken| |Generate|TOK:BFZ|Plant|||GrovetenderDruidsPlantToken| -|Generate|TOK:BNG|Bird|1||BirdToken| -|Generate|TOK:BNG|Bird|2||AerieWorshippersBirdToken| +|Generate|TOK:BNG|Bird|1||EnchantmentBirdToken| +|Generate|TOK:BNG|Bird|2||BirdToken| |Generate|TOK:BNG|Cat Soldier|||CatSoldierCreatureToken| |Generate|TOK:BNG|Centaur|||CentaurEnchantmentCreatureToken| |Generate|TOK:BNG|Elemental|||SatyrNyxSmithElementalToken| diff --git a/Mage.Sets/src/mage/cards/a/AerieWorshippers.java b/Mage.Sets/src/mage/cards/a/AerieWorshippers.java index 963f329eb0..4f9dc84375 100644 --- a/Mage.Sets/src/mage/cards/a/AerieWorshippers.java +++ b/Mage.Sets/src/mage/cards/a/AerieWorshippers.java @@ -11,7 +11,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.game.permanent.token.AerieWorshippersBirdToken; +import mage.game.permanent.token.EnchantmentBirdToken; /** * @@ -28,7 +28,7 @@ public final class AerieWorshippers extends CardImpl { this.toughness = new MageInt(4); // Inspired — Whenever Aerie Worshipers becomes untapped, you may pay {2}{U}. If you do, create a 2/2 blue Bird enchantment creature token with flying. - this.addAbility(new InspiredAbility(new DoIfCostPaid(new CreateTokenEffect(new AerieWorshippersBirdToken()), new ManaCostsImpl<>("{2}{U}")))); + this.addAbility(new InspiredAbility(new DoIfCostPaid(new CreateTokenEffect(new EnchantmentBirdToken()), new ManaCostsImpl<>("{2}{U}")))); } private AerieWorshippers(final AerieWorshippers card) { diff --git a/Mage.Sets/src/mage/cards/r/RiseOfEagles.java b/Mage.Sets/src/mage/cards/r/RiseOfEagles.java index 116bdd79d4..c9ff48273f 100644 --- a/Mage.Sets/src/mage/cards/r/RiseOfEagles.java +++ b/Mage.Sets/src/mage/cards/r/RiseOfEagles.java @@ -7,7 +7,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.game.permanent.token.RiseOfEaglesBirdToken; +import mage.game.permanent.token.EnchantmentBirdToken; /** * @@ -19,7 +19,7 @@ public final class RiseOfEagles extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}"); // Create two 2/2 blue Bird enchantment creature tokens with flying. Scry 1. - this.getSpellAbility().addEffect(new CreateTokenEffect(new RiseOfEaglesBirdToken(), 2)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new EnchantmentBirdToken(), 2)); this.getSpellAbility().addEffect(new ScryEffect(1)); } diff --git a/Mage/src/main/java/mage/game/permanent/token/AerieWorshippersBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/AerieWorshippersBirdToken.java deleted file mode 100644 index 37e55da771..0000000000 --- a/Mage/src/main/java/mage/game/permanent/token/AerieWorshippersBirdToken.java +++ /dev/null @@ -1,38 +0,0 @@ - - - -package mage.game.permanent.token; - -import mage.constants.CardType; -import mage.constants.SubType; -import mage.MageInt; -import mage.abilities.keyword.FlyingAbility; - -/** - * - * @author spjspj - */ -public final class AerieWorshippersBirdToken extends TokenImpl { - - public AerieWorshippersBirdToken() { - super("Bird Token", "2/2 blue Bird enchantment creature token with flying"); - cardType.add(CardType.ENCHANTMENT); - cardType.add(CardType.CREATURE); - color.setBlue(true); - subtype.add(SubType.BIRD); - power = new MageInt(2); - toughness = new MageInt(2); - this.addAbility(FlyingAbility.getInstance()); - this.setOriginalExpansionSetCode("BNG"); - this.setTokenType(2); - } - - public AerieWorshippersBirdToken(final AerieWorshippersBirdToken token) { - super(token); - } - - public AerieWorshippersBirdToken copy() { - return new AerieWorshippersBirdToken(this); - } -} - 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 687910841e..6b1583d68e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java @@ -43,5 +43,8 @@ public final class BirdToken extends TokenImpl { if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("C16")) { setTokenType(2); } + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("BNG")) { + setTokenType(2); + } } } diff --git a/Mage/src/main/java/mage/game/permanent/token/EnchantmentBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/EnchantmentBirdToken.java new file mode 100644 index 0000000000..7b8f6acb47 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/EnchantmentBirdToken.java @@ -0,0 +1,49 @@ + + + +package mage.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; + +import java.util.Arrays; + +/** + * + * @author spjspj + */ +public final class EnchantmentBirdToken extends TokenImpl { + + public EnchantmentBirdToken() { + super("Bird Token", "2/2 blue Bird enchantment creature token with flying"); + cardType.add(CardType.ENCHANTMENT); + cardType.add(CardType.CREATURE); + color.setBlue(true); + subtype.add(SubType.BIRD); + power = new MageInt(2); + toughness = new MageInt(2); + this.addAbility(FlyingAbility.getInstance()); + + availableImageSetCodes = Arrays.asList("BNG"); + } + + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("BNG")) { + setTokenType(1); + } + } + + public EnchantmentBirdToken(final EnchantmentBirdToken token) { + super(token); + } + + public EnchantmentBirdToken copy() { + return new EnchantmentBirdToken(this); + } +} + diff --git a/Mage/src/main/java/mage/game/permanent/token/RiseOfEaglesBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/RiseOfEaglesBirdToken.java deleted file mode 100644 index b23fe2769a..0000000000 --- a/Mage/src/main/java/mage/game/permanent/token/RiseOfEaglesBirdToken.java +++ /dev/null @@ -1,36 +0,0 @@ - - -package mage.game.permanent.token; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.keyword.FlyingAbility; - -/** - * - * @author spjspj - */ -public final class RiseOfEaglesBirdToken extends TokenImpl { - - public RiseOfEaglesBirdToken() { - super("Bird Token", "2/2 blue Bird enchantment creature tokens with flying"); - this.setOriginalExpansionSetCode("BNG"); - this.setTokenType(2); - cardType.add(CardType.ENCHANTMENT); - cardType.add(CardType.CREATURE); - color.setColor(ObjectColor.BLUE); - subtype.add(SubType.BIRD); - power = new MageInt(2); - toughness = new MageInt(2); - addAbility(FlyingAbility.getInstance()); - } - - public RiseOfEaglesBirdToken(final RiseOfEaglesBirdToken token) { - super(token); - } - - public RiseOfEaglesBirdToken copy() { - return new RiseOfEaglesBirdToken(this); - } -}