From 92a4f41b2b8617d64e7bd46a68426a2359647fb4 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:04:16 +0200 Subject: [PATCH] fire EXPLORED event after the exploring is done --- .../abilities/effects/keyword/ExploreSourceEffect.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java index 29fcbb73595..e0bf71de8bb 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java @@ -70,7 +70,10 @@ public class ExploreSourceEffect extends OneShotEffect { } for (int i = 0; i < amount; ++i) { - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EXPLORED, permanentId, source, permanent.getControllerId())); + // 701.40a Certain abilities instruct a permanent to explore. To do so, that permanent’s controller reveals + // the top card of their library. If a land card is revealed this way, that player puts that card into their + // hand. Otherwise, that player puts a +1/+1 counter on the exploring permanent and may put the revealed + // card into their graveyard. Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.revealCards("Explored card", new CardsImpl(card), game); @@ -89,6 +92,10 @@ public class ExploreSourceEffect extends OneShotEffect { // the exploring creature receives a +1/+1 counter. addCounter(game, permanent, source); } + + // 701.40b A permanent “explores” after the process described in rule 701.40a is complete, even if some or all of + // those actions were impossible. + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EXPLORED, permanentId, source, permanent.getControllerId())); } return true; }