Fix ReturnToHandTargetEffect to work with multiple targets. Implement cards: Churning Eddy, Crackling Club, Hypochondria, and Mortiphobia

This commit is contained in:
LoneFox 2016-01-05 12:38:24 +02:00
parent ec92ee054a
commit df6909e590
5 changed files with 300 additions and 4 deletions

View file

@ -75,10 +75,12 @@ public class ReturnToHandTargetEffect extends OneShotEffect {
return false;
}
Set<Card> cards = new LinkedHashSet<>();
for (UUID targetId : targetPointer.getTargets(game, source)) {
MageObject mageObject = game.getObject(targetId);
if (mageObject instanceof Card) {
cards.add((Card) mageObject);
for (Target target : source.getTargets()) {
for (UUID targetId : target.getTargets()) {
MageObject mageObject = game.getObject(targetId);
if (mageObject instanceof Card) {
cards.add((Card) mageObject);
}
}
}
return controller.moveCards(cards, Zone.HAND, source, game);