mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Merge branch 'filters'
This commit is contained in:
commit
b478287a99
118 changed files with 705 additions and 422 deletions
|
@ -29,11 +29,8 @@
|
|||
package mage.player.ai;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.AbilityType;
|
||||
import mage.Constants.RangeOfInfluence;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.filter.FilterAbility;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.Combat;
|
||||
import mage.game.combat.CombatGroup;
|
||||
|
@ -54,21 +51,8 @@ public class ComputerPlayer7 extends ComputerPlayer6 implements Player {
|
|||
|
||||
private static final transient Logger logger = Logger.getLogger(ComputerPlayer7.class);
|
||||
|
||||
private static FilterAbility filterLand = new FilterAbility();
|
||||
private static FilterAbility filterNotLand = new FilterAbility();
|
||||
|
||||
private boolean allowBadMoves;
|
||||
|
||||
static {
|
||||
filterLand.getTypes().add(AbilityType.PLAY_LAND);
|
||||
filterLand.setZone(Zone.HAND);
|
||||
|
||||
filterNotLand.getTypes().add(AbilityType.PLAY_LAND);
|
||||
filterNotLand.setZone(Zone.HAND);
|
||||
filterNotLand.setNotFilter(true);
|
||||
|
||||
}
|
||||
|
||||
public ComputerPlayer7(String name, RangeOfInfluence range, int skill) {
|
||||
super(name, range, skill);
|
||||
}
|
||||
|
|
|
@ -28,12 +28,9 @@
|
|||
|
||||
package mage.player.ai;
|
||||
|
||||
import mage.Constants.AbilityType;
|
||||
import mage.Constants.PhaseStep;
|
||||
import mage.Constants.RangeOfInfluence;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.filter.FilterAbility;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.Combat;
|
||||
import mage.game.combat.CombatGroup;
|
||||
|
@ -54,19 +51,6 @@ public class ComputerPlayer3 extends ComputerPlayer2 implements Player {
|
|||
|
||||
private static final transient Logger logger = Logger.getLogger(ComputerPlayer3.class);
|
||||
|
||||
private static FilterAbility filterLand = new FilterAbility();
|
||||
private static FilterAbility filterNotLand = new FilterAbility();
|
||||
|
||||
static {
|
||||
filterLand.getTypes().add(AbilityType.PLAY_LAND);
|
||||
filterLand.setZone(Zone.HAND);
|
||||
|
||||
filterNotLand.getTypes().add(AbilityType.PLAY_LAND);
|
||||
filterNotLand.setZone(Zone.HAND);
|
||||
filterNotLand.setNotFilter(true);
|
||||
|
||||
}
|
||||
|
||||
public ComputerPlayer3(String name, RangeOfInfluence range, int skill) {
|
||||
super(name, range, skill);
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ import mage.choices.ChoiceImpl;
|
|||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.common.FilterBlockingCreature;
|
||||
import mage.filter.common.FilterCreatureForCombat;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.draft.Draft;
|
||||
import mage.game.match.Match;
|
||||
|
@ -80,7 +81,7 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
|||
private static Map<String, Serializable> staticOptions = new HashMap<String, Serializable>();
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
replacementEffectChoice.setMessage("Choose replacement effect");
|
||||
staticOptions.put("UI.right.btn.text", "Done");
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.RequirementEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -95,7 +96,7 @@ class AggraveteEffect extends OneShotEffect<AggraveteEffect> {
|
|||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.getControllerId().add(player.getId());
|
||||
filter.add(new ControllerIdPredicate(player.getId()));
|
||||
List<Permanent> creatures = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getId(), game);
|
||||
for (Permanent creature : creatures) {
|
||||
creature.damage(1, source.getSourceId(), game, true, false);
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.SacrificeEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -49,7 +50,7 @@ public class DemonicTaskmaster extends CardImpl<DemonicTaskmaster> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a creature other than Demonic Taskmaster");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public DemonicTaskmaster(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.UndyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -46,10 +47,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public class DemonlordOfAshmouth extends CardImpl<DemonlordOfAshmouth> {
|
||||
|
||||
private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(" another creature");
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(" another creature");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public DemonlordOfAshmouth(UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -48,7 +49,7 @@ public class Dreadwaters extends CardImpl<Dreadwaters> {
|
|||
private static final FilterLandPermanent filter = new FilterLandPermanent("lands you control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public Dreadwaters(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -79,10 +80,10 @@ public class Fettergeist extends CardImpl<Fettergeist> {
|
|||
|
||||
class FettergeistUnlessPaysEffect extends OneShotEffect<FettergeistUnlessPaysEffect> {
|
||||
|
||||
private static FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public FettergeistUnlessPaysEffect() {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -46,10 +47,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public class GoldnightRedeemer extends CardImpl<GoldnightRedeemer> {
|
||||
|
||||
private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creature you control");
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creature you control");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public GoldnightRedeemer(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
@ -77,7 +78,7 @@ class HavengulSkaabAbility extends TriggeredAbilityImpl<HavengulSkaabAbility> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public HavengulSkaabAbility() {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
@ -51,7 +52,7 @@ public class PeelFromReality extends CardImpl<PeelFromReality> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.NOT_YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||
}
|
||||
|
||||
public PeelFromReality(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -98,15 +99,13 @@ class FeastOfWormsEffect extends OneShotEffect<FeastOfWormsEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
//Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
|
||||
Player targetPlayer = game.getPlayer(permanent.getControllerId());
|
||||
if (targetPlayer != null && permanent != null
|
||||
&& (permanent.getSupertype().get(0).toString().equals("Legendary"))) {
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("land to sacrifice");
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.getControllerId().add(targetPlayer.getId());
|
||||
filter.setNotController(false);
|
||||
filter.add(new ControllerIdPredicate(targetPlayer.getId()));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
|
||||
|
||||
if (target.canChoose(targetPlayer.getId(), game)) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.RestrictionEffect;
|
|||
import mage.abilities.keyword.ShroudAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -68,7 +69,7 @@ public class HisokasGuard extends CardImpl<HisokasGuard> {
|
|||
|
||||
// {1}{U}, {T}: Target creature you control other than Hisoka's Guard has shroud for as long as Hisoka's Guard remains tapped. (It can't be the target of spells or abilities.)
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HisokasGuardGainAbilityTargetEffect(), new ManaCostsImpl("{1}{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
Target target = new TargetControlledCreaturePermanent(1, 1, filter, true, true);
|
||||
|
|
|
@ -48,6 +48,7 @@ import mage.abilities.keyword.IndestructibleAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.watchers.common.CastFromHandWatcher;
|
||||
|
||||
/**
|
||||
|
@ -57,7 +58,7 @@ public class MyojinOfCleansingFire extends CardImpl<MyojinOfCleansingFire> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creatures");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public MyojinOfCleansingFire(UUID ownerId) {
|
||||
|
|
|
@ -51,6 +51,7 @@ import mage.abilities.keyword.IndestructibleAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.watchers.common.CastFromHandWatcher;
|
||||
|
||||
/**
|
||||
|
@ -60,7 +61,7 @@ public class MyojinOfSeeingWinds extends CardImpl<MyojinOfSeeingWinds> {
|
|||
|
||||
private static final FilterPermanent filter = new FilterPermanent("permanent you control");
|
||||
static {
|
||||
filter.setTargetOwner(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public MyojinOfSeeingWinds(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.SkipNextPlayerUntapStepEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -85,8 +86,10 @@ public class YoseiTheMorningStar extends CardImpl<YoseiTheMorningStar> {
|
|||
|
||||
class YoseiTheMorningStarTarget extends TargetPermanent {
|
||||
|
||||
private static final FilterPermanent filterTemplate = new FilterPermanent("up to five target permanents that player controls that will be tapped");
|
||||
|
||||
public YoseiTheMorningStarTarget() {
|
||||
super(0, 5, new FilterPermanent("up to five target permanents that player controls that will be tapped"), false);
|
||||
super(0, 5, filterTemplate, false);
|
||||
}
|
||||
|
||||
public YoseiTheMorningStarTarget(final YoseiTheMorningStarTarget target) {
|
||||
|
@ -97,8 +100,8 @@ public class YoseiTheMorningStar extends CardImpl<YoseiTheMorningStar> {
|
|||
public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player != null) {
|
||||
filter.getControllerId().clear();
|
||||
filter.getControllerId().add(player.getId());
|
||||
this.filter = filterTemplate.copy();
|
||||
this.filter.add(new ControllerIdPredicate(player.getId()));
|
||||
return super.canTarget(controllerId, id, source, game);
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -50,7 +51,7 @@ public class AlphaBrawl extends CardImpl<AlphaBrawl> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.setTargetController(Constants.TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public AlphaBrawl(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.TrampleAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -56,7 +57,7 @@ public class ArchdemonOfGreed extends CardImpl<ArchdemonOfGreed> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public ArchdemonOfGreed(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.TapTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
|
@ -58,7 +59,7 @@ public class DungeonGeists extends CardImpl<DungeonGeists> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.setTargetController(Constants.TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public DungeonGeists(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterNonTokenPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.WolfToken;
|
||||
|
@ -77,7 +78,7 @@ class FeedThePackEffect extends OneShotEffect<FeedThePackEffect> {
|
|||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public FeedThePackEffect() {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
|||
import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -52,7 +53,7 @@ public class Helvault extends CardImpl<Helvault> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.NOT_YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||
}
|
||||
|
||||
public Helvault(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -105,7 +106,8 @@ class SoulSeizerTriggeredAbility extends TriggeredAbilityImpl<SoulSeizerTriggere
|
|||
Player opponent = game.getPlayer(event.getPlayerId());
|
||||
if (opponent != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls");
|
||||
filter.getControllerId().add(opponent.getId());
|
||||
filter.add(new ControllerIdPredicate(opponent.getId()));
|
||||
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetCreaturePermanent(filter));
|
||||
return true;
|
||||
|
|
|
@ -38,9 +38,9 @@ import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
@ -79,7 +79,7 @@ class EmissaryOfHopeEffect extends OneShotEffect<EmissaryOfHopeEffect> {
|
|||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
EmissaryOfHopeEffect() {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -95,9 +96,10 @@ class AshlingTheExtinguisherTriggeredAbility extends TriggeredAbilityImpl<Ashlin
|
|||
if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) {
|
||||
Player opponent = game.getPlayer(event.getPlayerId());
|
||||
if (opponent != null) {
|
||||
this.getTargets().clear();
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls");
|
||||
filter.getControllerId().add(opponent.getId());
|
||||
filter.add(new ControllerIdPredicate(opponent.getId()));
|
||||
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetCreaturePermanent(filter));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.keyword.FlashbackAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -80,7 +81,7 @@ class DivineReckoningEffect extends OneShotEffect<DivineReckoningEffect> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public DivineReckoningEffect() {
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.sets.innistrad;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -34,14 +35,13 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
|
@ -50,7 +50,7 @@ public class FiendHunter extends CardImpl<FiendHunter> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public FiendHunter(UUID ownerId) {
|
||||
|
|
|
@ -47,6 +47,7 @@ import mage.filter.FilterPermanent;
|
|||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.WolfTokenWithDeathtouch;
|
||||
|
@ -136,7 +137,7 @@ class GarrukTheVeilCursedEffect extends OneShotEffect<GarrukTheVeilCursedEffect>
|
|||
|
||||
static {
|
||||
filterCreature.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filterCreature.setTargetController(Constants.TargetController.YOU);
|
||||
filterCreature.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public GarrukTheVeilCursedEffect() {
|
||||
|
|
|
@ -45,6 +45,8 @@ import mage.cards.CardImpl;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
@ -59,7 +61,7 @@ public class GrimgrinCorpseBorn extends CardImpl<GrimgrinCorpseBorn> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public GrimgrinCorpseBorn(UUID ownerId) {
|
||||
|
@ -112,7 +114,9 @@ class GrimgrinCorpseBornAbility extends TriggeredAbilityImpl<GrimgrinCorpseBornA
|
|||
if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
|
||||
UUID defenderId = game.getCombat().getDefendingPlayer(sourceId);
|
||||
filter.getControllerId().add(defenderId);
|
||||
filter.add(new ControllerIdPredicate(defenderId));
|
||||
|
||||
this.getTargets().clear();
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
target.setRequired(true);
|
||||
this.addTarget(target);
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.Constants.TargetController;
|
|||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,7 +46,7 @@ public class HystericalBlindness extends CardImpl<HystericalBlindness> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public HystericalBlindness(UUID ownerId) {
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -58,7 +59,7 @@ public class MikaeusTheLunarch extends CardImpl<MikaeusTheLunarch> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public MikaeusTheLunarch(UUID ownerId) {
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.cards.CardImpl;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -57,7 +58,7 @@ public class OliviaVoldaren extends CardImpl<OliviaVoldaren> {
|
|||
private static final FilterCreaturePermanent vampireFilter = new FilterCreaturePermanent("Vampire");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
vampireFilter.add(new SubtypePredicate("Vampire"));
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +53,7 @@ public class OneEyedScarecrow extends CardImpl<OneEyedScarecrow> {
|
|||
|
||||
static {
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public OneEyedScarecrow(UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.Constants.TargetController;
|
|||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -46,7 +47,7 @@ public class PreyUpon extends CardImpl<PreyUpon> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.NOT_YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||
}
|
||||
|
||||
public PreyUpon(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,7 +50,7 @@ public class ScourgeOfGeierReach extends CardImpl<ScourgeOfGeierReach> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public ScourgeOfGeierReach(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -93,7 +94,7 @@ class TributeToHungerEffect extends OneShotEffect<TributeToHungerEffect> {
|
|||
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("creature");
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
|
||||
|
||||
if (target.canChoose(player.getId(), game)) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -49,7 +50,7 @@ public class VampiricFury extends CardImpl<VampiricFury> {
|
|||
|
||||
static {
|
||||
vampires.add(new SubtypePredicate("Vampire"));
|
||||
vampires.setTargetController(Constants.TargetController.YOU);
|
||||
vampires.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public VampiricFury(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -56,7 +57,7 @@ public class MadAuntie extends CardImpl<MadAuntie> {
|
|||
|
||||
static {
|
||||
filter1.add(new SubtypePredicate("Goblin"));
|
||||
filter1.setAnother(true);
|
||||
filter1.add(new AnotherPredicate());
|
||||
filter2.add(new SubtypePredicate("Goblin"));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.abilities.keyword.ShroudAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -54,7 +55,7 @@ public class ScionOfOona extends CardImpl<ScionOfOona> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Faerie"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public ScionOfOona(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.AttacksIfAbleTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,7 +53,7 @@ public class AlluringSiren extends CardImpl<AlluringSiren> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public AlluringSiren(UUID ownerId) {
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -58,7 +59,7 @@ public class ArmoredAscension extends CardImpl<ArmoredAscension> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Plains"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public ArmoredAscension(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -54,8 +55,8 @@ public class CapriciousEfreet extends CardImpl<CapriciousEfreet> {
|
|||
private static final FilterNonlandPermanent filterNotControlled = new FilterNonlandPermanent("nonland permanent you don't control");
|
||||
|
||||
static {
|
||||
filterControlled.setTargetController(TargetController.YOU);
|
||||
filterNotControlled.setTargetController(TargetController.NOT_YOU);
|
||||
filterControlled.add(new ControllerPredicate(TargetController.YOU));
|
||||
filterNotControlled.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||
}
|
||||
|
||||
public CapriciousEfreet(UUID ownerId) {
|
||||
|
|
|
@ -40,10 +40,12 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -95,15 +97,18 @@ class LightwielderPaladinTriggeredAbility extends TriggeredAbilityImpl<Lightwiel
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)
|
||||
&& ((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
FilterPermanent filter = new FilterPermanent("black or red permanent");
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.BLACK),
|
||||
new ColorPredicate(ObjectColor.RED)));
|
||||
filter.getControllerId().add(event.getTargetId());
|
||||
filter.setNotController(false);
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
return true;
|
||||
Player player = game.getPlayer(event.getTargetId());
|
||||
if (player != null) {
|
||||
FilterPermanent filter = new FilterPermanent("black or red permanent controlled by " + player.getName());
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.BLACK),
|
||||
new ColorPredicate(ObjectColor.RED)));
|
||||
filter.add(new ControllerIdPredicate(event.getTargetId()));
|
||||
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.Constants.TargetController;
|
|||
import mage.abilities.effects.common.PreventAllDamageToEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreatureOrPlayer;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +47,7 @@ public class SafePassage extends CardImpl<SafePassage> {
|
|||
private static final FilterCreatureOrPlayer filter = new FilterCreatureOrPlayer("you and creatures you control");
|
||||
|
||||
static {
|
||||
filter.getCreatureFilter().setTargetController(TargetController.YOU);
|
||||
filter.getCreatureFilter().add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.getPlayerFilter().setPlayerTarget(TargetController.YOU);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -107,7 +108,7 @@ class XathridDemonEffect extends OneShotEffect<XathridDemonEffect> {
|
|||
}
|
||||
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature other than " + sourcePermanent.getName());
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
|
||||
Target target = new TargetControlledCreaturePermanent(1, 1, filter, true, true);
|
||||
if (target.canChoose(source.getSourceId(), player.getId(), game)) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -90,7 +91,7 @@ class YawningFissureEffect extends OneShotEffect<YawningFissureEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
for (UUID opponentId : opponents) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -77,18 +78,14 @@ public class AncientHellkite extends CardImpl<AncientHellkite> {
|
|||
|
||||
class AncientHellkiteAbility extends ActivatedAbilityImpl<AncientHellkiteAbility> {
|
||||
|
||||
private FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
|
||||
|
||||
public AncientHellkiteAbility() {
|
||||
super(Zone.BATTLEFIELD, new DamageTargetEffect(1));
|
||||
addCost(new AncientHellkiteCost());
|
||||
addTarget(new TargetCreaturePermanent(filter));
|
||||
addManaCost(new ColoredManaCost(ColoredManaSymbol.R));
|
||||
}
|
||||
|
||||
public AncientHellkiteAbility(final AncientHellkiteAbility ability) {
|
||||
super(ability);
|
||||
this.filter = ability.filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -100,9 +97,10 @@ class AncientHellkiteAbility extends ActivatedAbilityImpl<AncientHellkiteAbility
|
|||
public boolean activate(Game game, boolean noMana) {
|
||||
UUID defenderId = game.getCombat().getDefendingPlayer(sourceId);
|
||||
if (defenderId != null) {
|
||||
getTargets().clear();
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
|
||||
filter.getControllerId().add(defenderId);
|
||||
filter.add(new ControllerIdPredicate(defenderId));
|
||||
|
||||
this.getTargets().clear();
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
target.setRequired(true);
|
||||
this.addTarget(target);
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -74,7 +75,7 @@ class CorruptEffect extends OneShotEffect<CorruptEffect> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Swamp"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public CorruptEffect() {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.common.AttacksTriggeredAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -89,7 +90,7 @@ class CyclopsGladiatorEffect extends OneShotEffect<CyclopsGladiatorEffect> {
|
|||
UUID defenderId = game.getCombat().getDefendingPlayer(source.getSourceId());
|
||||
if (defenderId != null) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
|
||||
filter.getControllerId().add(defenderId);
|
||||
filter.add(new ControllerIdPredicate(defenderId));
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +53,7 @@ public class EarthServant extends CardImpl<EarthServant> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public EarthServant(UUID ownerId) {
|
||||
|
|
|
@ -44,6 +44,7 @@ import mage.abilities.effects.common.ReturnFromExileEffect;
|
|||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -57,7 +58,7 @@ public class MystifyingMaze extends CardImpl<MystifyingMaze> {
|
|||
private static final FilterAttackingCreature filter = new FilterAttackingCreature("attacking creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public MystifyingMaze(UUID ownerId) {
|
||||
|
|
|
@ -50,6 +50,7 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -175,7 +176,7 @@ class NecroticPlagueEffect2 extends OneShotEffect<NecroticPlagueEffect2> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public NecroticPlagueEffect2(UUID cardId) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -56,7 +57,7 @@ public class QuagSickness extends CardImpl<QuagSickness> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Swamp"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public QuagSickness(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.cards.CardImpl;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,7 +54,7 @@ public class SteelOverseer extends CardImpl<SteelOverseer> {
|
|||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public SteelOverseer(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -58,7 +59,7 @@ public class AegisAngel extends CardImpl<AegisAngel> {
|
|||
this.toughness = new MageInt(5);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
FilterPermanent filter = new FilterPermanent("another target permanent");
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield), false);
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.setRequired(true);
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -76,9 +77,9 @@ class SmallpoxEffect extends OneShotEffect<SmallpoxEffect> {
|
|||
|
||||
static {
|
||||
filterCreature.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filterCreature.setTargetController(Constants.TargetController.YOU);
|
||||
filterCreature.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
filterLand.add(new CardTypePredicate(CardType.LAND));
|
||||
filterLand.setTargetController(Constants.TargetController.YOU);
|
||||
filterLand.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
SmallpoxEffect() {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,7 +46,7 @@ public class CowerInFear extends CardImpl<CowerInFear> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(Constants.TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public CowerInFear(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SaprolingToken;
|
||||
|
@ -74,7 +75,7 @@ class FungalSproutingEffect extends OneShotEffect<FungalSproutingEffect> {
|
|||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public FungalSproutingEffect() {
|
||||
|
|
|
@ -53,6 +53,7 @@ import mage.counters.CounterType;
|
|||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -127,7 +128,7 @@ class LilianaOfTheDarkRealmsEffect extends ContinuousEffectImpl<LilianaOfTheDark
|
|||
|
||||
FilterLandPermanent filter = new FilterLandPermanent("Swamps");
|
||||
filter.add(new SubtypePredicate("Swamp"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
this.amount = game.getBattlefield().count(filter, source.getControllerId(), game);
|
||||
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.continious.BoostAllEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -48,7 +49,7 @@ public class Mutilate extends CardImpl<Mutilate> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Swamp"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public Mutilate(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.keyword.HasteAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -54,7 +55,7 @@ public class ThundermawHellkite extends CardImpl<ThundermawHellkite> {
|
|||
|
||||
static {
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
filter.setTargetController(Constants.TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public ThundermawHellkite(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.ContinuousEffectImpl;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -51,7 +52,7 @@ public class TimberpackWolf extends CardImpl<TimberpackWolf> {
|
|||
|
||||
static {
|
||||
filter.add(new NamePredicate("Timberpack Wolf"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public TimberpackWolf(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.EquipAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,7 +51,7 @@ public class NightmareLash extends CardImpl<NightmareLash> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Swamp"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public NightmareLash(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.ContinuousEffectImpl;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -52,7 +53,7 @@ public class Cryptoplasm extends CardImpl<Cryptoplasm> {
|
|||
final static FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public Cryptoplasm(UUID ownerId) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.permanent.token.Token;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -92,7 +93,7 @@ class ThopterAssemblyTriggeredAbility extends TriggeredAbilityImpl<ThopterAssemb
|
|||
if (event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE && event.getPlayerId().equals(this.controllerId)) {
|
||||
FilterPermanent filter = new FilterPermanent();
|
||||
filter.add(new SubtypePredicate("Thopter"));
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
if (!game.getBattlefield().contains(filter, controllerId, 1, game)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
@ -57,6 +58,7 @@ public class ArmWithAEther extends CardImpl<ArmWithAEther> {
|
|||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Until end of turn, creatures you control gain "Whenever this creature deals damage to an opponent, you may return target creature that player controls to its owner's hand."
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(new ArmWithAEtherTriggeredAbility(), Duration.EndOfTurn, filter));
|
||||
}
|
||||
|
||||
|
@ -89,9 +91,10 @@ class ArmWithAEtherTriggeredAbility extends TriggeredAbilityImpl<ArmWithAEtherTr
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Player opponent = game.getPlayer(event.getPlayerId());
|
||||
if (opponent != null && event.getType() == GameEvent.EventType.DAMAGED_PLAYER && event.getSourceId().equals(this.sourceId)) {
|
||||
this.getTargets().clear();
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getName() + " controls");
|
||||
filter.getControllerId().add(opponent.getId());
|
||||
filter.add(new ControllerIdPredicate(opponent.getId()));
|
||||
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetCreaturePermanent(filter));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.keyword.IntimidateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -64,6 +65,7 @@ public class BlindZealot extends CardImpl<BlindZealot> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(IntimidateAbility.getInstance());
|
||||
// Whenever Blind Zealot deals combat damage to a player, you may sacrifice it. If you do, destroy target creature that player controls.
|
||||
this.addAbility(new BlindZealotTriggeredAbility());
|
||||
}
|
||||
|
||||
|
@ -106,11 +108,11 @@ class BlindZealotTriggeredAbility extends TriggeredAbilityImpl<BlindZealotTrigge
|
|||
sb.append(" to destroy target creature controlled by ");
|
||||
sb.append(game.getPlayer(event.getTargetId()).getName()).append("?");
|
||||
if (player.chooseUse(Outcome.DestroyPermanent, sb.toString(), game)) {
|
||||
this.getTargets().clear();
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.getControllerId().add(event.getTargetId());
|
||||
filter.setNotController(false);
|
||||
filter.add(new ControllerIdPredicate(event.getTargetId()));
|
||||
filter.setMessage("creature controlled by " + game.getPlayer(event.getTargetId()).getName());
|
||||
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetCreaturePermanent(filter));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
@ -55,7 +56,7 @@ public class ChancellorOfTheForge extends CardImpl<ChancellorOfTheForge> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public ChancellorOfTheForge(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.UntapTargetEffect;
|
|||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -52,7 +53,7 @@ public class DeceiverExarch extends CardImpl<DeceiverExarch> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("permanent an opponent controls");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public DeceiverExarch(UUID ownerId) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.keyword.LivingWeaponAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,7 +54,7 @@ public class Lashwrithe extends CardImpl<Lashwrithe> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Swamp"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public Lashwrithe(UUID ownerId) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.permanent.token.GolemToken;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -57,7 +58,7 @@ public class VitalSplicer extends CardImpl<VitalSplicer> {
|
|||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.add(new SubtypePredicate("Golem"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public VitalSplicer(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
|||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,7 +53,7 @@ public class FiresOfYavimaya extends CardImpl<FiresOfYavimaya> {
|
|||
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Creatures you control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public FiresOfYavimaya(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.keyword.ReboundAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -90,7 +91,7 @@ class ConsumingVaporsEffect extends OneShotEffect<ConsumingVaporsEffect> {
|
|||
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("creature");
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
|
||||
|
||||
//A spell or ability could have removed the only legal target this player
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,7 +51,7 @@ public class DarksteelJuggernaut extends CardImpl<DarksteelJuggernaut> {
|
|||
private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifacts you control");
|
||||
|
||||
static {
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public DarksteelJuggernaut (UUID ownerId) {
|
||||
|
|
|
@ -53,6 +53,7 @@ import mage.cards.CardImpl;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
@ -69,9 +70,9 @@ public class KothOfTheHammer extends CardImpl<KothOfTheHammer> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
filterCount.add(new SubtypePredicate("Mountain"));
|
||||
filterCount.setTargetController(Constants.TargetController.YOU);
|
||||
filterCount.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public KothOfTheHammer (UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.continious.GainControlTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterEquipment;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -52,10 +53,10 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class OgreGeargrabber extends CardImpl<OgreGeargrabber> {
|
||||
|
||||
private static FilterEquipment filter = new FilterEquipment("Equipment an opponent controls");
|
||||
private static final FilterEquipment filter = new FilterEquipment("Equipment an opponent controls");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public OgreGeargrabber(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
|
||||
/**
|
||||
|
@ -53,7 +54,7 @@ public class ToilToRenown extends CardImpl<ToilToRenown> {
|
|||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.LAND)));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public ToilToRenown(UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -54,7 +55,7 @@ public class MasterOfEtherium extends CardImpl<MasterOfEtherium> {
|
|||
static {
|
||||
filterCounted.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
filterBoosted.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
filterBoosted.setTargetController(Constants.TargetController.YOU);
|
||||
filterBoosted.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public MasterOfEtherium(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
|||
import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -48,10 +49,10 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class OblivionRing extends CardImpl<OblivionRing> {
|
||||
|
||||
private static FilterNonlandPermanent anotherNonlandPermanent = new FilterNonlandPermanent("another nonland permanent");
|
||||
private static final FilterNonlandPermanent anotherNonlandPermanent = new FilterNonlandPermanent("another nonland permanent");
|
||||
|
||||
static {
|
||||
anotherNonlandPermanent.setAnother(true);
|
||||
anotherNonlandPermanent.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public OblivionRing(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,7 +50,7 @@ public class AkoumBattlesinger extends CardImpl<AkoumBattlesinger> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public AkoumBattlesinger(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -99,7 +100,7 @@ class ButcherOfMalakirEffect extends OneShotEffect<ButcherOfMalakirEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("creature you control");
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
for (UUID opponentId : opponents) {
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -58,7 +59,7 @@ public class ClawsOfValakut extends CardImpl<ClawsOfValakut> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public ClawsOfValakut (UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
|
@ -52,7 +53,7 @@ public class HalimarExcavator extends CardImpl<HalimarExcavator> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public HalimarExcavator(UUID ownerId) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.abilities.keyword.EquipAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -59,8 +60,12 @@ public class HammerOfRuin extends CardImpl<HammerOfRuin> {
|
|||
super(ownerId, 124, "Hammer of Ruin", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "WWK";
|
||||
this.subtype.add("Equipment");
|
||||
|
||||
// Equipped creature gets +2/+0.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0)));
|
||||
// Whenever equipped creature deals combat damage to a player, you may destroy target Equipment that player controls.
|
||||
this.addAbility(new HammerOfRuinTriggeredAbility());
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));
|
||||
}
|
||||
|
||||
|
@ -79,9 +84,6 @@ class HammerOfRuinTriggeredAbility extends TriggeredAbilityImpl<HammerOfRuinTrig
|
|||
|
||||
HammerOfRuinTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DestroyTargetEffect(), true);
|
||||
FilterPermanent filter = new FilterPermanent("Equipment that player controls");
|
||||
filter.add(new SubtypePredicate("Equipment"));
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
HammerOfRuinTriggeredAbility(final HammerOfRuinTriggeredAbility ability) {
|
||||
|
@ -99,9 +101,13 @@ class HammerOfRuinTriggeredAbility extends TriggeredAbilityImpl<HammerOfRuinTrig
|
|||
DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event;
|
||||
Permanent p = game.getPermanent(event.getSourceId());
|
||||
if (damageEvent.isCombatDamage() && p != null && p.getAttachments().contains(this.getSourceId())) {
|
||||
FilterPermanent filter = (FilterPermanent)getTargets().get(0).getFilter();
|
||||
filter.getControllerId().clear();
|
||||
filter.getControllerId().add(event.getPlayerId());
|
||||
FilterPermanent filter = new FilterPermanent("Equipment that player controls");
|
||||
filter.add(new SubtypePredicate("Equipment"));
|
||||
filter.add(new ControllerIdPredicate(event.getPlayerId()));
|
||||
filter.setMessage("creature controlled by " + game.getPlayer(event.getTargetId()).getName());
|
||||
|
||||
this.getTargets().clear();
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.effects.common.MayTapOrUntapTargetEffect;
|
|||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,11 +51,10 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class TideforceElemental extends CardImpl<TideforceElemental> {
|
||||
|
||||
// private final static String text = "You may tap or untap another target creature";
|
||||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature");
|
||||
|
||||
static {
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public TideforceElemental(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.LoseLifeTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
|
@ -52,7 +53,7 @@ public class HagraDiabolist extends CardImpl<HagraDiabolist> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public HagraDiabolist(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,7 +52,7 @@ public class HighlandBerserker extends CardImpl<HighlandBerserker> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public HighlandBerserker(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.VigilanceAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,7 +52,7 @@ public class JoragaBard extends CardImpl<JoragaBard> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public JoragaBard(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
|||
import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -53,7 +54,7 @@ public class JourneyToNowhere extends CardImpl<JourneyToNowhere> {
|
|||
this.expansionSetCode = "ZEN";
|
||||
this.color.setWhite(true);
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.setAnother(true);
|
||||
filter.add(new AnotherPredicate());
|
||||
Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect("Journey to Nowhere exile"), false);
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.setRequired(true);
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.cards.CardImpl;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,7 +51,7 @@ public class KazuulWarlord extends CardImpl<KazuulWarlord> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public KazuulWarlord(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.SkipNextUntapTargetEffect;
|
|||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +49,7 @@ public class KorHookmaster extends CardImpl<KorHookmaster> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.OPPONENT);
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public KorHookmaster(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,7 +48,7 @@ public class LandbindRitual extends CardImpl<LandbindRitual> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Plains"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public LandbindRitual(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.DiscardTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +49,7 @@ public class MindSludge extends CardImpl<MindSludge> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Swamp"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public MindSludge(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,7 +53,7 @@ public class MurasaPyromancer extends CardImpl<MurasaPyromancer> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public MurasaPyromancer(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.common.GainLifeEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,7 +51,7 @@ public class OnduCleric extends CardImpl<OnduCleric> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public OnduCleric(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,7 +50,7 @@ public class PrimalBellow extends CardImpl<PrimalBellow> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,7 +52,7 @@ public class SeascapeAerialist extends CardImpl<SeascapeAerialist> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
|
||||
public SeascapeAerialist(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -49,7 +50,7 @@ public class SpireBarrage extends CardImpl<SpireBarrage> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public SpireBarrage(UUID ownerId) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -55,7 +56,7 @@ public class TajuruArcher extends CardImpl<TajuruArcher> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.setTargetController(Constants.TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
filterTarget.add(new AbilityPredicate(FlyingAbility.class));
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,7 +51,7 @@ public class TimbermawLarva extends CardImpl<TimbermawLarva> {
|
|||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -87,7 +88,7 @@ public class CantTargetControlledEffect extends ReplacementEffectImpl<CantTarget
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == EventType.TARGET) {
|
||||
filterTarget.setTargetController(TargetController.YOU);
|
||||
filterTarget.add(new ControllerPredicate(TargetController.YOU));
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null && filterTarget.match(permanent, source.getSourceId(), source.getControllerId(), game)) {
|
||||
if (filterSource == null)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue