Fix missing ProcessAction between the last mana being paid and the spell being cast. (#13396)

This is necessary so that, among other things, the Rain of Riches watcher can see that the last mana of a spell was a Treasure before the spell is cast - at which point it needs to already have Cascade.
This commit is contained in:
Grath 2025-03-14 20:45:15 -04:00 committed by GitHub
parent ba397f3278
commit a9bffe4d25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View file

@ -2,7 +2,6 @@ package org.mage.test.cards.single.ncc;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Ignore;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
@ -63,7 +62,6 @@ public class RainOfRichesTest extends CardTestPlayerBase {
}
@Test
@Ignore("Does not work until actions are processed between the last mana being paid and the spell being cast.")
public void test_Cast_Two_Using_Treasures() {
setStrictChooseMode(true);
skipInitShuffling();
@ -91,7 +89,6 @@ public class RainOfRichesTest extends CardTestPlayerBase {
}
@Test
@Ignore("Does not work until actions are processed between the last mana being paid and the spell being cast.")
public void test_Cast_SomethingElse_Then_Cast_Using_Treasure() {
setStrictChooseMode(true);

View file

@ -1346,6 +1346,7 @@ public abstract class PlayerImpl implements Player, Serializable {
castEvent.setZone(fromZone);
game.fireEvent(castEvent);
if (spell.activate(game, allowedIdentifiers, noMana)) {
game.processAction();
GameEvent castedEvent = GameEvent.getEvent(GameEvent.EventType.SPELL_CAST,
ability.getId(), ability, playerId, approvingObject);
castedEvent.setZone(fromZone);