2010-08-02, 08:00 PM
Fiel Wrote:It looks something like this:
Code:[calculate hit rate - which I'm still figuring out]
if(hitRate > 100)
hitRate = 100
if(hitRate < 0)
hitRate = 0
if(mobLevel > charLevel)
{
difference = 5 * (mobLevel - charLevel)
if(difference > hitRate)
hitRate = difference
hitRate -= difference
}
randomNumber = CRand::CalcRand32()
blah blah blah
It seems like it would be simpler like this:
Code:
[calculate hit rate - which I'm still figuring out]
if(hitRate > 100)
hitRate = 100
if(mobLevel > charLevel)
{
difference = 5 * (mobLevel - charLevel)
hitRate -= difference
}
if(hitRate < 0)
hitRate = 0
randomNumber = CRand::CalcRand32()
blah blah blahHmm...
hitrate 0
diff 100
-> hitrate 0
hitrate 100
diff 20
-> hitrate 80
hitrate 50
diff 60
-> hitrate 0
hitrate 0
diff -50
-> hitrate 50
hitrate -20
diff -50
-a> hitrate 30
-b> hitrate 50
This is the only possibility I see - that if hitrate could be negative in the first place, then hitrate ends up higher (starting at 1 level above the mob, when difference is a positive gain).
It also says that any player can hit any mob 20+ levels below them, regardless of acc, since diff gives +100 hitrate.

