This commit is contained in:
magenoxx 2017-05-15 19:38:07 +03:00
commit 1e8e95fee8
2 changed files with 6 additions and 4 deletions

View file

@ -103,7 +103,7 @@ class VizierOfTheMenagerieTopCardRevealedEffect extends ContinuousEffectImpl {
if (topCard != null) { if (topCard != null) {
MageObject vizierOfTheMenagerie = source.getSourceObject(game); MageObject vizierOfTheMenagerie = source.getSourceObject(game);
if (vizierOfTheMenagerie != null) { 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 if (vizierOfTheMenagerie != null
&& topCard != null) { && topCard != null) {
if (topCard == card if (topCard == card
&& topCard.isCreature()) { && topCard.isCreature()
return controller.cast(topCard.getSpellAbility(), game, false); && game.canPlaySorcery(controller.getId())) {
return true;
} }
} }
} }

View file

@ -2714,6 +2714,7 @@ public abstract class PlayerImpl implements Player, Serializable {
} }
} }
} }
// Check to play revealed cards
for (Cards cards : game.getState().getRevealed().values()) { for (Cards cards : game.getState().getRevealed().values()) {
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, this.getId(), 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)) { for (UUID playerInRangeId : game.getState().getPlayersInRange(getId(), game)) {
Player player = game.getPlayer(playerInRangeId); Player player = game.getPlayer(playerInRangeId);
if (player != null) { if (player != null) {
if (player.isTopCardRevealed() && player.getLibrary().hasCards()) { if (/*player.isTopCardRevealed() &&*/player.getLibrary().hasCards()) {
Card card = player.getLibrary().getFromTop(game); Card card = player.getLibrary().getFromTop(game);
if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, getId(), game)) { if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, getId(), game)) {
for (ActivatedAbility ability : card.getAbilities().getActivatedAbilities(Zone.HAND)) { for (ActivatedAbility ability : card.getAbilities().getActivatedAbilities(Zone.HAND)) {