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

See invisible & See stealth now works the the old "checkHit", because stealth...

See invisible & See stealth now works the the old "checkHit", because stealth & invis are not 100-scaled


git-svn-id: http://svn.net-core.org/repos/t-engine4@4715 51575b47-30f0-44d4-a5cc-537603b46e54
parent 8558719b
No related branches found
No related tags found
No related merge requests found
...@@ -2953,7 +2953,7 @@ function _M:canSeeNoCache(actor, def, def_pct) ...@@ -2953,7 +2953,7 @@ function _M:canSeeNoCache(actor, def, def_pct)
-- Check for stealth. Checks against the target cunning and level -- Check for stealth. Checks against the target cunning and level
if actor:attr("stealth") and actor ~= self then if actor:attr("stealth") and actor ~= self then
local def = self.level / 2 + self:getCun(25, true) + (self:attr("see_stealth") or 0) local def = self.level / 2 + self:getCun(25, true) + (self:attr("see_stealth") or 0)
local hit, chance = self:checkHit(def, actor:attr("stealth") + (actor:attr("inc_stealth") or 0), 0, 100) local hit, chance = self:checkHitOld(def, actor:attr("stealth") + (actor:attr("inc_stealth") or 0), 0, 100)
if not hit then if not hit then
return false, chance return false, chance
end end
...@@ -2963,7 +2963,7 @@ function _M:canSeeNoCache(actor, def, def_pct) ...@@ -2963,7 +2963,7 @@ function _M:canSeeNoCache(actor, def, def_pct)
if actor:attr("invisible") then if actor:attr("invisible") then
-- Special case, 0 see invisible, can NEVER see invisible things -- Special case, 0 see invisible, can NEVER see invisible things
if not self:attr("see_invisible") then return false, 0 end if not self:attr("see_invisible") then return false, 0 end
local hit, chance = self:checkHit(self:attr("see_invisible"), actor:attr("invisible"), 0, 100) local hit, chance = self:checkHitOld(self:attr("see_invisible"), actor:attr("invisible"), 0, 100)
if not hit then if not hit then
return false, chance return false, chance
end end
......
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