From bb1a63ea4819908e92e99ee161706493feb7a82b Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Wed, 27 Jan 2021 07:52:56 -0600 Subject: [PATCH] Gonti & Thief of Sanity - Do not allow to play land half of MDFCs --- Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java | 15 ++++++++------- Mage.Sets/src/mage/cards/t/ThiefOfSanity.java | 14 ++++++++------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java b/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java index 0aac4c651fd..ca20f6e12bc 100644 --- a/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java +++ b/Mage.Sets/src/mage/cards/g/GontiLordOfLuxury.java @@ -147,21 +147,22 @@ class GontiLordOfLuxuryCastFromExileEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + UUID targetId = getTargetPointer().getFirst(game, source); + if (targetId == null) { + this.discard(); // card is no longer in the origin zone, effect can be discarded + return false; + } Card theCard = game.getCard(objectId); - if (theCard == null) { + if (theCard == null || theCard.isLand()) { return false; } objectId = theCard.getMainCard().getId(); // for split cards - UUID targetId = getTargetPointer().getFirst(game, source); - if (targetId == null) { - this.discard(); - } else if (objectId.equals(targetId) + if (objectId.equals(targetId) && affectedControllerId.equals(source.getControllerId())) { Card card = game.getCard(objectId); // TODO: Allow to cast Zoetic Cavern face down - return card != null - && !card.isLand(); + return card != null; } return false; } diff --git a/Mage.Sets/src/mage/cards/t/ThiefOfSanity.java b/Mage.Sets/src/mage/cards/t/ThiefOfSanity.java index 4d4ec269dff..69478078a88 100644 --- a/Mage.Sets/src/mage/cards/t/ThiefOfSanity.java +++ b/Mage.Sets/src/mage/cards/t/ThiefOfSanity.java @@ -147,20 +147,22 @@ class ThiefOfSanityCastFromExileEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + UUID cardId = getTargetPointer().getFirst(game, source); + if (cardId == null) { + this.discard(); // card is no longer in the origin zone, effect can be discarded + return false; + } Card theCard = game.getCard(objectId); - if (theCard == null) { + if (theCard == null || theCard.isLand()) { return false; } objectId = theCard.getMainCard().getId();// for split cards - UUID cardId = getTargetPointer().getFirst(game, source); - if (cardId == null) { - this.discard(); // card is no longer in the origin zone, effect can be discarded - } else if (objectId.equals(cardId) + if (objectId.equals(cardId) && affectedControllerId.equals(authorizedPlayerId)) { Card card = game.getCard(objectId); // TODO: Allow to cast Zoetic Cavern face down - return card != null && !card.isLand(); + return card != null; } return false; }