mirror of
https://github.com/correl/mage.git
synced 2024-12-01 03:00:09 +00:00
[BRO] Implement Weakstone's Subjugation
This commit is contained in:
parent
03e6c15a2a
commit
17bac7fb44
4 changed files with 63 additions and 4 deletions
|
@ -29,7 +29,8 @@ public final class Malfunction extends CardImpl {
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.or(
|
filter.add(Predicates.or(
|
||||||
CardType.ARTIFACT.getPredicate(),
|
CardType.ARTIFACT.getPredicate(),
|
||||||
CardType.CREATURE.getPredicate()));
|
CardType.CREATURE.getPredicate()
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Malfunction(UUID ownerId, CardSetInfo setInfo) {
|
public Malfunction(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
@ -44,7 +45,7 @@ public final class Malfunction extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// When Malfunction enters the battlefield, tap enchanted permanent.
|
// 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.
|
// Enchanted permanent doesn't untap during its controller's untap step.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect("permanent")));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect("permanent")));
|
||||||
|
|
54
Mage.Sets/src/mage/cards/w/WeakstonesSubjugation.java
Normal file
54
Mage.Sets/src/mage/cards/w/WeakstonesSubjugation.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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, 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("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("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 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 Frontliner", 42, Rarity.UNCOMMON, mage.cards.y.YotianFrontliner.class));
|
||||||
cards.add(new SetCardInfo("Yotian Medic", 33, Rarity.COMMON, mage.cards.y.YotianMedic.class));
|
cards.add(new SetCardInfo("Yotian Medic", 33, Rarity.COMMON, mage.cards.y.YotianMedic.class));
|
||||||
|
|
|
@ -7,14 +7,17 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX
|
* @author LevelX
|
||||||
*/
|
*/
|
||||||
public class TapEnchantedEffect extends OneShotEffect {
|
public class TapEnchantedEffect extends OneShotEffect {
|
||||||
|
|
||||||
public TapEnchantedEffect() {
|
public TapEnchantedEffect() {
|
||||||
|
this("creature");
|
||||||
|
}
|
||||||
|
|
||||||
|
public TapEnchantedEffect(String name) {
|
||||||
super(Outcome.Tap);
|
super(Outcome.Tap);
|
||||||
staticText = "tap enchanted creature";
|
staticText = "tap enchanted " + name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TapEnchantedEffect(final TapEnchantedEffect effect) {
|
public TapEnchantedEffect(final TapEnchantedEffect effect) {
|
||||||
|
|
Loading…
Reference in a new issue