mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Fix GameState for partner commanders
This commit is contained in:
@@ -1202,6 +1202,8 @@ public abstract class GameState {
|
|||||||
p.getZone(zt).removeAllCards(true);
|
p.getZone(zt).removeAllCards(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.setCommanders(Lists.newArrayList());
|
||||||
|
|
||||||
Map<ZoneType, CardCollectionView> playerCards = new EnumMap<>(ZoneType.class);
|
Map<ZoneType, CardCollectionView> playerCards = new EnumMap<>(ZoneType.class);
|
||||||
for (Entry<ZoneType, String> kv : cardTexts.entrySet()) {
|
for (Entry<ZoneType, String> kv : cardTexts.entrySet()) {
|
||||||
String value = kv.getValue();
|
String value = kv.getValue();
|
||||||
@@ -1345,7 +1347,9 @@ public abstract class GameState {
|
|||||||
c.setExiledBy(c.getController());
|
c.setExiledBy(c.getController());
|
||||||
} else if (info.startsWith("IsCommander")) {
|
} else if (info.startsWith("IsCommander")) {
|
||||||
c.setCommander(true);
|
c.setCommander(true);
|
||||||
player.setCommanders(Lists.newArrayList(c));
|
List<Card> cmd = Lists.newArrayList(player.getCommanders());
|
||||||
|
cmd.add(c);
|
||||||
|
player.setCommanders(cmd);
|
||||||
} else if (info.startsWith("Id:")) {
|
} else if (info.startsWith("Id:")) {
|
||||||
int id = Integer.parseInt(info.substring(3));
|
int id = Integer.parseInt(info.substring(3));
|
||||||
idToCard.put(id, c);
|
idToCard.put(id, c);
|
||||||
|
|||||||
Reference in New Issue
Block a user