From ede16deca1876c117a88345de0c408f9934bb80d Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 15 Jul 2014 17:21:42 +0200 Subject: [PATCH] * Descent into Madness - Fixed handling if no longer on battlefield if effect resolves. --- .../src/mage/sets/avacynrestored/DescentIntoMadness.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/avacynrestored/DescentIntoMadness.java b/Mage.Sets/src/mage/sets/avacynrestored/DescentIntoMadness.java index eb497d0c2ea..4418e51d3e6 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/DescentIntoMadness.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/DescentIntoMadness.java @@ -110,9 +110,14 @@ class DescentIntoMadnessEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent != null && controller != null) { sourcePermanent.addCounters(CounterType.DESPAIR.createInstance(), game); + } + if (sourcePermanent == null) { + sourcePermanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + } + if (sourcePermanent != null && controller != null) { int count = sourcePermanent.getCounters().getCount(CounterType.DESPAIR); if (count > 0) { // select the permanents and hand cards in turn order