use compound interest for price increase
This commit is contained in:
parent
c7f2446282
commit
9988efca07
1 changed files with 3 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue