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

Fix explosion expert in rare cases

git-svn-id: http://svn.net-core.org/repos/t-engine4@5526 51575b47-30f0-44d4-a5cc-537603b46e54
parent a998d4b3
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ newTalent{
local theorical_nb = ({ 9, 25, 45, 77, 109, 145 })[tg.radius] or 145
local nb = 0
local grids = self:project(tg, x, y, function(tx, ty) end)
for px, ys in pairs(grids) do for py, _ in pairs(ys) do nb = nb + 1 end end
for px, ys in pairs(grids or {}) do for py, _ in pairs(ys) do nb = nb + 1 end end
nb = theorical_nb - nb
if nb > 0 then
local mult = math.log10(nb) / (6 - math.min(self:getTalentLevelRaw(self.T_EXPLOSION_EXPERT), 5))
......
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