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 => {
|
OnAreaUpdated = e => {
|
||||||
// only update the price when the area updates, since it won't change while we're in the buy ui
|
// 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;
|
var amount = GameImpl.Instance.Map.GetAttractionAmount(attraction.Value);
|
||||||
price = (attraction.Value.InitialPrice * (1 + markup)).Ceil();
|
// yay compound interest
|
||||||
|
price = (attraction.Value.InitialPrice * (float) Math.Pow(1 + 0.1F, amount)).Ceil();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
button.OnUpdated += (e, time) => {
|
button.OnUpdated += (e, time) => {
|
||||||
|
|
Loading…
Reference in a new issue