Fixed Tel-Jilad Fallen, Protean Hydra, Sword of Body and Mind, Oran-Rief, the Vastwood (Fixed Issue 101)

This commit is contained in:
magenoxx 2011-05-13 17:49:26 +04:00
parent 1fe97cb685
commit 4bd5639573
4 changed files with 7 additions and 2 deletions

View file

@ -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);