From 3f6b932410daa8209492c52d6e2773020274270a Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 18 Feb 2025 16:56:44 -0600 Subject: [PATCH] Fixed common error with shopsanity --- ItemList.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ItemList.py b/ItemList.py index ef3c7a12..08be1d62 100644 --- a/ItemList.py +++ b/ItemList.py @@ -969,7 +969,7 @@ def balance_prices(world, player): target -= flex elif adjustment <= 0: old_price = inventory['price'] - new_price = max(0, inventory['price'] + adjustment) + new_price = max(0, int(inventory['price'] + adjustment)) inventory['price'] = new_price target += (old_price - new_price) else: @@ -978,7 +978,7 @@ def balance_prices(world, player): for loc in shop_locations: slot = shop_to_location_table[loc.parent_region.name].index(loc.name) inventory = loc.parent_region.shop.inventory[slot] - new_price = inventory['price'] + adjustment + new_price = int(inventory['price'] + adjustment) new_price = min(500, max(0, new_price)) # cap prices between 0--twice base price inventory['price'] = new_price target -= adjustment