Skip to content
Snippets Groups Projects
Commit 0725c02d authored by DarkGod's avatar DarkGod
Browse files

If a creatures that clone on hit that was worth 0 exp is cloned, it'll...

If a creatures that clone on hit that was worth 0 exp is cloned, it'll correctly still be worht 0 exp
Summoned creatures are always worht 0 exp
Sludgenest walls-to-slime do not drop items
parent 86db39f4
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -2789,7 +2789,7 @@ function _M:onTakeHit(value, src, death_note)
a.life = math.max(1, self.life - value / 2)
a.clone_on_hit.chance = math.ceil(self.clone_on_hit.chance / 2)
a.energy.value = 0
a.exp_worth = 0.1
a.exp_worth = math.min(0.1, a.exp_worth)
a.inven = {}
a:removeAllMOs()
a.x, a.y = nil, nil
......@@ -7009,9 +7009,12 @@ end
-- @return the experience rewarded
function _M:worthExp(target)
if not target.level or self.level < target.level - 7 then return 0 end
if self.summoner then return 0 end
local level_mult = game.level.data.exp_worth_mult or 1
local worth = 0
-- HHHHAACKKK ! Use a normal scheme for the game except in the infinite dungeon
if not game.zone.infinite_dungeon then
local mult = 0.6
......@@ -7024,7 +7027,7 @@ function _M:worthExp(target)
elseif self.rank >= 5 then mult = 60
end
return self.level * mult * self.exp_worth * (target.exp_kill_multiplier or 1) * level_mult
worth = self.level * mult * self.exp_worth * (target.exp_kill_multiplier or 1) * level_mult
else
local mult = 2 + (self.exp_kill_multiplier or 0)
if self.rank == 1 then mult = 2
......@@ -7036,8 +7039,9 @@ function _M:worthExp(target)
elseif self.rank >= 5 then mult = 6.5
end
return self.level * mult * self.exp_worth * (target.exp_kill_multiplier or 1) * level_mult
worth = self.level * mult * self.exp_worth * (target.exp_kill_multiplier or 1) * level_mult
end
return worth
end
--- Burn arcane resources
......
......@@ -134,6 +134,7 @@ return {
local m = game.zone:makeEntity(game.level, "actor", filter, nil, true)
if g and m then
m.exp_worth = 0
m:emptyDrops()
game.zone:addEntity(game.level, g, "terrain", spot.x, spot.y)
game.zone:addEntity(game.level, m, "actor", spot.x, spot.y)
game.nicer_tiles:updateAround(game.level, spot.x, spot.y)
......
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