- Add GameState support for unlocked doors. (#6426)

- Add puzzle PS_DSK3.
This commit is contained in:
Agetian
2024-10-24 20:01:43 +03:00
committed by GitHub
parent d92cacae7f
commit a6ccbe0f1d
2 changed files with 26 additions and 0 deletions

View File

@@ -436,6 +436,13 @@ public abstract class GameState {
}
}
if (!c.getUnlockedRooms().isEmpty()) {
for (CardStateName stateName : c.getUnlockedRooms()) {
newText.append("|UnlockedRoom:");
newText.append(stateName.name());
}
}
cardTexts.put(zoneType, newText.toString());
}
@@ -1401,6 +1408,8 @@ public abstract class GameState {
c.setGamePieceType(GamePieceType.TOKEN);
} else if (info.startsWith("ClassLevel:")) {
c.setClassLevel(Integer.parseInt(info.substring(info.indexOf(':') + 1)));
} else if (info.startsWith("UnlockedRoom:")) {
c.unlockRoom(c.getController(), CardStateName.smartValueOf(info.substring(info.indexOf(':') + 1)));
}
}