Repository: magefree/mage (2026-04-04T20:00:31Z)

Issue:
1.4.58-V1 Oct 6 build - Ayara Furnace Queen
As per the screenshot, transformed Ayara during main phase 1.  Targeted Noxious Gearhulk (who had died during that first main phase to her sacrifice other side).  Noxious Gearhulk failed to return to the battlefield.  We even tried rolling back and trying again.

<img width="3840" height="2064" alt="Image" src="https://github.com/user-attachments/assets/653e64aa-01d1-4853-99b6-4dd7ade107d6" />


Discussion:

Patch:
diff --git a/Mage.Sets/src/mage/cards/a/AyaraWidowOfTheRealm.java b/Mage.Sets/src/mage/cards/a/AyaraWidowOfTheRealm.java
index 84ca40120a5e..2aec583cde75 100644
--- a/Mage.Sets/src/mage/cards/a/AyaraWidowOfTheRealm.java
+++ b/Mage.Sets/src/mage/cards/a/AyaraWidowOfTheRealm.java
@@ -116,6 +116,7 @@ public boolean apply(Game game, Ability source) {
         if (player == null || card == null) {
             return false;
         }
+        player.moveCards(card, Zone.BATTLEFIELD, source, game);
         Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
         if (permanent == null) {
             return false;


Test patch:
diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/mom/AyaraWidowOfTheRealmTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/mom/AyaraWidowOfTheRealmTest.java
new file mode 100644
index 000000000000..0e26cedcfa74
--- /dev/null
+++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/mom/AyaraWidowOfTheRealmTest.java
@@ -0,0 +1,35 @@
+package org.mage.test.cards.single.mom;
+
+import mage.constants.PhaseStep;
+import mage.constants.Zone;
+import org.junit.Test;
+import org.mage.test.serverside.base.CardTestPlayerBase;
+
+public class AyaraWidowOfTheRealmTest extends CardTestPlayerBase {
+
+    @Test
+    public void testBackside() {
+        addCard(Zone.BATTLEFIELD, playerA, "Ayara, Widow of the Realm");
+        addCard(Zone.GRAVEYARD, playerA, "Noxious Gearhulk");
+        addCard(Zone.BATTLEFIELD, playerB, "Balduvian Bears");
+        addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
+
+        activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{5}");
+        setChoice(playerA, false);
+        addTarget(playerA, "Noxious Gearhulk");
+        setChoice(playerA, true);
+        addTarget(playerA, "Balduvian Bears");
+        attack(1, playerA, "Noxious Gearhulk", playerB);
+
+        setStrictChooseMode(true);
+        setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
+        execute();
+
+        assertPermanentCount(playerA, "Ayara, Furnace Queen", 1);
+        assertExileCount(playerA, "Noxious Gearhulk", 1);
+        assertGraveyardCount(playerB, "Balduvian Bears", 1);
+        assertLife(playerA, 22);
+        assertLife(playerB, 15);
+    }
+
+}