[BRO] Implement Weakstone's Subjugation

This commit is contained in:
Evan Kranzler 2022-11-04 09:55:15 -04:00
parent 03e6c15a2a
commit 17bac7fb44
4 changed files with 63 additions and 4 deletions

View file

@ -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")));

View file

@ -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);
}
}

View file

@ -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));

View file

@ -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) {