mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
Fixes from LevelX's review
This commit is contained in:
parent
79fe0d98f3
commit
fd6d89ae0b
3 changed files with 13 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue