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

exp

git-svn-id: http://svn.net-core.org/repos/t-engine4@181 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0c019a0b
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,9 @@ function _M:gainExp(value)
end
--- How much experience is this actor worth
-- @param target to whom is the exp rewarded
-- @return the experience rewarded
function _M:worthExp()
function _M:worthExp(target)
return self.level * self.exp_worth
end
......
......@@ -125,7 +125,7 @@ end
function _M:die(src)
-- Gives the killer some exp for the kill
if src then
src:gainExp(self:worthExp())
src:gainExp(self:worthExp(src))
end
-- Do we get a blooooooody death ?
if rng.percent(33) then self:bloodyDeath() end
......@@ -282,8 +282,11 @@ function _M:postUseTalent(ab, ret)
end
--- How much experience is this actor worth
-- @param target to whom is the exp rewarded
-- @return the experience rewarded
function _M:worthExp()
function _M:worthExp(target)
if self.level < target.level - 5 then return 1 end
local mult = 2
if self.unique then mult = 6
elseif self.egoed then mult = 3 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