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

When a boss dies the player gets experience even if he did not kill it directly or through summons

git-svn-id: http://svn.net-core.org/repos/t-engine4@1816 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9cfa1679
No related branches found
No related tags found
No related merge requests found
......@@ -747,7 +747,14 @@ function _M:die(src)
-- Gives the killer some exp for the kill
if src and src.resolveSource and src:resolveSource().gainExp then
src:resolveSource():gainExp(self:worthExp(src:resolveSource()))
local killer = src:resolveSource()
killer:gainExp(self:worthExp(killer))
-- Hack: even if the boss dies from something else, give the player exp
if not killer.player and self.rank > 3 then
game.logPlayer(game.player, "You feel a surge of power as a powerful creature falls nearby.")
killer = game.player:resolveSource()
killer:gainExp(self:worthExp(killer))
end
end
-- Do we get a blooooooody death ?
if rng.percent(33) then self:bloodyDeath() 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