diff --git a/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java b/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java index f0e46c9024..f57e564a9f 100644 --- a/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java +++ b/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java @@ -27,10 +27,11 @@ */ package mage.sets.magic2015; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; -import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CastSourceTriggeredAbility; @@ -45,16 +46,16 @@ import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetCard; -import java.util.UUID; -import mage.filter.common.FilterPermanentCard; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; + /** * @@ -76,7 +77,7 @@ public class GenesisHydra extends CardImpl { // When you cast Genesis Hydra, reveal the top X cards of your library. You may put a nonland permanent card with converted mana cost X or less from among them onto the battlefield. Then shuffle the rest into your library. this.addAbility(new CastSourceTriggeredAbility(new GenesisHydraPutOntoBattlefieldEffect(), false)); // Genesis Hydra enters the battlefield with X +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new GenesisHydraEntersBattlefieldEffect(), "with X +1/+1 counters on it")); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new GenesisHydraEntersBattlefieldEffect()))); } public GenesisHydra(final GenesisHydra card) { @@ -106,9 +107,12 @@ class GenesisHydraEntersBattlefieldEffect extends OneShotEffect { if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); if (obj != null && obj instanceof SpellAbility) { - int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); - if (amount > 0) { - permanent.addCounters(CounterType.P1P1.createInstance(amount), game); + SpellAbility spellAbility = (SpellAbility) obj; + if (spellAbility.getSourceId().equals(source.getSourceId())) { // put into play by normal cast + int amount = spellAbility.getManaCostsToPay().getX(); + if (amount > 0) { + permanent.addCounters(CounterType.P1P1.createInstance(amount), game); + } } } }