Lowered break chance for items.

This commit is contained in:
Storm Dragon
2026-02-05 21:15:53 -05:00
parent 11c64625cc
commit 055e441e1b
3 changed files with 7 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ bool is_daytime = true;
bool sun_setting_warned = false;
bool sunrise_warned = false;
int playerItemBreakChance = PLAYER_ITEM_BREAK_CHANCE_MIN;
float playerItemBreakChance = PLAYER_ITEM_BREAK_CHANCE_MIN;
int playerItemBreaksToday = 0;
bool playerItemBreakPending = false;
int playerItemBreakPendingType = -1;
@@ -124,7 +124,8 @@ void attempt_player_item_break_check() {
if (breakableItems.length() == 0) return;
int roll = random(1, 100);
if (roll <= playerItemBreakChance) {
int checkChance = int(playerItemBreakChance); // Floor for comparison
if (roll <= checkChance) {
int pickIndex = random(0, int(breakableItems.length()) - 1);
int itemType = breakableItems[pickIndex];
playerItemBreakChance = PLAYER_ITEM_BREAK_CHANCE_MIN;