mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
spjspj - Update all TargetOpponentsChoicePermanent cards with whether they have to target an opponent. (There was a NPE when an opponent had hexproof)
This commit is contained in:
parent
7017749265
commit
712f19f4e6
7 changed files with 13 additions and 10 deletions
|
|
@ -58,7 +58,7 @@ public class Arena extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ArenaEffect(), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(new FilterControlledCreaturePermanent()));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterControlledCreaturePermanent(), false, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class DiaochanArtfulBeauty extends CardImpl {
|
|||
// {tap}: Destroy target creature of your choice, then destroy target creature of an opponent's choice. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiaochanArtfulBeautyDestroyEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(new FilterCreaturePermanent()));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterCreaturePermanent(), false, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class Evangelize extends CardImpl {
|
|||
GainControlTargetEffect effect = new GainControlTargetEffect(Duration.EndOfGame);
|
||||
effect.setText("Gain control of target creature of an opponent's choice that he or she controls");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false));
|
||||
this.getSpellAbility().addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false, true));
|
||||
}
|
||||
|
||||
public Evangelize(final Evangelize card) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class MagusOfTheArena extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MagusOfTheArenaEffect(), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(new FilterControlledCreaturePermanent()));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterControlledCreaturePermanent(), false, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class Preacher extends CardImpl {
|
|||
|
||||
// {tap}: Gain control of target creature of an opponent's choice that he or she controls for as long as Preacher remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreacherEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(new FilterControlledCreaturePermanent()));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterControlledCreaturePermanent(), false, true));
|
||||
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
@ -127,4 +127,4 @@ class PreacherEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,12 +86,12 @@ public class VolcanicOffering extends CardImpl {
|
|||
FilterLandPermanent filterLandForOpponent = new FilterLandPermanent("nonbasic land not controlled by " + controller.getLogName());
|
||||
filterLandForOpponent.add(Predicates.not(new SupertypePredicate("Basic")));
|
||||
filterLandForOpponent.add(Predicates.not(new ControllerIdPredicate(controller.getId())));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(filterLandForOpponent));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, filterLandForOpponent, false, true));
|
||||
|
||||
ability.addTarget(new TargetPermanent(filterCreature));
|
||||
FilterCreaturePermanent filterCreatureForOpponent = new FilterCreaturePermanent("creature not controlled by " + controller.getLogName());
|
||||
filterCreatureForOpponent.add(Predicates.not(new ControllerIdPredicate(controller.getId())));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(filterCreatureForOpponent));
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, filterCreatureForOpponent, false, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue