forked from External/mage
Fixed Tel-Jilad Fallen, Protean Hydra, Sword of Body and Mind, Oran-Rief, the Vastwood (Fixed Issue 101)
This commit is contained in:
parent
1fe97cb685
commit
4bd5639573
4 changed files with 7 additions and 2 deletions
|
|
@ -62,7 +62,9 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player != null) {
|
||||
for (int i = 0; i < amount; i++) {
|
||||
// putting cards to grave shouldn't end the game, so getting minimun available
|
||||
int cardsCount = Math.min(amount, player.getLibrary().size());
|
||||
for (int i = 0; i < cardsCount; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null)
|
||||
player.getGraveyard().add(card);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue