Fixed ReturnFromExileEffect, some formatting.

This commit is contained in:
LevelX2 2014-04-25 19:27:08 +02:00
parent 3842aeba7d
commit 61add5ab5b
4 changed files with 27 additions and 24 deletions

View file

@ -88,24 +88,27 @@ public class ReturnFromExileEffect extends OneShotEffect<ReturnFromExileEffect>
exile = exile.copy();
for (UUID cardId: exile) {
Card card = game.getCard(cardId);
switch (zone) {
case BATTLEFIELD:
controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId(), tapped);
break;
case HAND:
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
break;
case GRAVEYARD:
controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.EXILED);
break;
case LIBRARY:
controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.EXILED, true);
break;
default:
card.moveToZone(zone, source.getSourceId(), game, tapped);
game.informPlayers(new StringBuilder(controller.getName()).append(" moves ").append(card.getName()).append(" to ").append(zone.toString()).toString());
Player owner = game.getPlayer(card.getOwnerId());
if (owner != null) {
switch (zone) {
case BATTLEFIELD:
card.moveToZone(zone, source.getSourceId(), game, tapped);
game.informPlayers(new StringBuilder(controller.getName()).append(" moves ").append(card.getName()).append(" to ").append(zone.toString()).toString());
break;
case HAND:
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
break;
case GRAVEYARD:
controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.EXILED);
break;
case LIBRARY:
controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.EXILED, true);
break;
default:
card.moveToZone(zone, source.getSourceId(), game, tapped);
game.informPlayers(new StringBuilder(controller.getName()).append(" moves ").append(card.getName()).append(" to ").append(zone.toString()).toString());
}
}
}
game.getExile().getExileZone(exileId).clear();
return true;

View file

@ -52,7 +52,7 @@ public enum CardRepository {
private static final String JDBC_URL = "jdbc:sqlite:db/cards.db";
private static final String VERSION_ENTITY_NAME = "card";
private static final long CARD_DB_VERSION = 29;
private static final long CARD_DB_VERSION = 30;
private final Random random = new Random();
private Dao<CardInfo, Object> cardDao;