Leech Bonder - improved targeting;

This commit is contained in:
Oleg Agafonov 2020-04-19 01:41:56 +04:00
parent 5ec6e65c72
commit b0d3ad6846
2 changed files with 14 additions and 3 deletions

View file

@ -19,6 +19,7 @@ import mage.constants.Zone;
import mage.counters.Counter;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -47,8 +48,17 @@ public final class LeechBonder extends CardImpl {
// {U}, {untap}: Move a counter from target creature onto another target creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LeechBonderEffect(), new ManaCostsImpl("{U}"));
ability.addCost(new UntapSourceCost());
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature to remove counter from")));
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature to put counter on")));
// target 1
TargetCreaturePermanent target1 = new TargetCreaturePermanent(new FilterCreaturePermanent("creature to remove counter from"));
target1.setTargetTag(1);
ability.addTarget(target1);
// target 2
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature to put counter on");
filter.add(new AnotherTargetPredicate(2));
TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter);
target2.setTargetTag(2);
ability.addTarget(target2);
this.addAbility(ability);
}

View file

@ -42,10 +42,11 @@ public final class NestingGrounds extends CardImpl {
// {1}, {T}: Move a counter from target permanent you control onto another target permanent. Activate this ability only any time you could cast a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new NestingGroundsEffect(), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
// target 1
TargetControlledPermanent target1 = new TargetControlledPermanent(new FilterControlledPermanent("permanent to remove counter from"));
target1.setTargetTag(1);
ability.addTarget(target1);
// target 2
FilterPermanent filter = new FilterPermanent("permanent to put counter on");
filter.add(new AnotherTargetPredicate(2));
TargetPermanent target2 = new TargetPermanent(filter);