2013-05-27 01:33:15 -07:00
|
|
|
[
|
|
|
|
new MagicSpellCardEvent() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
|
|
return new MagicEvent(
|
|
|
|
cardOnStack,
|
|
|
|
MagicTargetChoice.NEG_TARGET_NONLAND_PERMANENT,
|
2013-06-30 01:53:17 -07:00
|
|
|
MagicBounceTargetPicker.create(),
|
2013-05-27 01:33:15 -07:00
|
|
|
this,
|
|
|
|
"Return target nonland permanent\$ and all other " +
|
|
|
|
"permanents with the same name as that permanent " +
|
|
|
|
"to their owners' hands."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
|
|
public void doAction(final MagicPermanent targetPermanent) {
|
2013-06-23 18:29:26 -07:00
|
|
|
final MagicTargetFilter<MagicPermanent> targetFilter =
|
2013-05-27 01:33:15 -07:00
|
|
|
new MagicTargetFilter.NameTargetFilter(targetPermanent.getName());
|
2013-06-23 18:29:26 -07:00
|
|
|
final Collection<MagicPermanent> targets =
|
2013-05-27 01:33:15 -07:00
|
|
|
game.filterPermanents(event.getPlayer(),targetFilter);
|
|
|
|
for (final MagicPermanent target : targets) {
|
|
|
|
game.doAction(new MagicRemoveFromPlayAction(
|
|
|
|
target,
|
|
|
|
MagicLocationType.OwnersHand
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|