mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Nesting Grounds can't target the same permanent twice
This commit is contained in:
parent
3d3d9b6a97
commit
27a351e92b
1 changed files with 12 additions and 2 deletions
|
@ -17,10 +17,12 @@ import mage.counters.Counter;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -40,8 +42,16 @@ 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.
|
// {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 ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new NestingGroundsEffect(), new GenericManaCost(1));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetPermanent(new FilterControlledPermanent("permanent to remove counter from")));
|
TargetControlledPermanent target1 = new TargetControlledPermanent(new FilterControlledPermanent("permanent to remove counter from"));
|
||||||
ability.addTarget(new TargetPermanent(new FilterPermanent("permanent to put counter on")));
|
target1.setTargetTag(1);
|
||||||
|
ability.addTarget(target1);
|
||||||
|
|
||||||
|
FilterPermanent filter = new FilterPermanent("permanent to put counter on");
|
||||||
|
filter.add(new AnotherTargetPredicate(2));
|
||||||
|
TargetPermanent target2 = new TargetPermanent(filter);
|
||||||
|
target2.setTargetTag(2);
|
||||||
|
ability.addTarget(target2);
|
||||||
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue