forked from External/mage
Fixes
This commit is contained in:
parent
1c5f20989c
commit
333562f721
3 changed files with 14 additions and 8 deletions
|
|
@ -61,13 +61,14 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
Card card;
|
||||
for (int i = 0; i < amount; i++) {
|
||||
card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null)
|
||||
player.getGraveyard().add(card);
|
||||
else
|
||||
break;
|
||||
if (player != null) {
|
||||
for (int i = 0; i < amount; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null)
|
||||
player.getGraveyard().add(card);
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue