mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
Fixed ReturnFromExileEffect, some formatting.
This commit is contained in:
parent
3842aeba7d
commit
61add5ab5b
4 changed files with 27 additions and 24 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue