From e57d989656304f3c17130ea8eac6c29cbf2ab15f Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Wed, 27 Nov 2013 20:31:16 +0100 Subject: [PATCH] Tree of Life will not spam the log --- game/modules/tome/class/Actor.lua | 2 +- game/modules/tome/data/damage_types.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index eccc30fd38..44eaf87561 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1582,7 +1582,7 @@ function _M:onHeal(value, src) end -- print("[HEALING]", self.uid, self.name, "for", value) - if (not self.resting and (not game.party:hasMember(self) or not game:getPlayer(true).resting)) and value + psi_heal >= 1 then + if (not self.resting and (not game.party:hasMember(self) or not game:getPlayer(true).resting)) and value + psi_heal >= 1 and not self:attr("silent_heal") then if game.level.map.seens(self.x, self.y) then local sx, sy = game.level.map:getTileToScreen(self.x, self.y) game.flyers:add(sx, sy, 30, rng.float(-3, -2), (rng.range(0,2)-1) * 0.5, tostring(math.ceil(value)), {255,255,0}) diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index efd2c5d824..12c19416b9 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -1752,9 +1752,9 @@ newDamageType{ projector = function(src, x, y, type, dam) local target = game.level.map(x, y, Map.ACTOR) if target and not target:attr("undead") then - if dam >= 100 then target:attr("allow_on_heal", 1) end + if dam >= 100 then target:attr("allow_on_heal", 1) else target:attr("silent_heal", 1) end target:heal(dam, src) - if dam >= 100 then target:attr("allow_on_heal", -1) end + if dam >= 100 then target:attr("allow_on_heal", -1) else target:attr("silent_heal", -1) end elseif target then DamageType:get(DamageType.NATURE).projector(src, x, y, DamageType.NATURE, dam) end -- GitLab