From 9988efca0753d99c8e1a005af584871defdb539e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 1 Jun 2020 16:31:08 +0200 Subject: [PATCH] use compound interest for price increase --- ThemeParkClicker/Ui.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ThemeParkClicker/Ui.cs b/ThemeParkClicker/Ui.cs index 7afb5a6..a2b5691 100644 --- a/ThemeParkClicker/Ui.cs +++ b/ThemeParkClicker/Ui.cs @@ -138,8 +138,9 @@ namespace ThemeParkClicker { }, OnAreaUpdated = e => { // only update the price when the area updates, since it won't change while we're in the buy ui - var markup = GameImpl.Instance.Map.GetAttractionAmount(attraction.Value) * 0.05F; - price = (attraction.Value.InitialPrice * (1 + markup)).Ceil(); + var amount = GameImpl.Instance.Map.GetAttractionAmount(attraction.Value); + // yay compound interest + price = (attraction.Value.InitialPrice * (float) Math.Pow(1 + 0.1F, amount)).Ceil(); } }); button.OnUpdated += (e, time) => {