Some more rework of player.moveCard (mainly to graveyard).

This commit is contained in:
LevelX2 2015-05-23 15:35:40 +02:00
parent 039c4f22a6
commit ce64a22c15
79 changed files with 490 additions and 653 deletions

View file

@ -74,9 +74,7 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(targetPointer.getFirst(game, source));
if (player != null) {
// putting cards to grave shouldn't end the game, so getting minimun available
int cardsCount = Math.min(amount.calculate(game, source, this), player.getLibrary().size());
player.moveCardsToGraveyardWithInfo(player.getLibrary().getTopCards(game, cardsCount), source, game, Zone.LIBRARY);
player.moveCards(player.getLibrary().getTopCards(game, amount.calculate(game, source, this)), Zone.LIBRARY, Zone.GRAVEYARD, source, game);
return true;
}
return false;