mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
new StaticFilters.FILTER_CONTROLLED_CLUE
This commit is contained in:
parent
2030dcf169
commit
4456c337c8
14 changed files with 31 additions and 66 deletions
|
|
@ -17,7 +17,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -26,8 +26,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class AlquistProftMasterSleuth extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public AlquistProftMasterSleuth(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
|
||||
|
||||
|
|
@ -48,7 +46,7 @@ public final class AlquistProftMasterSleuth extends CardImpl {
|
|||
new DrawCardSourceControllerEffect(ManacostVariableValue.REGULAR, "you"), new ManaCostsImpl<>("{X}{W}{U}{U}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(filter));
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CLUE));
|
||||
ability.addEffect(new GainLifeEffect(ManacostVariableValue.REGULAR).setText("and gain X life"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -17,8 +16,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class CuriousCadaver extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public CuriousCadaver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}");
|
||||
|
||||
|
|
@ -32,7 +29,7 @@ public final class CuriousCadaver extends CardImpl {
|
|||
|
||||
// When you sacrifice a Clue, return Curious Cadaver from your graveyard to your hand.
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(
|
||||
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), filter,
|
||||
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), StaticFilters.FILTER_CONTROLLED_CLUE,
|
||||
TargetController.YOU, SetTargetPointer.NONE, false
|
||||
).setTriggerPhrase("When you sacrifice a Clue, "));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -17,8 +17,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class DaringSleuth extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public DaringSleuth(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -30,7 +28,7 @@ public final class DaringSleuth extends CardImpl {
|
|||
|
||||
// When you sacrifice a Clue, transform Daring Sleuth.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new TransformSourceEffect(), filter)
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new TransformSourceEffect(), StaticFilters.FILTER_CONTROLLED_CLUE)
|
||||
.setTriggerPhrase("When you sacrifice a Clue, "));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ import mage.abilities.effects.keyword.InvestigateEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -20,12 +19,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class FleetingMemories extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Clue");
|
||||
|
||||
static {
|
||||
filter.add(SubType.CLUE.getPredicate());
|
||||
}
|
||||
|
||||
public FleetingMemories(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
|
||||
|
||||
|
|
@ -33,7 +26,7 @@ public final class FleetingMemories extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new InvestigateEffect(), false));
|
||||
|
||||
// Whenever you sacrifice a Clue, target player puts the top three cards of their graveyard into their graveyard.
|
||||
Ability ability = new SacrificePermanentTriggeredAbility(new MillCardsTargetEffect(3), filter);
|
||||
Ability ability = new SacrificePermanentTriggeredAbility(new MillCardsTargetEffect(3), StaticFilters.FILTER_CONTROLLED_CLUE);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -17,8 +17,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GrafMole extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public GrafMole(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
|
||||
this.subtype.add(SubType.MOLE);
|
||||
|
|
@ -27,7 +25,7 @@ public final class GrafMole extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever you sacrifice a Clue, you gain 3 life.
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new GainLifeEffect(3), filter));
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new GainLifeEffect(3), StaticFilters.FILTER_CONTROLLED_CLUE));
|
||||
}
|
||||
|
||||
private GrafMole(final GrafMole card) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import mage.constants.SubType;
|
|||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
|
@ -27,11 +26,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class LonisGeneticsExpert extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Clue");
|
||||
static {
|
||||
filter.add(SubType.CLUE.getPredicate());
|
||||
}
|
||||
|
||||
public LonisGeneticsExpert(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G/U}{G/U}");
|
||||
|
||||
|
|
@ -49,7 +43,10 @@ public final class LonisGeneticsExpert extends CardImpl {
|
|||
this.addAbility(new LonisGeneticsExpertTriggeredAbility());
|
||||
|
||||
// Whenever you sacrifice a Clue, put a +1/+1 counter on another target creature you control.
|
||||
Ability ability = new SacrificePermanentTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), filter);
|
||||
Ability ability = new SacrificePermanentTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
StaticFilters.FILTER_CONTROLLED_CLUE
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
@ -26,7 +26,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class MarthaJones extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.CLUE, "a Clue");
|
||||
private static final FilterCreaturePermanent filterOther = new FilterCreaturePermanent("other target creature");
|
||||
|
||||
static {
|
||||
|
|
@ -49,7 +48,7 @@ public final class MarthaJones extends CardImpl {
|
|||
|
||||
// Whenever you sacrifice a Clue, Martha Jones and up to one other target creature can't be blocked this turn.
|
||||
Ability ability = new SacrificePermanentTriggeredAbility(
|
||||
new CantBeBlockedSourceEffect(Duration.EndOfTurn).setText("{this}"), filter
|
||||
new CantBeBlockedSourceEffect(Duration.EndOfTurn).setText("{this}"), StaticFilters.FILTER_CONTROLLED_CLUE
|
||||
);
|
||||
ability.addEffect(new CantBeBlockedTargetEffect()
|
||||
.setText("and up to one other target creature can't be blocked this turn"));
|
||||
|
|
|
|||
|
|
@ -10,7 +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.StaticFilters;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -20,8 +20,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class PersuasiveInterrogators extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public PersuasiveInterrogators(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
|
||||
|
||||
|
|
@ -34,7 +32,7 @@ public final class PersuasiveInterrogators extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new InvestigateEffect()));
|
||||
|
||||
// Whenever you sacrifice a Clue, target opponent gets two poison counters.
|
||||
Ability ability = new SacrificePermanentTriggeredAbility(new AddPoisonCounterTargetEffect(2), filter);
|
||||
Ability ability = new SacrificePermanentTriggeredAbility(new AddPoisonCounterTargetEffect(2), StaticFilters.FILTER_CONTROLLED_CLUE);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -25,8 +24,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class SenatorPeacock extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public SenatorPeacock(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||
|
||||
|
|
@ -48,7 +45,7 @@ public final class SenatorPeacock extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Whenever you sacrifice a Clue, target creature can't be blocked this turn.
|
||||
ability = new SacrificePermanentTriggeredAbility(new CantBeBlockedTargetEffect(), filter);
|
||||
ability = new SacrificePermanentTriggeredAbility(new CantBeBlockedTargetEffect(), StaticFilters.FILTER_CONTROLLED_CLUE);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
|
|
@ -27,8 +26,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class TheFugitiveDoctor extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public TheFugitiveDoctor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}");
|
||||
|
||||
|
|
@ -45,7 +42,7 @@ public final class TheFugitiveDoctor extends CardImpl {
|
|||
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new TheFugitiveDoctorEffect(), false);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY));
|
||||
this.addAbility(new AttacksTriggeredAbility(new DoWhenCostPaid(
|
||||
ability, new SacrificeTargetCost(filter), "Sacrifice a Clue?"
|
||||
ability, new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_CLUE), "Sacrifice a Clue?"
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ import mage.abilities.effects.keyword.VentureIntoTheDungeonEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -17,8 +16,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class ThoroughInvestigation extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public ThoroughInvestigation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
|
||||
|
|
@ -26,7 +23,7 @@ public final class ThoroughInvestigation extends CardImpl {
|
|||
this.addAbility(new AttacksWithCreaturesTriggeredAbility(new InvestigateEffect(), 1));
|
||||
|
||||
// Whenever you sacrifice a Clue, venture into the dungeon.
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new VentureIntoTheDungeonEffect(), filter));
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new VentureIntoTheDungeonEffect(), StaticFilters.FILTER_CONTROLLED_CLUE));
|
||||
}
|
||||
|
||||
private ThoroughInvestigation(final ThoroughInvestigation card) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -19,8 +19,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class TirelessTracker extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public TirelessTracker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -33,7 +31,7 @@ public final class TirelessTracker extends CardImpl {
|
|||
|
||||
// Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker.
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), StaticFilters.FILTER_CONTROLLED_CLUE
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ import mage.abilities.effects.keyword.InvestigateEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.permanent.token.HumanSoldierToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -20,12 +18,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class UlvenwaldMysteries extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filterClue = new FilterControlledPermanent("a Clue");
|
||||
|
||||
static {
|
||||
filterClue.add(SubType.CLUE.getPredicate());
|
||||
}
|
||||
|
||||
public UlvenwaldMysteries(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}");
|
||||
|
||||
|
|
@ -33,7 +25,7 @@ public final class UlvenwaldMysteries extends CardImpl {
|
|||
this.addAbility(new DiesCreatureTriggeredAbility(new InvestigateEffect(), false, StaticFilters.FILTER_CONTROLLED_CREATURE_NON_TOKEN));
|
||||
|
||||
// Whenever you sacrifice a Clue, create a 1/1 white Human Soldier creature token.
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new CreateTokenEffect(new HumanSoldierToken()), filterClue));
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new CreateTokenEffect(new HumanSoldierToken()), StaticFilters.FILTER_CONTROLLED_CLUE));
|
||||
}
|
||||
|
||||
private UlvenwaldMysteries(final UlvenwaldMysteries card) {
|
||||
|
|
|
|||
|
|
@ -1230,4 +1230,10 @@ public final class StaticFilters {
|
|||
FILTER_CONTROLLED_FOOD.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterControlledPermanent FILTER_CONTROLLED_CLUE = new FilterControlledPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
static {
|
||||
FILTER_CONTROLLED_CLUE.setLockedFilter(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue