Small fix for willpower leveling

This commit is contained in:
2025-11-17 11:22:14 +01:00
parent ccfecb4317
commit bce2349dce
2 changed files with 15 additions and 3 deletions
@@ -49,8 +49,14 @@ public class TempoCapability implements ITempo {
}
public void setBonusMaxTempo(float bonusMaxTempo) {
int oldMax = getMaxTempo();
this.bonusMaxTempo = Math.max(0f, bonusMaxTempo);
setTempo(this.tempo);
int newMax = getMaxTempo();
if (oldMax > 0) {
float pct = (float) tempo / (float) oldMax;
tempo = Math.round(pct * newMax);
}
setTempo(tempo);
}
public float getBonusMaxTempo() {