From fc04a9cb28076bbf5289d1836d31cdb58efc2313 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 25 May 2019 10:45:45 -0400 Subject: [PATCH] Implemented Scaled Up --- Mage.Sets/src/mage/cards/d/Dragonshift.java | 27 ++++------ Mage.Sets/src/mage/cards/s/ScaleUp.java | 55 +++++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons.java | 1 + 3 files changed, 65 insertions(+), 18 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/s/ScaleUp.java diff --git a/Mage.Sets/src/mage/cards/d/Dragonshift.java b/Mage.Sets/src/mage/cards/d/Dragonshift.java index e75ad79365..368a83fec5 100644 --- a/Mage.Sets/src/mage/cards/d/Dragonshift.java +++ b/Mage.Sets/src/mage/cards/d/Dragonshift.java @@ -1,8 +1,5 @@ - package mage.cards.d; -import java.util.UUID; -import mage.MageInt; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; @@ -14,37 +11,31 @@ import mage.abilities.keyword.OverloadAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.TargetController; +import mage.constants.SubType; +import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import mage.game.permanent.token.custom.CreatureToken; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class Dragonshift extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all creatures you controls"); - static { - filter.add(new ControllerPredicate(TargetController.YOU)); - } + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("each creature you control"); public Dragonshift(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{R}"); // Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying. Effect effect = new BecomesCreatureTargetEffect( new CreatureToken(4, 4, "blue and red Dragon with base power and toughness 4/4") - .withSubType(SubType.DRAGON) - .withColor("UR") - .withAbility(FlyingAbility.getInstance()), + .withSubType(SubType.DRAGON) + .withColor("UR") + .withAbility(FlyingAbility.getInstance()), true, false, Duration.EndOfTurn); effect.setText("Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying."); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/s/ScaleUp.java b/Mage.Sets/src/mage/cards/s/ScaleUp.java new file mode 100644 index 0000000000..064b7bc96f --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScaleUp.java @@ -0,0 +1,55 @@ +package mage.cards.s; + +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BecomesCreatureAllEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.abilities.keyword.OverloadAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.permanent.token.custom.CreatureToken; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ScaleUp extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("each creature you control"); + + public ScaleUp(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); + + // Until end of turn, target creature you control becomes a green Wurm with base power and toughness 6/4. + this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect( + new CreatureToken(6, 4, "green Wurm with base power and toughness 6/4") + .withColor("G").withSubType(SubType.WURM), + false, false, Duration.EndOfTurn + ).setText("Until end of turn, target creature you control " + + "becomes a green Wurm with base power and toughness 6/4.")); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + // Overload {4}{G}{G} + this.addAbility(new OverloadAbility(this, new BecomesCreatureAllEffect( + new CreatureToken(6, 4, "green Wurm with base power and toughness 6/4") + .withColor("G").withSubType(SubType.WURM), + null, filter, Duration.EndOfTurn, true + ), new ManaCostsImpl("{4}{G}{G}"))); + } + + private ScaleUp(final ScaleUp card) { + super(card); + } + + @Override + public ScaleUp copy() { + return new ScaleUp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons.java b/Mage.Sets/src/mage/sets/ModernHorizons.java index 5029019d96..04e60884e1 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons.java @@ -96,6 +96,7 @@ public final class ModernHorizons extends ExpansionSet { cards.add(new SetCardInfo("Ravenous Giant", 143, Rarity.UNCOMMON, mage.cards.r.RavenousGiant.class)); cards.add(new SetCardInfo("Regrowth", 175, Rarity.UNCOMMON, mage.cards.r.Regrowth.class)); cards.add(new SetCardInfo("Savage Swipe", 178, Rarity.COMMON, mage.cards.s.SavageSwipe.class)); + cards.add(new SetCardInfo("Scale Up", 179, Rarity.UNCOMMON, mage.cards.s.ScaleUp.class)); cards.add(new SetCardInfo("Scour All Possibilities", 67, Rarity.COMMON, mage.cards.s.ScourAllPossibilities.class)); cards.add(new SetCardInfo("Scrapyard Recombiner", 227, Rarity.RARE, mage.cards.s.ScrapyardRecombiner.class)); cards.add(new SetCardInfo("Scuttling Sliver", 68, Rarity.UNCOMMON, mage.cards.s.ScuttlingSliver.class));