Skip to content

Commit f78bd29

Browse files
Fix multiplayer freeze when casting spells with non-mana optional costs (#10277)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0bd53c9 commit f78bd29

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

forge-game/src/main/java/forge/game/cost/CostPartWithList.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ public abstract class CostPartWithList extends CostPart {
3535

3636
private boolean intrinsic = true;
3737

38-
protected final CardZoneTable table = new CardZoneTable();
38+
// transient: only used server-side during cost payment, never needed by the client.
39+
// CardZoneTable is not Serializable and must not enter the network serialization graph.
40+
protected transient CardZoneTable table = new CardZoneTable();
41+
42+
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
43+
in.defaultReadObject();
44+
table = new CardZoneTable();
45+
}
3946

4047
public final CardCollectionView getLKIList() {
4148
return lkiList;

0 commit comments

Comments
 (0)