Fixed not correct used removeFromTop(game).

This commit is contained in:
magenoxx 2011-05-26 00:51:40 +04:00
parent 334bd6b309
commit 1fa084fad0
4 changed files with 15 additions and 10 deletions

View file

@ -88,10 +88,11 @@ class GrindclockEffect extends OneShotEffect<GrindclockEffect> {
Card card;
for (int i = 0; i < amount; i++) {
card = player.getLibrary().removeFromTop(game);
if (card != null)
player.getGraveyard().add(card);
else
if (card != null) {
card.moveToZone(Zone.GRAVEYARD, source.getId(), game, false);
} else {
break;
}
}
return true;
}

View file

@ -32,6 +32,7 @@ import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -86,10 +87,11 @@ class TraumatizeEffect extends OneShotEffect<TraumatizeEffect> {
int amount = player.getLibrary().size() / 2;
for (int i = 0; i < amount; i++) {
card = player.getLibrary().removeFromTop(game);
if (card != null)
player.getGraveyard().add(card);
else
if (card != null) {
card.moveToZone(Zone.GRAVEYARD, source.getId(), game, false);
} else {
break;
}
}
return true;
}

View file

@ -212,10 +212,11 @@ class JaceTheMindSculptorEffect3 extends OneShotEffect<JaceTheMindSculptorEffect
break;
Card card = player.getLibrary().removeFromTop(game);
exile.add(card);
game.setZone(card.getId(), Zone.EXILED);
}
for (Card card : player.getHand().getCards(game)) {
card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
}
player.getLibrary().addAll(player.getHand().getCards(game), game);
player.getLibrary().shuffle();
player.getHand().clear();
return true;
}
return false;

View file

@ -29,6 +29,7 @@
package mage.abilities.effects.common;
import mage.Constants.Outcome;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -67,7 +68,7 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
for (int i = 0; i < cardsCount; i++) {
Card card = player.getLibrary().removeFromTop(game);
if (card != null)
player.getGraveyard().add(card);
card.moveToZone(Zone.GRAVEYARD, source.getId(), game, false);
else
break;
}