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

@ -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);