mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
Fix Stargaze
This commit is contained in:
parent
f9ba03aba5
commit
19e7436d4e
1 changed files with 11 additions and 5 deletions
|
|
@ -65,11 +65,17 @@ class StargazeEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 2 * xValue));
|
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 2 * xValue));
|
||||||
TargetCard target = new TargetCardInLibrary(Math.max(xValue, cards.size()), StaticFilters.FILTER_CARD);
|
if (cards.size() > xValue) {
|
||||||
player.choose(outcome, cards, target, source, game);
|
TargetCard target = new TargetCardInLibrary(xValue, StaticFilters.FILTER_CARD);
|
||||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);
|
player.choose(outcome, cards, target, source, game);
|
||||||
cards.retainZone(Zone.LIBRARY, game);
|
player.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);
|
||||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
cards.retainZone(Zone.LIBRARY, game);
|
||||||
|
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||||
|
}
|
||||||
|
// If cards.size() < xValue (e.g., x = 3 but library only has 2 cards), just put all cards into hand
|
||||||
|
else {
|
||||||
|
player.moveCards(cards, Zone.HAND, source, game);
|
||||||
|
}
|
||||||
player.loseLife(xValue, game, source, false);
|
player.loseLife(xValue, game, source, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue