Thread: Pirate Halberd
View Single Post
  #1  
Old 10-29-2011, 12:08 AM
Lex Lex is offline
Approved Member
 
Join Date: Oct 2011
Posts: 54
Lightbulb

Quote:
Originally Posted by Lex View Post
Still it is weird that this +gold bonus is not stable.
I think I've found the answer, in Russian manual. To calculate gold from battle there is some rounding function used. That's why amount of gold is not so accurate like in case of, for example, amount of experience.

Quote:
RoundGold() - функция, округляющая полученное золото. Как именно RoundGold(X) округлит значение X, зависит от значения X:

Значение X - Округление
<1000 - Ceil(X,10)
1000–1999 - Ceil(X,50)
2000–9999 - Ceil(X,100)
>= 10000 - Ceil(X,500)

Здесь Ceil(X,Y) - округление числа X вверх до ближайшего целого, кратного Y. Например, RoundGold(655) = Ceil(655,10) = 660.
Usage of Ceil function means that +5% from Halberd is like minimum bonus but in every(?) case player gets more gold than +5%.

Last edited by Lex; 10-29-2011 at 12:12 AM.
Reply With Quote