From 0725c02d0c27eab11c7e4b8adc69cde0159b7182 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Sat, 5 Sep 2020 20:50:33 +0200 Subject: [PATCH] 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 --- game/modules/tome/class/Actor.lua | 10 +++++++--- game/modules/tome/data/zones/sludgenest/zone.lua | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 87062114ae..46706c297f 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -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 diff --git a/game/modules/tome/data/zones/sludgenest/zone.lua b/game/modules/tome/data/zones/sludgenest/zone.lua index 68675a07d6..aad322d17a 100644 --- a/game/modules/tome/data/zones/sludgenest/zone.lua +++ b/game/modules/tome/data/zones/sludgenest/zone.lua @@ -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) -- GitLab