diff --git a/game/engine/interface/ActorLevel.lua b/game/engine/interface/ActorLevel.lua index 39914387135556ea01068ff4cb25e84f19ade720..d9d35b3c53cfc00366f9ec896d9cb3f913ff1594 100644 --- a/game/engine/interface/ActorLevel.lua +++ b/game/engine/interface/ActorLevel.lua @@ -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 diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index f20702fad50d3c72db017fc80be7830c8653b381..c7984f788622697376f1ed9c53461af64860a1a6 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -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