From b0d3ad6846e7d1e9404dc72267b5bb403483da18 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 19 Apr 2020 01:41:56 +0400 Subject: [PATCH] Leech Bonder - improved targeting; --- Mage.Sets/src/mage/cards/l/LeechBonder.java | 14 ++++++++++++-- Mage.Sets/src/mage/cards/n/NestingGrounds.java | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/l/LeechBonder.java b/Mage.Sets/src/mage/cards/l/LeechBonder.java index 63e48879ae..7b7b48d3b7 100644 --- a/Mage.Sets/src/mage/cards/l/LeechBonder.java +++ b/Mage.Sets/src/mage/cards/l/LeechBonder.java @@ -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); } diff --git a/Mage.Sets/src/mage/cards/n/NestingGrounds.java b/Mage.Sets/src/mage/cards/n/NestingGrounds.java index 6302b09b37..5a568efe2d 100644 --- a/Mage.Sets/src/mage/cards/n/NestingGrounds.java +++ b/Mage.Sets/src/mage/cards/n/NestingGrounds.java @@ -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);