* Timetwister - Fixed that card moving of Timetwister did not allow to move a commander in the command zone.

This commit is contained in:
LevelX2 2015-04-19 23:34:49 +02:00
parent 5edf91fd5d
commit f4166ac3b3

View file

@ -30,10 +30,12 @@ package mage.sets.limitedalpha;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
@ -81,14 +83,23 @@ class TimetwisterEffect extends OneShotEffect {
for (UUID playerId: sourcePlayer.getInRange()) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.getLibrary().addAll(player.getHand().getCards(game), game);
player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
for (Card card: player.getHand().getCards(game)) {
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
}
for (Card card: player.getGraveyard().getCards(game)) {
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
}
player.shuffleLibrary(game);
player.getHand().clear();
player.getGraveyard().clear();
player.drawCards(7, game);
}
}
game.getState().handleSimultaneousEvent(game); // needed here so state based triggered effects
for (UUID playerId: sourcePlayer.getInRange()) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.drawCards(7, game);
}
}
return true;
}