mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
improve DontUntapInControllersUntapStepAllEffect
This commit is contained in:
parent
b3b2713ddf
commit
0081279d15
29 changed files with 67 additions and 141 deletions
|
|
@ -1,9 +1,7 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
|
|
@ -29,7 +27,7 @@ public final class AnZerrinRuins extends CardImpl {
|
|||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.UnboostCreature)));
|
||||
|
||||
// Creatures of the chosen type don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AnZerrinRuinsDontUntapEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new AnZerrinRuinsDontUntapEffect()));
|
||||
}
|
||||
|
||||
private AnZerrinRuins(final AnZerrinRuins card) {
|
||||
|
|
@ -44,7 +42,7 @@ public final class AnZerrinRuins extends CardImpl {
|
|||
|
||||
class AnZerrinRuinsDontUntapEffect extends DontUntapInControllersUntapStepAllEffect {
|
||||
|
||||
public AnZerrinRuinsDontUntapEffect() {
|
||||
AnZerrinRuinsDontUntapEffect() {
|
||||
super(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent());
|
||||
this.staticText = "Creatures of the chosen type don't untap during their controllers' untap steps";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class ArenaOfTheAncients extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
|
||||
// Legendary creatures don't untap during their controllers' untap steps
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, legendaryFilter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, legendaryFilter)));
|
||||
|
||||
// When Arena of the Ancients enters the battlefield, tap all Legendary creatures
|
||||
Ability tapAllLegendsAbility = new EntersBattlefieldTriggeredAbility(new TapAllEffect(legendaryFilter));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -23,7 +22,7 @@ public final class BackToBasics extends CardImpl {
|
|||
|
||||
|
||||
// Nonbasic lands don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, FilterLandPermanent.nonbasicLands())));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, FilterLandPermanent.nonbasicLands())));
|
||||
}
|
||||
|
||||
private BackToBasics(final BackToBasics card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.CastOnlyIfConditionIsTrueAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
|
|
@ -10,16 +9,13 @@ import mage.abilities.keyword.CumulativeUpkeepAbility;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
|
|
@ -47,7 +43,6 @@ public final class Blizzard extends CardImpl {
|
|||
|
||||
// Creatures with flying don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new DontUntapInControllersUntapStepAllEffect(
|
||||
Duration.WhileOnBattlefield,
|
||||
TargetController.ANY,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -10,7 +9,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -24,8 +22,7 @@ public final class BontusLastReckoning extends CardImpl {
|
|||
// Destroy all creatures. Lands you control don't untap during your next untap step.
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||
this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect(
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control"))
|
||||
.setText("Lands you control don't untap during your next untap step"));
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS));
|
||||
}
|
||||
|
||||
private BontusLastReckoning(final BontusLastReckoning card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -24,9 +23,8 @@ public final class Choke extends CardImpl {
|
|||
public Choke(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}");
|
||||
|
||||
|
||||
// Islands don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private Choke(final Choke card) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
|
@ -34,7 +33,7 @@ public final class Crackdown extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
|
||||
|
||||
// Nonwhite creatures with power 3 or greater don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private Crackdown(final Crackdown card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -30,7 +29,7 @@ public final class CurseOfMaritLage extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new TapAllEffect(filter)));
|
||||
|
||||
// Islands don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
|
|
@ -33,7 +33,7 @@ public final class DreamTides extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}");
|
||||
|
||||
// Creatures don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent("Creatures"))));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||
|
||||
// At the beginning of each player's upkeep, that player may choose any number of tapped nongreen creatures they control and pay {2} for each creature chosen this way. If the player does, untap those creatures.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DreamTidesEffect(), TargetController.ANY, false));
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -34,7 +33,7 @@ public final class FreyalisesRadiance extends CardImpl {
|
|||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl<>("{2}")));
|
||||
|
||||
// Snow permanents don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private FreyalisesRadiance(final FreyalisesRadiance card) {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ import mage.cards.Cards;
|
|||
import mage.cards.CardsImpl;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
|
@ -24,8 +22,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class HazoretsUndyingFury extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledLandPermanent("Lands you control");
|
||||
|
||||
public HazoretsUndyingFury(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{R}");
|
||||
|
||||
|
|
@ -36,9 +32,7 @@ public final class HazoretsUndyingFury extends CardImpl {
|
|||
|
||||
//Land you control don't untap during your next untap step.
|
||||
this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect(
|
||||
Duration.UntilYourNextTurn, TargetController.YOU,
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND
|
||||
).setText("Lands you control don't untap during your next untap phase"));
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS));
|
||||
}
|
||||
|
||||
private HazoretsUndyingFury(final HazoretsUndyingFury card) {
|
||||
|
|
@ -59,7 +53,7 @@ class HazoretsUndyingFuryEffect extends OneShotEffect {
|
|||
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 6));
|
||||
}
|
||||
|
||||
public HazoretsUndyingFuryEffect() {
|
||||
HazoretsUndyingFuryEffect() {
|
||||
super(Outcome.PlayForFree);
|
||||
this.staticText = "Shuffle your library, then exile the top four cards. " +
|
||||
"You may cast any number of spells with mana value " +
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class HokoriDustDrinker extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Lands don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_LANDS)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_LANDS)));
|
||||
|
||||
// At the beginning of each player's upkeep, that player untaps a land they control.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new HokoriDustDrinkerUntapEffect(), TargetController.ANY, false));
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
|
|
@ -24,7 +23,7 @@ public final class IntruderAlarm extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||
|
||||
// Creatures don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||
// Whenever a creature enters the battlefield, untap all creatures.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new UntapAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES), StaticFilters.FILTER_PERMANENT_A_CREATURE));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.j;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -10,7 +9,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
|
||||
|
|
@ -30,7 +28,7 @@ public final class JuntuStakes extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
||||
|
||||
// Creatures with power 1 or less don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private JuntuStakes(final JuntuStakes card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -10,7 +9,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -26,8 +24,7 @@ public final class KefnetsLastWord extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_CREATURE_OR_ENCHANTMENT));
|
||||
this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.Custom));
|
||||
this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect(
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control"))
|
||||
.setText("Lands you control don't untap during your next untap phase"));
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS));
|
||||
}
|
||||
|
||||
private KefnetsLastWord(final KefnetsLastWord card) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class MagneticMountain extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}");
|
||||
|
||||
// Blue creatures don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
|
||||
// At the beginning of each player's upkeep, that player may choose any number of tapped blue creatures they control and pay {4} for each creature chosen this way. If the player does, untap those creatures.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new MagneticMountainEffect(), TargetController.ANY, false));
|
||||
|
|
|
|||
|
|
@ -1,21 +1,16 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
|
|
@ -35,7 +30,7 @@ public final class MarbleTitan extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Creatures with power 3 or greater don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private MarbleTitan(final MarbleTitan card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -10,7 +9,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
|
||||
|
|
@ -30,7 +28,7 @@ public final class Meekstone extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
||||
|
||||
// Creatures with power 3 or greater don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private Meekstone(final Meekstone card) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
|
@ -30,7 +29,7 @@ public final class MistOfStagnation extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}");
|
||||
|
||||
// Permanents don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_PERMANENT)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_PERMANENTS)));
|
||||
|
||||
// At the beginning of each player's upkeep, that player chooses a permanent for each card in their graveyard, then untaps those permanents.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MistOfStagnationEffect(), TargetController.ANY, false));
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class Mudslide extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
|
||||
|
||||
// Creatures without flying don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filterCreature)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filterCreature)));
|
||||
|
||||
// At the beginning of each player's upkeep, that player may choose any number of tapped creatures without flying they control and pay {2} for each creature chosen this way. If the player does, untap those creatures.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new MudslideEffect(), TargetController.ANY, false));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.o;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -11,7 +10,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
|
@ -27,8 +26,7 @@ public final class OketrasLastMercy extends CardImpl {
|
|||
// Your life total becomes your starting life total. Lands you control don't untap during your next untap phase.
|
||||
this.getSpellAbility().addEffect(new OketrasLastMercyEffect());
|
||||
this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect(
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control"))
|
||||
.setText("Lands you control don't untap during your next untap phase"));
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS));
|
||||
}
|
||||
|
||||
private OketrasLastMercy(final OketrasLastMercy card) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.RhonassLastStandToken;
|
||||
|
||||
/**
|
||||
|
|
@ -26,8 +26,7 @@ public final class RhonassLastStand extends CardImpl {
|
|||
|
||||
// Lands you control don't untap during your next untap step.
|
||||
this.getSpellAbility().addEffect(new DontUntapInControllersUntapStepAllEffect(
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, new FilterControlledLandPermanent("Lands you control"))
|
||||
.setText("Lands you control don't untap during your next untap phase"));
|
||||
Duration.UntilYourNextTurn, TargetController.YOU, StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS));
|
||||
}
|
||||
|
||||
private RhonassLastStand(final RhonassLastStand card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -26,7 +25,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class RimescaleDragon extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with ice counters");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with ice counters on them");
|
||||
|
||||
static {
|
||||
filter.add(CounterType.ICE.getPredicate());
|
||||
|
|
@ -55,9 +54,7 @@ public final class RimescaleDragon extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Creatures with ice counters on them don't untap during their controllers' untap steps.
|
||||
effect = new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter);
|
||||
effect.setText("Creatures with ice counters on them don't untap during their controllers' untap steps");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private RimescaleDragon(final RimescaleDragon card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -29,8 +28,7 @@ public final class RisingWaters extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}");
|
||||
|
||||
// Lands don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_LANDS)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_LANDS)));
|
||||
|
||||
// At the beginning of each player's upkeep, that player untaps a land they control.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new RisingWatersUntapEffect(), TargetController.ANY, false));
|
||||
|
|
@ -48,7 +46,7 @@ public final class RisingWaters extends CardImpl {
|
|||
|
||||
class RisingWatersUntapEffect extends OneShotEffect {
|
||||
|
||||
public RisingWatersUntapEffect() {
|
||||
RisingWatersUntapEffect() {
|
||||
super(Outcome.Untap);
|
||||
this.staticText = "that player untaps a land they control";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -15,17 +14,13 @@ import mage.filter.FilterPermanent;
|
|||
*/
|
||||
public final class RootCage extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("Mercenaries");
|
||||
|
||||
static {
|
||||
filter.add(SubType.MERCENARY.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.MERCENARY, "Mercenaries");
|
||||
|
||||
public RootCage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
|
||||
|
||||
// Mercenaries don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private RootCage(final RootCage card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -16,7 +15,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
|
@ -46,7 +44,7 @@ public final class TemporalDistortion extends CardImpl {
|
|||
this.addAbility(new BecomesTappedTriggeredAbility(effect, false, filter, true));
|
||||
|
||||
// Permanents with hourglass counters on them don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter2)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter2)));
|
||||
|
||||
// At the beginning of each player's upkeep, remove all hourglass counters from permanents that player controls.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TemporalDistortionRemovalEffect(), TargetController.ANY, false));
|
||||
|
|
@ -64,7 +62,7 @@ public final class TemporalDistortion extends CardImpl {
|
|||
|
||||
class TemporalDistortionRemovalEffect extends OneShotEffect {
|
||||
|
||||
public TemporalDistortionRemovalEffect() {
|
||||
TemporalDistortionRemovalEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "remove all hourglass counters from permanents that player controls";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -43,7 +42,7 @@ public final class ThelonsCurse extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}{G}");
|
||||
|
||||
// Blue creatures don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filterCreature)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filterCreature)));
|
||||
|
||||
// At the beginning of each player's upkeep, that player may choose any number of tapped blue creatures they control and pay {U} for each creature chosen this way. If the player does, untap those creatures.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ThelonsCurseEffect(), TargetController.ANY, false));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.w;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,7 +11,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
|
|
@ -35,8 +33,7 @@ public final class WrathOfMaritLage extends CardImpl {
|
|||
// When Wrath of Marit Lage enters the battlefield, tap all red creatures.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new TapAllEffect(filter)));
|
||||
// Red creatures don't untap during their controllers' untap steps.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter)));
|
||||
}
|
||||
|
||||
private WrathOfMaritLage(final WrathOfMaritLage card) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
|
||||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -13,7 +10,6 @@ import mage.filter.FilterPermanent;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
|
|
@ -21,13 +17,25 @@ import mage.players.Player;
|
|||
|
||||
public class DontUntapInControllersUntapStepAllEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
TargetController targetController;
|
||||
FilterPermanent filter;
|
||||
private final TargetController targetController;
|
||||
private final FilterPermanent filter;
|
||||
|
||||
public DontUntapInControllersUntapStepAllEffect(Duration duration, TargetController targetController, FilterPermanent filter) {
|
||||
super(duration, Outcome.Detriment, false, false);
|
||||
this.targetController = targetController;
|
||||
this.filter = filter;
|
||||
String text = filter.getMessage() + " don't untap during ";
|
||||
switch (targetController) {
|
||||
case ANY:
|
||||
text += "their controllers'";
|
||||
break;
|
||||
case YOU:
|
||||
text += "your";
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("TargetController not supported in DontUntapInControllersNextUntapStepAllEffect");
|
||||
}
|
||||
staticText = text + (duration == Duration.UntilYourNextTurn ? " next untap step" : " untap steps");
|
||||
}
|
||||
|
||||
protected DontUntapInControllersUntapStepAllEffect(final DontUntapInControllersUntapStepAllEffect effect) {
|
||||
|
|
@ -48,50 +56,23 @@ public class DontUntapInControllersUntapStepAllEffect extends ContinuousRuleModi
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.getTurnStepType() == PhaseStep.UNTAP) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null) {
|
||||
switch (targetController) {
|
||||
case YOU:
|
||||
if (!permanent.isControlledBy(source.getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case OPPONENT:
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null && !game.isOpponent(controller, permanent.getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case ANY:
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Type of TargetController not supported!");
|
||||
}
|
||||
if (game.isActivePlayer(permanent.getControllerId()) && // controller's untap step
|
||||
filter.match(permanent, source.getControllerId(), source, game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (game.getTurnStepType() != PhaseStep.UNTAP || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (!staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(filter.getMessage()).append(" don't untap during ");
|
||||
switch (targetController) {
|
||||
case YOU:
|
||||
if (!permanent.isControlledBy(source.getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case ANY:
|
||||
sb.append("their controllers' ");
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("Type of TargetController not supported yet!");
|
||||
throw new IllegalArgumentException("TargetController not supported in DontUntapInControllersNextUntapStepAllEffect");
|
||||
}
|
||||
sb.append("untap steps");
|
||||
return sb.toString();
|
||||
return game.isActivePlayer(permanent.getControllerId()) && // controller's untap step
|
||||
filter.match(permanent, source.getControllerId(), source, game);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue