Fix monolith crash at floor 20

This commit is contained in:
Melledy
2025-11-30 23:33:05 -08:00
parent 585734c2f3
commit 56b4d3b66d

View File

@@ -228,7 +228,7 @@ public class StarTowerGame {
}
public int levelUp(int picks) {
if (this.teamExp >= this.nextLevelExp) {
if (this.teamExp >= this.nextLevelExp && this.nextLevelExp != Integer.MAX_VALUE) {
// Level up
this.teamLevel++;
@@ -239,7 +239,12 @@ public class StarTowerGame {
this.teamExp = this.teamExp - this.nextLevelExp;
// Update next level exp
this.nextLevelExp = GameData.getStarTowerTeamExpDataTable().get(this.teamLevel + 1).getNeedExp();
var teamExpData = GameData.getStarTowerTeamExpDataTable().get(this.teamLevel + 1);
if (teamExpData != null) {
this.nextLevelExp = teamExpData.getNeedExp();
} else {
this.nextLevelExp = Integer.MAX_VALUE;
}
// Re-check and continue processing if we still got exp
if (this.teamExp > 0) {
@@ -670,9 +675,9 @@ public class StarTowerGame {
var hawkerCase = new StarTowerCase(CaseType.Hawker);
// TODO
for (int i = 0; i < 8; i++) {
hawkerCase.addGoods(new StarTowerShopGoods(1, 1, 200));
hawkerCase.addGoods(new StarTowerShopGoods(1, 1, 200));
hawkerCase.addGoods(new StarTowerShopGoods(1, 1, 200));
}
this.addCase(room.getMutableCases(), hawkerCase);
}