Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Everything you need to know about heroes, and more
#13
modular Wrote:looking for something a little more solid than a fact about how to make a triangle distribution. how do you know the game takes those two (randomed) numbers and multiplies them instead of multiplying minRange * critmin and maxRange * critmax and then selecting a single random number from the new range?

Because with the selection of said number, by your statement, the game would be unable to determine the number's "color" (aka Crit = red, normal = yellow).

The game most likely follows a pattern such as (pseudocode, VB style)

Code:
Crit Chance = 0.05 (5%)

>RND(min,max) = Damage
>Crit = RND(0.00,1.00) (Crit yes/no)
>>if crit <= Crit Chance
>>>RND(critmin,critmax) = Crit Multiplier
>>>Display = Damage * Crit Multiplier
>>else
>Display = Damage
>>end if
Reply


Messages In This Thread
Everything you need to know about heroes, and more - by StringStrider - 2011-02-08, 09:45 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)