* Rite of Undoing - Fixed that the first target could also be a non controlled permanent.

This commit is contained in:
LevelX2 2015-01-31 19:25:56 +01:00
parent faa2b0a0bf
commit e6b85901b8

View file

@ -49,10 +49,12 @@ import mage.target.common.TargetNonlandPermanent;
*/ */
public class RiteOfUndoing extends CardImpl { public class RiteOfUndoing extends CardImpl {
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanent you don't control"); private static final FilterNonlandPermanent filterControlled = new FilterNonlandPermanent("nonland permanent you control");
private static final FilterNonlandPermanent filterNotControlled = new FilterNonlandPermanent("nonland permanent you don't control");
static { static {
filter.add(new ControllerPredicate(TargetController.NOT_YOU)); filterControlled.add(new ControllerPredicate(TargetController.YOU));
filterNotControlled.add(new ControllerPredicate(TargetController.NOT_YOU));
} }
public RiteOfUndoing(UUID ownerId) { public RiteOfUndoing(UUID ownerId) {
@ -61,10 +63,11 @@ public class RiteOfUndoing extends CardImpl {
// Delve // Delve
this.addAbility(new DelveAbility()); this.addAbility(new DelveAbility());
// Return target nonland permanent you control and target nonland permanent you don't control to their owners' hands. // Return target nonland permanent you control and target nonland permanent you don't control to their owners' hands.
this.getSpellAbility().addEffect(new RiteOfUndoingEffect()); this.getSpellAbility().addEffect(new RiteOfUndoingEffect());
this.getSpellAbility().addTarget(new TargetNonlandPermanent()); this.getSpellAbility().addTarget(new TargetNonlandPermanent(filterControlled));
this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter)); this.getSpellAbility().addTarget(new TargetNonlandPermanent(filterNotControlled));
} }
public RiteOfUndoing(final RiteOfUndoing card) { public RiteOfUndoing(final RiteOfUndoing card) {