Fixes from LevelX's review

This commit is contained in:
LoneFox 2015-06-20 21:21:32 +03:00
parent 79fe0d98f3
commit fd6d89ae0b
3 changed files with 13 additions and 22 deletions

View file

@ -31,7 +31,9 @@ package mage.abilities.costs.common;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.CostImpl;
import mage.cards.Card;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Library;
import mage.players.Player;
@ -70,10 +72,11 @@ public class ExileFromTopOfLibraryCost extends CostImpl {
Player controller = game.getPlayer(controllerId);
if(controller != null) {
Library library = controller.getLibrary();
Cards cards = new CardsImpl();
for(int i = 0; i < amount; i++) {
Card card = library.removeFromTop(game);
card.moveToExile(null, null, sourceId, game);
cards.add(library.removeFromTop(game));
}
controller.moveCards(cards, Zone.LIBRARY, Zone.EXILED, ability, game);
paid = true;
}
return paid;