2011-02-08, 09:45 PM
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
