Merge pull request #3261 from ingmargoudt/fix_cyclediscardwatcher

fix for shadow of the grave
This commit is contained in:
LevelX2 2017-04-28 11:04:24 +02:00 committed by GitHub
commit 7f1da83783
2 changed files with 9 additions and 11 deletions

View file

@ -86,12 +86,11 @@ class ShadowOfTheGraveEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
CardsCycledOrDiscardedThisTurnWatcher watcher = (CardsCycledOrDiscardedThisTurnWatcher) game.getState().getWatchers().get("CardsCycledOrDiscardedThisTurnWatcher");
if (controller != null
&& watcher != null
&& watcher.getCardsCycledOrDiscardedThisTurn(controller.getId()) != null) {
&& watcher != null) {
for (Card card : watcher.getCardsCycledOrDiscardedThisTurn(controller.getId()).getCards(game)) {
if (card != null
&& game.getState().getZone(card.getId()) == Zone.GRAVEYARD //must come from their graveyard
&& card.getOwnerId() == controller.getId()) { //confirm ownership
&& card.getOwnerId().equals(controller.getId())) { //confirm ownership
controller.moveCardToHandWithInfo(card, source.getId(), game, true);
}
}