From 30f80427603977c7a2547e851d8071cc0a65d115 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 29 Oct 2021 19:58:38 -0400 Subject: [PATCH] Merchants now have less potion stock. --- world/src/site/settlement/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/world/src/site/settlement/mod.rs b/world/src/site/settlement/mod.rs index 605de5e531..6a421a9730 100644 --- a/world/src/site/settlement/mod.rs +++ b/world/src/site/settlement/mod.rs @@ -1173,9 +1173,12 @@ fn consumable_bags(economy: Option<&trade::SiteInformation>, rng: &mut impl Rng) .and_then(|e| e.unconsumed_stock.get(&Good::Food)) .copied() .map_or(Some(10_000.0), |food| Some(food.max(10_000.0))); + // Reduce amount of potions so merchants do not oversupply potions. + // TODO: Maybe remove when merchants and their inventories are rtsim? let mut potions = economy .and_then(|e| e.unconsumed_stock.get(&Good::Potions)) - .copied(); + .copied() + .map(|potions| potions.powf(0.25)); let goods = [ (Good::Food, &mut food, &mut bag3),