mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
New StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL (#10577)
This commit is contained in:
parent
e50f8b05c1
commit
063429b70a
40 changed files with 89 additions and 397 deletions
|
|
@ -10,8 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -19,12 +18,6 @@ import mage.filter.predicate.mageobject.AnotherPredicate;
|
|||
*/
|
||||
public final class AmbushKrotiq extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public AmbushKrotiq(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}");
|
||||
this.subtype.add(SubType.INSECT);
|
||||
|
|
@ -34,7 +27,7 @@ public final class AmbushKrotiq extends CardImpl {
|
|||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// When Ambush Krotiq enters the battlefield, return another creature you control to its owner's hand.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -28,12 +25,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BenevolentHydra extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public BenevolentHydra(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{G}{G}");
|
||||
|
||||
|
|
@ -47,7 +38,7 @@ public final class BenevolentHydra extends CardImpl {
|
|||
));
|
||||
|
||||
// If one or more +1/+1 counters would be put on another creature you control, that many plus one +1/+1 counters are put on it instead.
|
||||
this.addAbility(new SimpleStaticAbility(new ModifyCountersAddedEffect(filter, CounterType.P1P1)));
|
||||
this.addAbility(new SimpleStaticAbility(new ModifyCountersAddedEffect(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, CounterType.P1P1)));
|
||||
|
||||
// {T}, Remove a +1/+1 counter from Benevolent Hydra: Put a +1/+1 counter on another target creature you control.
|
||||
Ability ability = new SimpleActivatedAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()).setText("Put a +1/+1 counter on another target creature you control"), new TapSourceCost());
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -24,13 +22,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BiblioplexKraken extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public BiblioplexKraken(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||
|
||||
|
|
@ -44,7 +35,7 @@ public final class BiblioplexKraken extends CardImpl {
|
|||
// Whenever Biblioplex Kraken attacks, you may return another creature you control to its owner's hand. If you do, Biblioplex Kraken can't be blocked this turn.
|
||||
this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid(
|
||||
new CantBeBlockedSourceEffect(Duration.EndOfTurn),
|
||||
new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))
|
||||
new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL))
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,9 +11,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.EldraziScionToken;
|
||||
|
||||
/**
|
||||
|
|
@ -23,12 +20,6 @@ import mage.game.permanent.token.EldraziScionToken;
|
|||
*/
|
||||
public final class CatacombSifter extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public CatacombSifter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}");
|
||||
this.subtype.add(SubType.ELDRAZI);
|
||||
|
|
@ -43,7 +34,7 @@ public final class CatacombSifter extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new EldraziScionToken())));
|
||||
|
||||
// Whenever another creature you control dies, scry 1
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new ScryEffect(1), false, filter));
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new ScryEffect(1), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
}
|
||||
|
||||
private CatacombSifter(final CatacombSifter card) {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -22,11 +21,9 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class EloiseNephaliaSleuth extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
private static final FilterPermanent filter2 = new FilterPermanent("a token");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter2.add(TokenPredicate.TRUE);
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +37,7 @@ public final class EloiseNephaliaSleuth extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever another creature you control dies, investigate.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new InvestigateEffect(1), false, filter));
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new InvestigateEffect(1), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
|
||||
// Whenever you sacrifice a token, surveil 1.
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new SurveilEffect(1), filter2));
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class EnduringIdealEffect extends OneShotEffect {
|
|||
boolean applied = false;
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_CARD_ENTCHANTMENT);
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_CARD_ENCHANTMENT);
|
||||
controller.searchLibrary(target, source, game);
|
||||
Card targetCard = game.getCard(target.getFirstTarget());
|
||||
if (targetCard == null) {
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
|
@ -33,13 +30,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class ErebosBleakHearted extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public ErebosBleakHearted(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
|
|
@ -58,7 +48,7 @@ public final class ErebosBleakHearted extends CardImpl {
|
|||
// Whenever another creature you control dies, you may pay 2 life. If you do, draw a card.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new DoIfCostPaid(
|
||||
new DrawCardSourceControllerEffect(1), new PayLifeCost(2)
|
||||
), false, filter, true));
|
||||
), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true));
|
||||
|
||||
// {1}{B}, Sacrifice another creature: Target creature gets -2/-1 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -62,12 +60,6 @@ public class EvolvingAdaptive extends CardImpl {
|
|||
|
||||
class EvolvingAdaptiveTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public EvolvingAdaptiveTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.OIL.createInstance()));
|
||||
this.setTriggerPhrase("Whenever another creature enters the battlefield under your " +
|
||||
|
|
@ -91,7 +83,7 @@ class EvolvingAdaptiveTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enteringCreature = game.getPermanent(event.getTargetId());
|
||||
if (enteringCreature == null || !filter.match(enteringCreature, getControllerId(), this, game)) {
|
||||
if (enteringCreature == null || !StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL.match(enteringCreature, getControllerId(), this, game)) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = getSourcePermanentIfItStillExists(game);
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -52,16 +51,9 @@ public final class FaerieImpostor extends CardImpl {
|
|||
|
||||
class FaerieImpostorEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
private static final String effectText = "sacrifice it unless you return another creature you control to its owner's hand";
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
FaerieImpostorEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
staticText = effectText;
|
||||
staticText = "sacrifice it unless you return another creature you control to its owner's hand";
|
||||
}
|
||||
|
||||
private FaerieImpostorEffect(FaerieImpostorEffect effect) {
|
||||
|
|
@ -74,7 +66,7 @@ class FaerieImpostorEffect extends OneShotEffect {
|
|||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent(1, 1, filter, true);
|
||||
TargetPermanent target = new TargetPermanent(1, 1, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true);
|
||||
if (target.canChoose(controller.getId(), source, game)
|
||||
&& controller.chooseUse(outcome, "Return another creature you control to its owner's hand?", source, game)) {
|
||||
controller.chooseTarget(Outcome.ReturnToHand, target, source, game);
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -19,13 +17,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class FlamingFistOfficer extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public FlamingFistOfficer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
|
|
@ -36,7 +27,7 @@ public final class FlamingFistOfficer extends CardImpl {
|
|||
|
||||
// Whenever another creature you control leaves the battlefield, put a +1/+1 counter on Flaming Fist Officer.
|
||||
this.addAbility(new LeavesBattlefieldAllTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
|
@ -26,12 +25,6 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public final class GarnaBloodfistOfKeld extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public GarnaBloodfistOfKeld(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}{R}");
|
||||
|
||||
|
|
@ -50,7 +43,7 @@ public final class GarnaBloodfistOfKeld extends CardImpl {
|
|||
"draw a card if it was attacking. Otherwise, {this} deals 1 damage to each opponent"
|
||||
),
|
||||
false,
|
||||
filter
|
||||
StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -9,23 +8,14 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||
*/
|
||||
public final class GavonyUnhallowed extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public GavonyUnhallowed(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
|
||||
|
|
@ -34,7 +24,7 @@ public final class GavonyUnhallowed extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever another creature you control dies, put a +1/+1 counter on Gavony Unhallowed.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter));
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
}
|
||||
|
||||
private GavonyUnhallowed(final GavonyUnhallowed card) {
|
||||
|
|
|
|||
|
|
@ -20,10 +20,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.watchers.common.AbilityResolvedWatcher;
|
||||
|
|
@ -36,12 +33,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GimliMournfulAvenger extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Creatures that died under your control this turn", GimliMournfulAvengerValue.instance
|
||||
);
|
||||
|
|
@ -64,7 +55,7 @@ public final class GimliMournfulAvenger extends CardImpl {
|
|||
|
||||
// Whenever another creature you control dies, put a +1/+1 counter on Gimli. When this ability resolves for the third time this turn, Gimli fights up to one target creature you don't control.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL
|
||||
);
|
||||
ability.addEffect(new GimliMournfulAvengerEffect());
|
||||
this.addAbility(ability, new AbilityResolvedWatcher());
|
||||
|
|
|
|||
|
|
@ -15,10 +15,8 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterObject;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
|
@ -30,13 +28,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GiverOfRunes extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public GiverOfRunes(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
||||
|
||||
|
|
@ -47,7 +38,7 @@ public final class GiverOfRunes extends CardImpl {
|
|||
|
||||
// {T}: Another target creature you control gains protection from colorless or from the color of your choice until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(new GiverOfRunesEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -17,12 +16,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GloryBearers extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public GloryBearers(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}");
|
||||
|
||||
|
|
@ -35,7 +28,7 @@ public final class GloryBearers extends CardImpl {
|
|||
this.addAbility(new AttacksCreatureYouControlTriggeredAbility(
|
||||
new BoostTargetEffect(0, 1)
|
||||
.setText("it gets +0/+1 until end of turn"),
|
||||
false, filter, true
|
||||
false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class GoblinTutorEffect extends OneShotEffect {
|
|||
if (amount == 2) {
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, filter), true);
|
||||
} else if (amount == 3) {
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_ENTCHANTMENT), true);
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_ENCHANTMENT), true);
|
||||
} else if (amount == 4) {
|
||||
effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_ARTIFACT), true);
|
||||
} else if (amount == 5) {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -20,13 +18,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GuardianKirin extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public GuardianKirin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
|
||||
|
|
@ -39,7 +30,7 @@ public final class GuardianKirin extends CardImpl {
|
|||
|
||||
// Whenever another creature you control dies, put a +1/+1 counter on Guardian Kirin.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -10,8 +9,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
|
@ -46,12 +44,6 @@ public final class HavengulSkaab extends CardImpl {
|
|||
|
||||
class HavengulSkaabAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public HavengulSkaabAbility() {
|
||||
super(Zone.BATTLEFIELD, new ReturnToHandTargetEffect());
|
||||
}
|
||||
|
|
@ -68,7 +60,7 @@ class HavengulSkaabAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getSourceId().equals(this.getSourceId())) {
|
||||
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1, 1, filter, false);
|
||||
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true);
|
||||
this.addTarget(target);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
|
@ -28,14 +26,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class Hexavus extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("another target creature");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter2.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public Hexavus(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
|
||||
this.subtype.add(SubType.CONSTRUCT);
|
||||
|
|
@ -55,14 +45,14 @@ public final class Hexavus extends CardImpl {
|
|||
new AddCountersTargetEffect(CounterType.FLYING.createInstance()), new GenericManaCost(1)
|
||||
);
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance()));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter2));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {1}, Remove a counter from another creature you control: Put a +1/+1 counter on Hexavus.
|
||||
Ability ability2 = new SimpleActivatedAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(1)
|
||||
);
|
||||
ability2.addCost(new RemoveCounterCost(new TargetPermanent(1, 1, filter, true)));
|
||||
ability2.addCost(new RemoveCounterCost(new TargetPermanent(1, 1, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true)));
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -13,10 +12,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -24,13 +21,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class ImperialAerosaur extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public ImperialAerosaur(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
|
||||
|
|
@ -48,7 +38,7 @@ public final class ImperialAerosaur extends CardImpl {
|
|||
effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("and gains flying until end of turn");
|
||||
ability.addEffect(effect);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -20,13 +18,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class LoyalGryff extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public LoyalGryff(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
|
|
@ -42,7 +33,7 @@ public final class LoyalGryff extends CardImpl {
|
|||
|
||||
// When Loyal Gryff enters the battlefield, you may return another creature you control to its owner's hand.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new ReturnToHandChosenControlledPermanentEffect(filter), true
|
||||
new ReturnToHandChosenControlledPermanentEffect(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL), true
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -21,13 +19,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class LuminousPhantom extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public LuminousPhantom(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||
|
||||
|
|
@ -42,7 +33,7 @@ public final class LuminousPhantom extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever another creature you control leaves the battlefield, you gain 1 life.
|
||||
this.addAbility(new LeavesBattlefieldAllTriggeredAbility(new GainLifeEffect(1), filter));
|
||||
this.addAbility(new LeavesBattlefieldAllTriggeredAbility(new GainLifeEffect(1), StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
|
||||
// If Luminous Phantom would be put into a graveyard from anywhere, exile it instead.
|
||||
this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead")));
|
||||
|
|
|
|||
|
|
@ -12,10 +12,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -24,13 +22,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class MausoleumHarpy extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public MausoleumHarpy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
||||
|
||||
|
|
@ -46,7 +37,7 @@ public final class MausoleumHarpy extends CardImpl {
|
|||
|
||||
// Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on Mausoleum Harpy.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter),
|
||||
new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL),
|
||||
CitysBlessingCondition.instance,
|
||||
"Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on {this}. ")
|
||||
.addHint(CitysBlessingHint.instance));
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
|
@ -25,14 +23,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class MerenOfClanNelToth extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public MerenOfClanNelToth(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{G}");
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
|
@ -44,7 +34,7 @@ public final class MerenOfClanNelToth extends CardImpl {
|
|||
// Whenever another creature you control dies, you get an experience counter.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersPlayersEffect(
|
||||
CounterType.EXPERIENCE.createInstance(), TargetController.YOU
|
||||
), false, filter));
|
||||
), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
|
||||
// At the beginning of your end step, choose target creature card in your graveyard.
|
||||
// If that card's converted mana cost is less than or equal to the number of experience counters you have, return it to the battlefield. Otherwise, put it into your hand.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -12,9 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -22,12 +19,6 @@ import mage.filter.predicate.mageobject.AnotherPredicate;
|
|||
*/
|
||||
public final class NebulonBFrigate extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public NebulonBFrigate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}{W}");
|
||||
this.subtype.add(SubType.STARSHIP);
|
||||
|
|
@ -38,7 +29,7 @@ public final class NebulonBFrigate extends CardImpl {
|
|||
this.addAbility(SpaceflightAbility.getInstance());
|
||||
|
||||
// Whenever Nebulon-B Frigate enters the battlefield, creatures you control gain vigilance until end of turn.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("creatures you control")), false));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED), false));
|
||||
}
|
||||
|
||||
private NebulonBFrigate(final NebulonBFrigate card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -9,11 +8,9 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -21,13 +18,6 @@ import mage.filter.predicate.mageobject.AnotherPredicate;
|
|||
*/
|
||||
public final class NinthBridgePatrol extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public NinthBridgePatrol(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add(SubType.DWARF);
|
||||
|
|
@ -37,7 +27,7 @@ public final class NinthBridgePatrol extends CardImpl {
|
|||
|
||||
// Whenever another creature you control leaves the battlefield, put a +1/+1 counter on Ninth Bridge Patrol.
|
||||
this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, null,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL,
|
||||
"Whenever another creature you control leaves the battlefield, ", false));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -30,12 +31,9 @@ public final class OvergrowthElemental extends CardImpl {
|
|||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent(SubType.ELEMENTAL, "another target Elemental you control");
|
||||
private static final FilterPermanent filter2
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter2.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public OvergrowthElemental(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -53,7 +51,7 @@ public final class OvergrowthElemental extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Whenever another creature you control dies, you gain 1 life. If that creature was an Elemental, put a +1/+1 counter on Overgrowth Elemental.
|
||||
ability = new DiesCreatureTriggeredAbility(new GainLifeEffect(1), false, filter2, true);
|
||||
ability = new DiesCreatureTriggeredAbility(new GainLifeEffect(1), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true);
|
||||
ability.addEffect(new OvergrowthElementalEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
@ -92,4 +90,4 @@ class OvergrowthElementalEffect extends OneShotEffect {
|
|||
}
|
||||
return new AddCountersSourceEffect(CounterType.P1P1.createInstance()).apply(game, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -9,9 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
|
||||
/**
|
||||
|
|
@ -20,13 +17,6 @@ import mage.game.permanent.token.TreasureToken;
|
|||
*/
|
||||
public final class PitilessPlunderer extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public PitilessPlunderer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
|
|
@ -36,7 +26,7 @@ public final class PitilessPlunderer extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever another creature you control dies, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color."
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new TreasureToken()), false, filter));
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new TreasureToken()), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
}
|
||||
|
||||
private PitilessPlunderer(final PitilessPlunderer card) {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ import mage.abilities.hint.Hint;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
|
@ -28,13 +26,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class RionyaFireDancer extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public RionyaFireDancer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
|
||||
|
||||
|
|
@ -48,7 +39,7 @@ public final class RionyaFireDancer extends CardImpl {
|
|||
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||
new RionyaFireDancerEffect(), TargetController.YOU, false
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability.addHint(RionyaFireDancerHint.instance), new RionyaFireDancerWatcher());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -9,10 +8,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -20,13 +17,6 @@ import mage.filter.predicate.mageobject.AnotherPredicate;
|
|||
*/
|
||||
public final class RotShambler extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public RotShambler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
this.subtype.add(SubType.FUNGUS);
|
||||
|
|
@ -34,7 +24,7 @@ public final class RotShambler extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever another creature you control dies, put a +1/+1 counter on Rot Shambler.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter));
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -21,13 +19,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class SanguinaryPriest extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public SanguinaryPriest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
|
|
@ -40,7 +31,7 @@ public final class SanguinaryPriest extends CardImpl {
|
|||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
||||
// Blood Chalice -- Whenever another creature you control dies, Sanguinary Priest deals 1 damage to any target.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(1), false, filter);
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(1), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL);
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability.withFlavorWord("Blood Chalice"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -30,13 +29,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class SilumgarScavenger extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public SilumgarScavenger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
||||
|
||||
|
|
@ -52,7 +44,7 @@ public final class SilumgarScavenger extends CardImpl {
|
|||
this.addAbility(new ExploitAbility());
|
||||
|
||||
// Whenever another creature you control dies, put a +1/+1 counter on Silumgar Scavenger. It gains haste until end of turn if it exploited that creature.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter, true);
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true);
|
||||
ability.addEffect(new SilumgarScavengerBoostEffect());
|
||||
//ability.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.addAbility(ability, new SilumgarScavengerExploitedWatcher());
|
||||
|
|
@ -130,4 +122,4 @@ class SilumgarScavengerBoostEffect extends OneShotEffect {
|
|||
public SilumgarScavengerBoostEffect copy() {
|
||||
return new SilumgarScavengerBoostEffect(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -26,13 +25,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class SkyriderPatrol extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public SkyriderPatrol(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}");
|
||||
|
||||
|
|
@ -51,7 +43,7 @@ public final class SkyriderPatrol extends CardImpl {
|
|||
"and that creature gains flying until end of turn"
|
||||
);
|
||||
ability.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(new BeginningOfCombatTriggeredAbility(new DoWhenCostPaid(
|
||||
ability, new ManaCostsImpl<>("{G}{U}"), "Pay {G}{U}?"
|
||||
), TargetController.YOU, false));
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ import mage.abilities.keyword.HasteAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
|
@ -21,13 +20,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class StalkingVengeance extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public StalkingVengeance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}");
|
||||
this.subtype.add(SubType.AVATAR);
|
||||
|
|
@ -39,7 +31,7 @@ public final class StalkingVengeance extends CardImpl {
|
|||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Whenever another creature you control dies, it deals damage equal to its power to target player or planeswalker.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new StalkingVengeanceDamageEffect(), false, filter, true);
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new StalkingVengeanceDamageEffect(), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true);
|
||||
ability.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -16,8 +15,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -53,12 +51,6 @@ public final class TemurSabertooth extends CardImpl {
|
|||
|
||||
class TemurSabertoothEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public TemurSabertoothEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "You may return another creature you control to its owner's hand. If you do, {this} gains indestructible until end of turn";
|
||||
|
|
@ -77,7 +69,7 @@ class TemurSabertoothEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Target target = new TargetPermanent(1, 1, filter, true);
|
||||
Target target = new TargetPermanent(1, 1, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true);
|
||||
if (target.canChoose(controller.getId(), source, game)) {
|
||||
if (controller.chooseUse(outcome, "Return another creature to hand?", source, game)
|
||||
&& controller.chooseTarget(outcome, target, source, game)) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.u;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -9,10 +8,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -20,13 +17,6 @@ import mage.filter.predicate.mageobject.AnotherPredicate;
|
|||
*/
|
||||
public final class UnrulyMob extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public UnrulyMob(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -35,7 +25,7 @@ public final class UnrulyMob extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever another creature you control dies, put a +1/+1 counter on Unruly Mob.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter));
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
}
|
||||
|
||||
private UnrulyMob(final UnrulyMob card) {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -48,13 +46,6 @@ public final class WickedGuardian extends CardImpl {
|
|||
|
||||
class WickedGuardianEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
WickedGuardianEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "have it deal 2 damage to another creature you control. If you do, draw a card";
|
||||
|
|
@ -75,10 +66,10 @@ class WickedGuardianEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (game.getBattlefield().count(filter, source.getControllerId(), source, game) == 0) {
|
||||
if (game.getBattlefield().count(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, source.getControllerId(), source, game) == 0) {
|
||||
return false;
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent(0, 1, filter, true);
|
||||
TargetPermanent target = new TargetPermanent(0, 1, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true);
|
||||
if (!player.choose(outcome, target, source, game)) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -89,4 +80,4 @@ class WickedGuardianEffect extends OneShotEffect {
|
|||
permanent.damage(2, source.getSourceId(), source, game);
|
||||
return player.drawCards(1, source, game) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -63,13 +61,6 @@ public final class YannikScavengingSentinel extends CardImpl {
|
|||
|
||||
class YannikScavengingSentinelEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
YannikScavengingSentinelEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "exile another creature you control until {this} leaves the battlefield. " +
|
||||
|
|
@ -91,10 +82,10 @@ class YannikScavengingSentinelEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (player == null || sourcePermanent == null
|
||||
|| game.getBattlefield().count(filter, source.getControllerId(), source, game) < 1) {
|
||||
|| game.getBattlefield().count(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, source.getControllerId(), source, game) < 1) {
|
||||
return false;
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent(filter);
|
||||
TargetPermanent target = new TargetPermanent(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL);
|
||||
target.setNotTarget(true);
|
||||
player.choose(outcome, target, source, game);
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -20,17 +19,10 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class ChooseCreatureEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent defaultFilter
|
||||
= new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
defaultFilter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
private final FilterPermanent filter;
|
||||
|
||||
public ChooseCreatureEffect() {
|
||||
this(defaultFilter);
|
||||
this(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL);
|
||||
}
|
||||
|
||||
public ChooseCreatureEffect(FilterPermanent filter) {
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ public final class StaticFilters {
|
|||
FILTER_CARD_CARDS.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterCard FILTER_CARD_ENTCHANTMENT = new FilterEnchantmentCard();
|
||||
public static final FilterCard FILTER_CARD_ENCHANTMENT = new FilterEnchantmentCard();
|
||||
|
||||
static {
|
||||
FILTER_CARD_ENTCHANTMENT.setLockedFilter(true);
|
||||
FILTER_CARD_ENCHANTMENT.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard();
|
||||
|
|
@ -634,6 +634,13 @@ public final class StaticFilters {
|
|||
FILTER_CONTROLLED_ANOTHER_CREATURE.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterControlledCreaturePermanent FILTER_ANOTHER_CREATURE_YOU_CONTROL = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
FILTER_ANOTHER_CREATURE_YOU_CONTROL.add(AnotherPredicate.instance);
|
||||
FILTER_ANOTHER_CREATURE_YOU_CONTROL.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_UNTAPPED_CREATURE = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue