mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Timetwister - Fixed that card moving of Timetwister did not allow to move a commander in the command zone.
This commit is contained in:
parent
5edf91fd5d
commit
f4166ac3b3
1 changed files with 16 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue