diff --git a/Mage.Sets/src/mage/cards/n/NaturalEmergence.java b/Mage.Sets/src/mage/cards/n/NaturalEmergence.java index 73dde461bf..c847a1f625 100644 --- a/Mage.Sets/src/mage/cards/n/NaturalEmergence.java +++ b/Mage.Sets/src/mage/cards/n/NaturalEmergence.java @@ -1,11 +1,8 @@ - package mage.cards.n; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect; import mage.abilities.effects.common.continuous.BecomesCreatureAllEffect; import mage.abilities.keyword.FirstStrikeAbility; @@ -13,21 +10,21 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.filter.common.FilterControlledEnchantmentPermanent; -import mage.filter.common.FilterControlledLandPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.permanent.token.custom.CreatureToken; +import java.util.UUID; + /** - * * @author LoneFox - * */ public final class NaturalEmergence extends CardImpl { - static final private FilterControlledEnchantmentPermanent filter = new FilterControlledEnchantmentPermanent("red or green creature you control"); + static final private FilterControlledEnchantmentPermanent filter + = new FilterControlledEnchantmentPermanent("red or green enchantment you control"); static { filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN))); @@ -37,17 +34,18 @@ public final class NaturalEmergence extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{G}"); // When Natural Emergence enters the battlefield, return a red or green enchantment you control to its owner's hand. - Effect effect = new ReturnToHandChosenControlledPermanentEffect(filter); - effect.setText("return a red or green enchantment you control to its owner's hand"); - this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false)); // Lands you control are 2/2 creatures with first strike. They're still lands. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAllEffect( - new CreatureToken(2, 2, "2/2 creatures with first strike").withAbility(FirstStrikeAbility.getInstance()), - "lands", new FilterControlledLandPermanent("lands you control"), Duration.WhileOnBattlefield, false))); + this.addAbility(new SimpleStaticAbility(new BecomesCreatureAllEffect( + new CreatureToken( + 2, 2, "2/2 creatures with first strike" + ).withAbility(FirstStrikeAbility.getInstance()), "lands", + StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS, Duration.WhileOnBattlefield, false + ))); } - public NaturalEmergence(final NaturalEmergence card) { + private NaturalEmergence(final NaturalEmergence card) { super(card); } @@ -55,4 +53,4 @@ public final class NaturalEmergence extends CardImpl { public NaturalEmergence copy() { return new NaturalEmergence(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/s/ShivanWurm.java b/Mage.Sets/src/mage/cards/s/ShivanWurm.java index c83628aaf9..2bd963569f 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanWurm.java +++ b/Mage.Sets/src/mage/cards/s/ShivanWurm.java @@ -1,36 +1,38 @@ - package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class ShivanWurm extends CardImpl { - static final private FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("red or green creature you control"); + static final private FilterControlledPermanent filter + = new FilterControlledCreaturePermanent("red or green creature you control"); static { - filter.add(Predicates.or(new ColorPredicate(ObjectColor.RED), new ColorPredicate(ObjectColor.GREEN))); + filter.add(Predicates.or( + new ColorPredicate(ObjectColor.RED), + new ColorPredicate(ObjectColor.GREEN) + )); } public ShivanWurm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}"); this.subtype.add(SubType.WURM); this.power = new MageInt(7); @@ -38,13 +40,14 @@ public final class ShivanWurm extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); + // When Shivan Wurm enters the battlefield, return a red or green creature you control to its owner's hand. - Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); - ability.addTarget(new TargetControlledCreaturePermanent(filter)); - this.addAbility(ability); + this.addAbility(new EntersBattlefieldTriggeredAbility( + new ReturnToHandChosenControlledPermanentEffect(filter), false + )); } - public ShivanWurm(final ShivanWurm card) { + private ShivanWurm(final ShivanWurm card) { super(card); }