* Fixed a lot of cards where hand or graveyard cards were moved to library without firing zone change events.

This commit is contained in:
LevelX2 2015-05-07 00:47:26 +02:00
parent 27d4e9fc37
commit 3afd378c2d
21 changed files with 126 additions and 74 deletions

View file

@ -35,7 +35,9 @@ import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileSpellEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
@ -80,11 +82,13 @@ class TimeReversalEffect 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);
}
}