Implement bonus max potential level

This commit is contained in:
Melledy
2025-12-03 21:28:47 -08:00
parent ef8846445c
commit c8a7db75aa
4 changed files with 37 additions and 5 deletions
@@ -140,8 +140,7 @@ public class StarTowerBuild implements GameDatabaseObject {
var data = GameData.getPotentialDataTable().get(potential.getIntKey());
if (data == null) continue;
int index = potential.getIntValue() - 1;
this.score += data.getBuildScore()[index];
this.score += data.getBuildScore(potential.getIntValue());
}
// Sub note skills
@@ -353,7 +353,7 @@ public class StarTowerGame {
// Clamp level
int curLevel = getPotentials().get(id);
int nextLevel = Math.min(curLevel + count, potentialData.getMaxLevel());
int nextLevel = Math.min(curLevel + count, potentialData.getMaxLevel(this));
// Sanity
count = nextLevel - curLevel;
@@ -529,7 +529,7 @@ public class StarTowerGame {
// Check max level
int level = item.getIntValue();
if (level >= potential.getMaxLevel()) {
if (level >= potential.getMaxLevel(this)) {
continue;
}
@@ -16,6 +16,9 @@ public class StarTowerModifiers {
private boolean freeStrengthen;
private int strengthenDiscount;
// Bonus max potential level
private int bonusMaxPotentialLevel;
public StarTowerModifiers(StarTowerGame game) {
this.game = game;
@@ -27,9 +30,17 @@ public class StarTowerModifiers {
if (this.hasGrowthNode(30402)) {
this.strengthenDiscount += 60;
} else if (this.hasGrowthNode(30102)) {
}
if (this.hasGrowthNode(30102)) {
this.strengthenDiscount += 30;
}
// Bonus max level
if (this.hasGrowthNode(30301)) {
this.bonusMaxPotentialLevel = 6;
} else if (this.hasGrowthNode(20601)) {
this.bonusMaxPotentialLevel = 4;
}
}
public boolean hasGrowthNode(int nodeId) {