mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fix dev mode restoring game state with counters (e.g. planeswalker loyalty).
This commit is contained in:
@@ -240,10 +240,15 @@ public abstract class GameState {
|
||||
}
|
||||
boolean tapped = c.isTapped();
|
||||
boolean sickness = c.hasSickness();
|
||||
Map<CounterType, Integer> counters = c.getCounters();
|
||||
// Note: Not clearCounters() since we want to keep the counters
|
||||
// var as-is.
|
||||
c.setCounters(new HashMap<CounterType, Integer>());
|
||||
p.getZone(ZoneType.Hand).add(c);
|
||||
p.getGame().getAction().moveToPlay(c);
|
||||
c.setTapped(tapped);
|
||||
c.setSickness(sickness);
|
||||
c.setCounters(counters);
|
||||
}
|
||||
} else {
|
||||
zone.setCards(kv.getValue());
|
||||
|
||||
Reference in New Issue
Block a user