Fixed the CheckHit() equation

This commit is contained in:
Kayne Ruse
2014-05-20 02:16:32 +10:00
parent abc0a89237
commit 32063f657d
+2 -2
View File
@@ -14,7 +14,7 @@ function MakeChar()
t.defence = 10
t.intelligence = 10
t.resistance = 10
t.accuracy = 0.1
t.accuracy = 0.9
t.evasion = 0.1
t.luck = 0.1
t.level = 1
@@ -23,7 +23,7 @@ end
function CheckHit(A, D)
local RNG = math.random(100)
local hitRate = A.accuracy - A.accuracy * D.evasion
local hitRate = (A.accuracy - A.accuracy * D.evasion) * 100
if RNG <= hitRate * A.luck then
return hitType.CRITICAL