Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a progressive scale of prices #24

Closed
SHAREN opened this issue Aug 3, 2017 · 1 comment
Closed

Make a progressive scale of prices #24

SHAREN opened this issue Aug 3, 2017 · 1 comment

Comments

@SHAREN
Copy link

SHAREN commented Aug 3, 2017

// for example gcv_iHealthPrice = "20", ga_iHealth[client] = 4
// gcv_fPriceModifier = 20

price = gcv_iHealthPrice.IntValue + (gcv_iPriceModifier.IntValue * ga_iHealth[client]);     // 20 + 20*4 = 100

I suggest doing so:
// for example gcv_fPriceModifier = 1.5

price = RoundToFloor(gcv_iHealthPrice.IntValue * Pow(gcv_fPriceModifier.FloatValue, ga_iHealth[client]*1.0));  // 20*1.5^4=101

on 2lvl
20 + 202 = 60 // before
20
1.5^2 = 45 // after
on 10 lvl
20 + 2010 = 220 // before
20
1.5^10 = 1153 // after

@Headline
Copy link
Owner

Done! See: #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants