You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug Game.findById relies on forEachCardInGame to locate cards. This checks all the ordinary game zones, but does not check the ZoneType.Merged, which contains components of merged permanents beyond the original one in the battlefield. It also does not check PlayerZoneBattlefield.meldedCards (and in fact, nothing does), which is where secondary components of melded permanents are kept.
To Reproduce
Experimental Undo/Restore enabled.
Illuna, Apex of Wishes as your commander, any nonhuman creature in the battlefield.
Mutate Illuna onto a creature. Placement at top or bottom does not matter.
Resolve the stack.
Or:
Experimental Undo/Restore enabled.
Bruna, the Fading Light as your commander, Gisela, the Broken Blade in the battlefield.
Cast Bruna, the Fading Light.
Proceed to End Step.
Resolve the Meld trigger.
In either case, the engine crashes in GameSnapshot.assignGameState with this stack trace:
Game-0 > java.lang.NullPointerException
at forge.game.player.PlayerView.updateCommanderCast(PlayerView.java:399)
at forge.game.player.Player.incCommanderCast(Player.java:2810)
at forge.game.GameSnapshot.assignGameState(GameSnapshot.java:93)
at forge.game.GameSnapshot.makeCopy(GameSnapshot.java:52)
at forge.game.GameSnapshot.makeCopy(GameSnapshot.java:38)
at forge.game.Game.stashGameState(Game.java:188)
at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:1029)
at forge.game.GameAction.startGame(GameAction.java:2150)
at forge.game.Match.startGame(Match.java:90)
at forge.gamemodes.match.HostedMatch.lambda$startGame$1(HostedMatch.java:269)
Version
Tested on Master in Adventure UI as of e93b130a3631c5f4642330a65f31efa9f3a0e1ca. Few days old, but should still be there unless I overlooked a relevant commit in the last couple days.
Remarks
Might make sense to have the secondary melded cards share the Merged zone as well. Also realized that forEachCardInGame is also missing the extra deck zones.
The text was updated successfully, but these errors were encountered:
Describe the bug
Game.findById
relies onforEachCardInGame
to locate cards. This checks all the ordinary game zones, but does not check theZoneType.Merged
, which contains components of merged permanents beyond the original one in the battlefield. It also does not checkPlayerZoneBattlefield.meldedCards
(and in fact, nothing does), which is where secondary components of melded permanents are kept.To Reproduce
Or:
In either case, the engine crashes in GameSnapshot.assignGameState with this stack trace:
Version
e93b130a3631c5f4642330a65f31efa9f3a0e1ca
. Few days old, but should still be there unless I overlooked a relevant commit in the last couple days.Remarks
Might make sense to have the secondary melded cards share the Merged zone as well. Also realized that
forEachCardInGame
is also missing the extra deck zones.The text was updated successfully, but these errors were encountered: