diff --git a/Mage.Sets/src/mage/cards/t/TarmogoyfNest.java b/Mage.Sets/src/mage/cards/t/TarmogoyfNest.java index 02fe82883dd..66cc1535bcb 100644 --- a/Mage.Sets/src/mage/cards/t/TarmogoyfNest.java +++ b/Mage.Sets/src/mage/cards/t/TarmogoyfNest.java @@ -5,7 +5,6 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; @@ -37,11 +36,13 @@ public final class TarmogoyfNest extends CardImpl { this.addAbility(new EnchantAbility(auraTarget)); // Enchanted land has "{1}{G}, {T}: Create a Tarmogoyf token." - Ability gainedAbility = new SimpleActivatedAbility(new CreateTokenEffect(new TarmogoyfToken()), - new TapSourceCost()); - gainedAbility.addCost(new ManaCostsImpl<>("{1}{G}")); - Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, null, "land"); - this.addAbility(new SimpleStaticAbility(effect)); + Ability gainedAbility = new SimpleActivatedAbility( + new CreateTokenEffect(new TarmogoyfToken()), new ManaCostsImpl<>("{1}{G}") + ); + gainedAbility.addCost(new TapSourceCost()); + this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect( + gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, null, "land" + ))); } diff --git a/Mage/src/main/java/mage/game/permanent/token/TarmogoyfToken.java b/Mage/src/main/java/mage/game/permanent/token/TarmogoyfToken.java index 2153750f593..c9107b97f5d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TarmogoyfToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TarmogoyfToken.java @@ -3,7 +3,6 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount; import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect; import mage.constants.CardType; @@ -15,10 +14,8 @@ import mage.constants.Zone; */ public final class TarmogoyfToken extends TokenImpl { - private static final DynamicValue powerValue = CardTypesInGraveyardCount.ALL; - public TarmogoyfToken() { - super("Tarmogoyf Token", "Tarmogoyf token"); + super("Tarmogoyf", "Tarmogoyf token"); manaCost = new ManaCostsImpl<>("{1}{G}"); cardType.add(CardType.CREATURE); color.setGreen(true); @@ -27,7 +24,7 @@ public final class TarmogoyfToken extends TokenImpl { toughness = new MageInt(1); // Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(powerValue))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(CardTypesInGraveyardCount.ALL))); } private TarmogoyfToken(final TarmogoyfToken token) {