From 703cedaa5ae5bf8c6f5b2df51f11fcd9cd094a71 Mon Sep 17 00:00:00 2001 From: "jeff@delmarus.com" <> Date: Tue, 18 Jan 2022 19:04:01 -0600 Subject: [PATCH] - Fixed #8563 --- Mage.Sets/src/mage/cards/t/TheaterOfHorrors.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Mage.Sets/src/mage/cards/t/TheaterOfHorrors.java b/Mage.Sets/src/mage/cards/t/TheaterOfHorrors.java index 73608f08a99..6fb986eb58e 100644 --- a/Mage.Sets/src/mage/cards/t/TheaterOfHorrors.java +++ b/Mage.Sets/src/mage/cards/t/TheaterOfHorrors.java @@ -95,8 +95,8 @@ class TheaterOfHorrorsCastEffect extends AsThoughEffectImpl { TheaterOfHorrorsCastEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); - staticText = "during your turn, if an opponent lost life this turn, " + - "you may play lands and cast spells from among cards exiled with {this}"; + staticText = "during your turn, if an opponent lost life this turn, " + + "you may play lands and cast spells from among cards exiled with {this}"; } private TheaterOfHorrorsCastEffect(final TheaterOfHorrorsCastEffect effect) { @@ -115,13 +115,20 @@ class TheaterOfHorrorsCastEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + Card theCard = game.getCard(objectId); + if (theCard == null) { + return false; + } + objectId = theCard.getMainCard().getId(); // for split cards and mdfc PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class); - if (watcher != null && game.isActivePlayer(source.getControllerId()) + if (watcher != null + && game.isActivePlayer(source.getControllerId()) && watcher.getAllOppLifeLost(source.getControllerId(), game) > 0 && affectedControllerId.equals(source.getControllerId()) && game.getState().getZone(objectId) == Zone.EXILED) { ExileZone zone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); - return zone != null && zone.contains(objectId); + return zone != null + && zone.contains(objectId); } return false; }