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

Eternal Bone Giants will not ressurect 5 times

git-svn-id: http://svn.net-core.org/repos/t-engine4@5180 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2c8dff34
No related branches found
No related tags found
No related merge requests found
......@@ -946,7 +946,7 @@ function _M:processEffects()
for ly, _ in pairs(ys) do
local act = game.level.map(lx, ly, engine.Map.ACTOR)
if act and act == e.src and not ((type(e.selffire) == "number" and rng.percent(e.selffire)) or (type(e.selffire) ~= "number" and e.selffire)) then
elseif act and e.src and e.src.reactionToward and (e.src:reactionToward(act) >= 0) and not ((type(e.friendlyfire) == "number" and rng.percent(typ.friendlyfire)) or (type(e.friendlyfire) ~= "number" and e.friendlyfire)) then
elseif act and e.src and e.src.reactionToward and (e.src:reactionToward(act) >= 0) and not ((type(e.friendlyfire) == "number" and rng.percent(e.friendlyfire)) or (type(e.friendlyfire) ~= "number" and e.friendlyfire)) then
-- Otherwise hit
else
DamageType:get(e.damtype).projector(e.src, lx, ly, e.damtype, e.dam)
......
......@@ -291,9 +291,10 @@ function _M:learnTalent(t_id, force, nb)
end
end
self.talents[t_id] = (self.talents[t_id] or 0) + (nb or 1)
if t.on_learn then for i = 1, (nb or 1) do t.on_learn(self, t) end end
for i = 1, (nb or 1) do
self.talents[t_id] = (self.talents[t_id] or 0) + 1
if t.on_learn then t.on_learn(self, t) end
end
self.changed = true
return true
......
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