[NEO] Implemented Azusa's Many Journeys / Likeness of the Seeker

This commit is contained in:
Daniel Bomar 2022-02-03 14:04:48 -06:00
parent 94b1472ad6
commit 8477260070
No known key found for this signature in database
GPG key ID: C86C8658F4023918
4 changed files with 109 additions and 3 deletions

View file

@ -4,6 +4,7 @@ import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.Game;
@ -17,11 +18,15 @@ import mage.util.CardUtil;
*/
public class UntapLandsEffect extends OneShotEffect {
private static final FilterLandPermanent filter = new FilterLandPermanent("land(s) to untap");
private static final FilterLandPermanent filterAll = new FilterLandPermanent("land(s) to untap");
private static final FilterLandPermanent filterControlled = new FilterLandPermanent("land(s) to untap");
static {
filter.add(TappedPredicate.TAPPED);
filterAll.add(TappedPredicate.TAPPED);
filterControlled.add(TappedPredicate.TAPPED);
filterControlled.add(TargetController.YOU.getControllerPredicate());
}
private final FilterLandPermanent filter;
private final int amount;
private final boolean upTo;
@ -30,16 +35,22 @@ public class UntapLandsEffect extends OneShotEffect {
}
public UntapLandsEffect(int amount, boolean upTo) {
this(amount, upTo, false);
}
public UntapLandsEffect(int amount, boolean upTo, boolean onlyControlled) {
super(Outcome.Untap);
this.amount = amount;
this.upTo = upTo;
staticText = "untap " + (upTo ? "up to " : "") + CardUtil.numberToText(amount, staticText) + " lands";
this.filter = onlyControlled ? filterControlled : filterAll;
staticText = "untap " + (upTo ? "up to " : "") + CardUtil.numberToText(amount, staticText) + " lands" + (onlyControlled ? " you control" : "");
}
public UntapLandsEffect(final UntapLandsEffect effect) {
super(effect);
this.amount = effect.amount;
this.upTo = effect.upTo;
this.filter = effect.filter;
}
@Override