mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Fix ReturnToHandTargetEffect to work with multiple targets. Implement cards: Churning Eddy, Crackling Club, Hypochondria, and Mortiphobia
This commit is contained in:
parent
ec92ee054a
commit
df6909e590
5 changed files with 300 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue