From fad8a3139593afed73877df988e7ff146163fbb3 Mon Sep 17 00:00:00 2001 From: spjspj Date: Sun, 9 Jul 2017 02:20:14 +1000 Subject: [PATCH] Fix for Solemnity (tested with Dark Depths, Ichor Rats, Sunset Pyramid, Crystalline Crawler, Infect combat damage) --- Mage.Sets/src/mage/cards/s/Solemnity.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/Solemnity.java b/Mage.Sets/src/mage/cards/s/Solemnity.java index bb410cc4d2..ce26d0595c 100644 --- a/Mage.Sets/src/mage/cards/s/Solemnity.java +++ b/Mage.Sets/src/mage/cards/s/Solemnity.java @@ -139,14 +139,21 @@ class SolemnityEffect2 extends ReplacementEffectImpl { @Override public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.ADD_COUNTER; + return event.getType() == EventType.ADD_COUNTER || event.getType() == EventType.ADD_COUNTERS; } @Override public boolean applies(GameEvent event, Ability source, Game game) { MageObject object = game.getObject(event.getTargetId()); - if (object instanceof Permanent && filter.match((Permanent) object, game)) { - return true; + Permanent permanent = game.getPermanentEntering(event.getSourceId()); + if (object != null && object instanceof Permanent) { + if (filter.match((Permanent) object, game)) { + return true; + } + } else if (permanent != null) { + if (filter.match(permanent, game)) { + return true; + } } return false; }