Skip to content
Snippets Groups Projects
Commit 818572a6 authored by dg's avatar dg
Browse files

Teak check hit formula

git-svn-id: http://svn.net-core.org/repos/t-engine4@3123 51575b47-30f0-44d4-a5cc-537603b46e54
parent 32093483
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,7 @@ function _M:checkHit(atk, def, min, max, factor)
local one = 1 / (1 + math.exp(-(atk - def) / 7))
local two = 0
if atk + def ~= 0 then two = atk / (atk + def) end
if atk + def ~= 0 then two = math.min(atk / (2*def) , 1) end
hit = 50 * (one + two)
hit = util.bound(hit, min or 5, max or 95)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment