diff --git a/game/engines/default/engine/ui/ActorFrame.lua b/game/engines/default/engine/ui/ActorFrame.lua index 321a355c3b515b55b53011303cc2685c5b822d62..a68814ac9590f4aee8fb9a7af77a8b0e4376ec39 100644 --- a/game/engines/default/engine/ui/ActorFrame.lua +++ b/game/engines/default/engine/ui/ActorFrame.lua @@ -34,6 +34,10 @@ function _M:init(t) Base.init(self, t) end +function _M:setActor(actor) + self.actor = actor +end + function _M:generate() end diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 0f25d866024de9120e6af794c4252791004e452a..93ab444e1db4bef9e71dcdb4cd83b3b3f5fead18 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -4936,6 +4936,7 @@ local sustainCallbackCheck = { callbackOnDeath = "talents_on_death", callbackOnDeathbox = "talents_on_deathbox", callbackOnSummonDeath = "talents_on_summon_death", + callbackOnDie = "talents_on_die", callbackOnKill = "talents_on_kill", callbackOnMeleeAttack = "talents_on_melee_attack", callbackOnMeleeHit = "talents_on_melee_hit", diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 130087e2f3057457d7211f1b66705d069f9c275c..b85eef0f6d22cc5389e6dd7009e5c0a2fb16a745 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -436,7 +436,7 @@ function _M:updateMainShader() if solipsism_power > 0 then game.fbo_shader:setUniform("solipsism_warning", solipsism_power) else game.fbo_shader:setUniform("solipsism_warning", 0) end end - if (self:attr("no_healing") or ((self.healing_factor or 1) <= 0)) ~= self.old_healwarn then + if ((self:attr("no_healing") or ((self.healing_factor or 1) <= 0)) ~= self.old_healwarn) and not self:attr("no_healing_no_warning") then if (self:attr("no_healing") or ((self.healing_factor or 1) <= 0)) then game.fbo_shader:setUniform("intensify", {0.3,1.3,0.3,1}) else @@ -977,7 +977,7 @@ function _M:restCheck() if not self.resting.rest_turns then if self.air_regen < 0 then return false, "losing breath!" end if self.life_regen <= 0 then return false, "losing health!" end - if self.life < self.max_life and self.life_regen> 0 then return true end + if self.life < self.max_life and self.life_regen > 0 and not self:attr("no_life_regen") then return true end if self.air < self.max_air and self.air_regen > 0 and not self.is_suffocating then return true end for act, def in pairs(game.party.members) do if game.level:hasEntity(act) and not act.dead then if act.life < act.max_life and act.life_regen > 0 and not act:attr("no_life_regen") then return true end diff --git a/game/modules/tome/class/interface/ActorLife.lua b/game/modules/tome/class/interface/ActorLife.lua index 3c42989f74bba7483f52f045abf997e77a17a2d6..9f6ed540d7bec0de7d7548a9f10e8fff67c2195e 100644 --- a/game/modules/tome/class/interface/ActorLife.lua +++ b/game/modules/tome/class/interface/ActorLife.lua @@ -26,6 +26,8 @@ module(..., package.seeall, class.inherit(Base)) local function oktodie(self, value, src, death_note) if self:knowTalent(self.T_CAUTERIZE) and self:triggerTalent(self.T_CAUTERIZE, nil, value) then return false, 0 + elseif self:fireTalentCheck("callbackOnDie", value, src, death_note) then + return false, 0 else if src and src.on_kill and src:on_kill(self) then return false, value end return self:die(src, death_note), value