diff --git a/Mage.Sets/src/mage/cards/m/Malfunction.java b/Mage.Sets/src/mage/cards/m/Malfunction.java index 9315237a59..9f1ac133bf 100644 --- a/Mage.Sets/src/mage/cards/m/Malfunction.java +++ b/Mage.Sets/src/mage/cards/m/Malfunction.java @@ -29,7 +29,8 @@ public final class Malfunction extends CardImpl { static { filter.add(Predicates.or( CardType.ARTIFACT.getPredicate(), - CardType.CREATURE.getPredicate())); + CardType.CREATURE.getPredicate() + )); } public Malfunction(UUID ownerId, CardSetInfo setInfo) { @@ -44,7 +45,7 @@ public final class Malfunction extends CardImpl { this.addAbility(ability); // When Malfunction enters the battlefield, tap enchanted permanent. - this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect().setText("tap enchanted permanent"))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect("permanent"))); // Enchanted permanent doesn't untap during its controller's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect("permanent"))); diff --git a/Mage.Sets/src/mage/cards/w/WeakstonesSubjugation.java b/Mage.Sets/src/mage/cards/w/WeakstonesSubjugation.java new file mode 100644 index 0000000000..facce2e991 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WeakstonesSubjugation.java @@ -0,0 +1,54 @@ +package mage.cards.w; + +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; +import mage.abilities.effects.common.TapEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WeakstonesSubjugation extends CardImpl { + + public WeakstonesSubjugation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant artifact or creature + TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // When Weakstone's Subjugation's enters the battlefield, you may pay {3}. If you do, tap enchanted permanent. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid( + new TapEnchantedEffect("creature"), new GenericManaCost(3) + ))); + + // Enchanted permanent doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepEnchantedEffect())); + } + + private WeakstonesSubjugation(final WeakstonesSubjugation card) { + super(card); + } + + @Override + public WeakstonesSubjugation copy() { + return new WeakstonesSubjugation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index 52634feb15..3f08ca12a6 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -189,6 +189,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Urza, Powerstone Prodigy", 69, Rarity.UNCOMMON, mage.cards.u.UrzaPowerstoneProdigy.class)); cards.add(new SetCardInfo("Urza, Prince of Kroog", 226, Rarity.RARE, mage.cards.u.UrzaPrinceOfKroog.class)); cards.add(new SetCardInfo("Veteran's Powerblade", 41, Rarity.COMMON, mage.cards.v.VeteransPowerblade.class)); + cards.add(new SetCardInfo("Weakstone's Subjugation", 72, Rarity.COMMON, mage.cards.w.WeakstonesSubjugation.class)); cards.add(new SetCardInfo("Yotian Dissident", 227, Rarity.UNCOMMON, mage.cards.y.YotianDissident.class)); cards.add(new SetCardInfo("Yotian Frontliner", 42, Rarity.UNCOMMON, mage.cards.y.YotianFrontliner.class)); cards.add(new SetCardInfo("Yotian Medic", 33, Rarity.COMMON, mage.cards.y.YotianMedic.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/TapEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapEnchantedEffect.java index 124fa6c7a0..f5562dce64 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/TapEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/TapEnchantedEffect.java @@ -7,14 +7,17 @@ import mage.game.Game; import mage.game.permanent.Permanent; /** - * * @author LevelX */ public class TapEnchantedEffect extends OneShotEffect { public TapEnchantedEffect() { + this("creature"); + } + + public TapEnchantedEffect(String name) { super(Outcome.Tap); - staticText = "tap enchanted creature"; + staticText = "tap enchanted " + name; } public TapEnchantedEffect(final TapEnchantedEffect effect) {