From 818572a611f8b7fc95af248b3db6fa9cf390895a Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Thu, 31 Mar 2011 15:08:45 +0000 Subject: [PATCH] Teak check hit formula git-svn-id: http://svn.net-core.org/repos/t-engine4@3123 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/interface/Combat.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 5aaf124eba..9dbb3eb015 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -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) -- GitLab