Fix discs surging to max crescendo regardless of materials used

This commit is contained in:
Melledy
2025-12-09 21:28:53 -08:00
parent c5f339c8be
commit bf5fe3912f

View File

@@ -245,9 +245,11 @@ public class GameDisc implements GameDatabaseObject {
// Remove items // Remove items
var change = this.getPlayer().getInventory().removeItems(materials, null); var change = this.getPlayer().getInventory().removeItems(materials, null);
// Add star // Cache old star value
int old = this.star; int old = this.star;
this.star = Math.max(this.star + count, 5);
// Add star
this.star = Math.min(this.star + count, 5);
// Save to database if star count changed // Save to database if star count changed
if (this.star != old) { if (this.star != old) {