mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
* Gather the Pack - Fixed that the second selected card (spell mastery) was not moved to hand.
This commit is contained in:
parent
597d1ab832
commit
df0edb07b7
1 changed files with 4 additions and 5 deletions
|
|
@ -31,7 +31,6 @@ import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.condition.common.SpellMasteryCondition;
|
import mage.abilities.condition.common.SpellMasteryCondition;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.Cards;
|
import mage.cards.Cards;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
|
|
@ -98,10 +97,10 @@ class GatherThePackEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
TargetCard target = new TargetCard(0, max, Zone.LIBRARY, new FilterCreatureCard("creature card" + (max > 1 ? "s" : "") + " to put into your hand"));
|
TargetCard target = new TargetCard(0, max, Zone.LIBRARY, new FilterCreatureCard("creature card" + (max > 1 ? "s" : "") + " to put into your hand"));
|
||||||
if (controller.choose(Outcome.PutCreatureInPlay, cards, target, game)) {
|
if (controller.choose(Outcome.PutCreatureInPlay, cards, target, game)) {
|
||||||
Card card = cards.get(target.getFirstTarget(), game);
|
Cards cardsToHand = new CardsImpl(target.getTargets());
|
||||||
if (card != null) {
|
if (cardsToHand.size() > 0) {
|
||||||
cards.remove(card);
|
cards.removeAll(cardsToHand);
|
||||||
controller.moveCards(card, Zone.LIBRARY, Zone.HAND, source, game);
|
controller.moveCards(cardsToHand, Zone.LIBRARY, Zone.HAND, source, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue