From f0ae098b2e55253d75c48414c07f4a4236a0f0ce Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Mon, 27 Sep 2021 16:33:43 -0500 Subject: [PATCH] [AFR] Fixed Monk Class level 3 interaction with MDFCs and lands --- Mage.Sets/src/mage/cards/m/MonkClass.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/MonkClass.java b/Mage.Sets/src/mage/cards/m/MonkClass.java index 48e52376304..f756912b88f 100644 --- a/Mage.Sets/src/mage/cards/m/MonkClass.java +++ b/Mage.Sets/src/mage/cards/m/MonkClass.java @@ -23,6 +23,7 @@ import mage.game.Game; import mage.players.Player; import mage.target.common.TargetNonlandPermanent; import mage.target.targetpointer.FixedTarget; +import mage.util.CardUtil; import mage.watchers.common.SpellsCastWatcher; import java.util.UUID; @@ -134,12 +135,13 @@ class MonkClassCastEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { - if (!sourceId.equals(source.getSourceId()) || !source.isControlledBy(affectedControllerId)) { + UUID mainCardId = CardUtil.getMainCardId(game, sourceId); + if (!mainCardId.equals(source.getSourceId()) || !source.isControlledBy(affectedControllerId)) { return false; } - Card card = game.getCard(source.getSourceId()); + Card card = game.getCard(sourceId); SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class); - return card != null && watcher != null + return card != null && watcher != null && !card.isLand(game) && watcher.getSpellsCastThisTurn(affectedControllerId).size() > 0; }