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

When Equilibrium is below the current willpower score talents will never fail.

git-svn-id: http://svn.net-core.org/repos/t-engine4@1759 51575b47-30f0-44d4-a5cc-537603b46e54
parent daf252df
No related branches found
No related tags found
No related merge requests found
......@@ -1124,7 +1124,12 @@ end
--- Equilibrium check
function _M:equilibriumChance(eq)
local chance = math.sqrt((eq or 0) + self:getEquilibrium()) / 60
eq = (eq or 0) + self:getEquilibrium()
local wil = self:getWil()
-- Do not fail if below willpower
if eq < wil then return true, 100 end
eq = eq - wil
local chance = math.sqrt(eq) / 60
print("[Equilibrium] Use chance: ", 100 - chance * 100, "::", self:getEquilibrium())
return rng.percent(100 - chance * 100), 100 - chance * 100
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