Skip to content

Commit b814837

Browse files
authored
Mana abilities should be controlled by their activator (#14382)
Per rule 113.8, the controller of an activated ability on the stack is the player who activated it. Combined with rule 109.4a which states that the controller of a mana ability is determined as if it was on the stack, this means that we should apply all logic to mana abilities in the same way as we do activated abilities on the stack, such as setting their controller. Co-authored-by: matoro <matoro@users.noreply.github.com>
1 parent bb85ccc commit b814837

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

Mage.Tests/src/test/java/org/mage/test/cards/mana/NonTappingManaAbilitiesTest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.mage.test.cards.mana;
22

33
import mage.abilities.mana.ManaOptions;
4+
import mage.constants.ManaType;
45
import mage.constants.PhaseStep;
56
import mage.constants.Zone;
67
import mage.counters.CounterType;
@@ -308,6 +309,25 @@ public void Test_ManaCacheOpponent() {
308309
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
309310
assertManaOptions("{C}{C}", manaOptions);
310311
}
312+
313+
@Test
314+
public void Test_ManaCacheActivate() {
315+
setStrictChooseMode(true);
316+
317+
addCard(Zone.BATTLEFIELD, playerA, "Upwelling");
318+
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
319+
320+
// At the beginning of each player's end step, put a charge counter on Mana Cache for each untapped land that player controls.
321+
// Remove a charge counter from Mana Cache: Add {C}. Any player may activate this ability but only during their turn before the end step.
322+
addCard(Zone.BATTLEFIELD, playerA, "Mana Cache", 1);
323+
324+
activateManaAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Remove a charge counter");
325+
326+
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
327+
execute();
328+
329+
assertManaPool(playerB, ManaType.COLORLESS, 1);
330+
}
311331

312332
@Test
313333
public void testAvailableManaWithSpiritGuides() {

Mage/src/main/java/mage/players/PlayerImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,10 @@ private ApprovingObjectResult chooseApprovingObject(Game game, List<ApprovingObj
15171517

15181518
protected boolean playManaAbility(ActivatedManaAbilityImpl ability, Game game) {
15191519
int bookmark = game.bookmarkState();
1520+
//20260116 - 109.4a
1521+
//The controller of a mana ability is determined as though it were on the stack.
1522+
ability.newId();
1523+
ability.setControllerId(playerId);
15201524
if (ability.activate(game, false) && ability.resolve(game)) {
15211525
if (ability.isUndoPossible()) {
15221526
if (storedBookmark == -1 || storedBookmark > bookmark) { // e.g. useful for undo Nykthos, Shrine to Nyx

0 commit comments

Comments
 (0)