From 390834a0d7b69ac36cb1494fa21aa74d74a18fca Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 15 May 2017 16:41:47 +0200 Subject: [PATCH] * Vizier of the Menagerie - Fixed that the cards from library could be cast at instant speed (fixes #3300). --- Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java | 7 ++++--- Mage/src/main/java/mage/players/PlayerImpl.java | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java b/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java index e0f028c991..8c890f679d 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java @@ -103,7 +103,7 @@ class VizierOfTheMenagerieTopCardRevealedEffect extends ContinuousEffectImpl { if (topCard != null) { MageObject vizierOfTheMenagerie = source.getSourceObject(game); if (vizierOfTheMenagerie != null) { - controller.lookAtCards("Top card of " + vizierOfTheMenagerie.getLogName() + " controller's library", topCard, game); + controller.lookAtCards("Top card of " + vizierOfTheMenagerie.getIdName() + " controller's library", topCard, game); } } } @@ -149,8 +149,9 @@ class VizierOfTheMenagerieTopCardCastEffect extends AsThoughEffectImpl { if (vizierOfTheMenagerie != null && topCard != null) { if (topCard == card - && topCard.isCreature()) { - return controller.cast(topCard.getSpellAbility(), game, false); + && topCard.isCreature() + && game.canPlaySorcery(controller.getId())) { + return true; } } } diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 7e8bde2072..e123c57554 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -2714,6 +2714,7 @@ public abstract class PlayerImpl implements Player, Serializable { } } } + // Check to play revealed cards for (Cards cards : game.getState().getRevealed().values()) { for (Card card : cards.getCards(game)) { if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, this.getId(), game)) { @@ -2729,7 +2730,7 @@ public abstract class PlayerImpl implements Player, Serializable { for (UUID playerInRangeId : game.getState().getPlayersInRange(getId(), game)) { Player player = game.getPlayer(playerInRangeId); if (player != null) { - if (player.isTopCardRevealed() && player.getLibrary().hasCards()) { + if (/*player.isTopCardRevealed() &&*/player.getLibrary().hasCards()) { Card card = player.getLibrary().getFromTop(game); if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, getId(), game)) { for (ActivatedAbility ability : card.getAbilities().getActivatedAbilities(Zone.HAND)) {