diff --git a/game/engines/default/engine/utils.lua b/game/engines/default/engine/utils.lua index 82db9fe241a75cbca413286efd7bef8d21336070..3f828ada11f016df21cbfd4b65f551669876307c 100644 --- a/game/engines/default/engine/utils.lua +++ b/game/engines/default/engine/utils.lua @@ -346,12 +346,14 @@ end function string.his_her(actor) if actor.female then return "her" + elseif actor.neuter then return "it" else return "his" end end function string.his_her_self(actor) if actor.female then return "herself" + elseif actor.neuter then return "itself" else return "himself" end end diff --git a/game/loader/pre-init.lua b/game/loader/pre-init.lua index c333d72a2cdf125e71e4f3a9a30265ea7f094f60..184feb32464e19656ba2bd1d09341f6a8002ba6d 100644 --- a/game/loader/pre-init.lua +++ b/game/loader/pre-init.lua @@ -152,9 +152,9 @@ end function string.unserialize(str) local f, err = loadstring(str) - if not f then print("[UNSERIALIZE] error", err, str) return nil end + if not f then print("[UNSERIALIZE] error", err) return nil end local t = {} setfenv(f, setmetatable(t, {__index={_G=t}})) local ok, err = pcall(f) - if ok then return setmetatable(t, nil) else print("[UNSERIALIZE] error", err, str) return nil end + if ok then return setmetatable(t, nil) else print("[UNSERIALIZE] error", err) return nil end end diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index f5b378db1b17b3e7249f46bba04d3be0f17e4316..8ad14eee0f18faf1d5ba6460860c502fd7dd3b17 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1718,7 +1718,7 @@ function _M:onTakeHit(value, src, death_note) if value > 0 and self:attr("time_shield") then -- Absorb damage into the time shield self.time_shield_absorb = self.time_shield_absorb or 0 - game:delayedLogDamage(src, self, 0, ("#STEEL_BLUE#(%d absorbed)#LAST#"):format(math.min(value, self.time_shield_absorb)), false) + game:delayedLogDamage(src, self, 0, ("#STEEL_BLUE#(%d to time)#LAST#"):format(math.min(value, self.time_shield_absorb)), false) if value < self.time_shield_absorb then self.time_shield_absorb = self.time_shield_absorb - value value = 0 @@ -1824,6 +1824,7 @@ function _M:onTakeHit(value, src, death_note) if value > 0 and self:isTalentActive(self.T_BONE_SHIELD) then local t = self:getTalentFromId(self.T_BONE_SHIELD) if t.absorb(self, t, self:isTalentActive(self.T_BONE_SHIELD)) then + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d to bones)#LAST#"):format(value), false) value = 0 end end @@ -1837,11 +1838,17 @@ function _M:onTakeHit(value, src, death_note) self.tempeffect_def[self.EFF_CURSED_FORM].do_onTakeHit(self, eff, value) end - if value > 0 and self:isTalentActive(self.T_DEFLECTION) then - local t = self:getTalentFromId(self.T_DEFLECTION) - value = t.do_onTakeHit(self, t, self:isTalentActive(self.T_DEFLECTION), value) + if value > 0 then + tal = self:isTalentActive(self.T_DEFLECTION) + if tal then + local oldval = value + value = self:callTalent(self.T_DEFLECTION, "do_onTakeHit", tal, value) + if value ~= oldval then + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d deflected)#LAST#"):format(oldval - value), false) + end + end end - + if value > 0 and self:hasEffect(self.EFF_RAMPAGE) then local eff = self:hasEffect(self.EFF_RAMPAGE) value = self.tempeffect_def[self.EFF_RAMPAGE].do_onTakeHit(self, eff, value) @@ -2022,8 +2029,9 @@ function _M:onTakeHit(value, src, death_note) if self:attr("unstoppable") then if value > self.life then + game:delayedLogDamage(src, self, 0, ("#RED#(%d refused)#LAST#"):format(value - self.life - 1), false) value = self.life - 1 - game:delayedLogMessage(self, nil, "unstoppable", "#VIOLET##Source# is unstoppable!") + game:delayedLogMessage(self, nil, "unstoppable", "#RED##Source# is unstoppable!") end end @@ -2181,7 +2189,9 @@ function _M:onTakeHit(value, src, death_note) if self.flat_damage_cap.all then cap = self.flat_damage_cap.all end if self.flat_damage_cap[death_note.damtype] then cap = self.flat_damage_cap[death_note.damtype] end if cap and cap > 0 then - value = math.max(math.min(value, cap * self.max_life / 100), 0) + local ignored = math.max(0, value - cap * self.max_life / 100) + if ignored > 0 then game:delayedLogDamage(src, self, 0, ("#LIGHT_GREY#(%d resilience)#LAST#"):format(ignored), false) end + value = value - ignored print("[TAKE HIT] after flat damage cap", value) end end diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 79de50fb3152b138229a6701ad4ecbd4e66ff7bd..8ea1ce96d98f142098730f96a9aaa87554beff9a 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -398,15 +398,19 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) if target.knowTalent and target:hasEffect(target.EFF_DUAL_WEAPON_DEFENSE) then local deflect = math.min(dam, target:callTalent(target.T_DUAL_WEAPON_DEFENSE, "doDeflect")) if deflect > 0 then - self:logCombat(target, "#Target# parries %d damage from #Source#'s attack.", deflect) +-- self:logCombat(target, "#Target# parries %d damage from #Source#'s attack.", deflect) + game:delayedLogDamage(self, target, 0, ("%s(%d parried#LAST#)"):format(DamageType:get(damtype).text_color or "#aaaaaa#", deflect), false) dam = math.max(dam - deflect,0) print("[ATTACK] after DUAL_WEAPON_DEFENSE", dam) end end if target.knowTalent and target:hasEffect(target.EFF_GESTURE_OF_GUARDING) and not target:attr("encased_in_ice") then local deflected = math.min(dam, target:callTalent(target.T_GESTURE_OF_GUARDING, "doGuard")) or 0 - if deflected > 0 then self:logCombat(target, "#Target# dismisses %d damage from #Source#'s attack with a sweeping gesture.", deflected) end - dam = dam - deflected +-- if deflected > 0 then self:logCombat(target, "#Target# dismisses %d damage from #Source#'s attack with a sweeping gesture.", deflected) end + if deflected > 0 then + game:delayedLogDamage(self, target, 0, ("%s(%d gestured#LAST#)"):format(DamageType:get(damtype).text_color or "#aaaaaa#", deflected), false) + dam = dam - deflected + end print("[ATTACK] after GESTURE_OF_GUARDING", dam) end diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index bafe01f478323b9affa760962ce280d31bf7d943..1cd1458b6b7849d68d5fe7d0d7e61ccafee79ff5 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -97,20 +97,26 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) t.on_damage(target, t, type) end + local lastdam = dam -- Item-granted damage ward talent if target:hasEffect(target.EFF_WARD) then local e = target.tempeffect_def[target.EFF_WARD] dam = e.absorb(type, dam, target.tmp[target.EFF_WARD], target, src) + game:delayedLogDamage(src, target, 0, ("%s(%d warded)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end -- Block talent from shields - if target:attr("block") then + if dam > 0 and target:attr("block") then local e = target.tempeffect_def[target.EFF_BLOCKING] + lastdam = dam dam = e.do_block(type, dam, target.tmp[target.EFF_BLOCKING], target, src) + if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d blocked)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end end - if target.isTalentActive and target:isTalentActive(target.T_FORGE_SHIELD) then + if dam > 0 and target.isTalentActive and target:isTalentActive(target.T_FORGE_SHIELD) then local t = target:getTalentFromId(target.T_FORGE_SHIELD) + lastdam = dam dam = t.doForgeShield(type, dam, t, target, src) + if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d blocked)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end end -- Increases damage @@ -187,7 +193,7 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) game:delayedLogMessage(source, target, "dark_strike"..(source.uid or ""), "#Source# strikes #Target# in the darkness (%+d%%%%%%%% damage).", dark.damageIncrease) -- resolve %% 3 levels deep end end - + lastdam = dam -- Static reduce damage for psionic kinetic shield if target.isTalentActive and target:isTalentActive(target.T_KINETIC_SHIELD) then local t = target:getTalentFromId(target.T_KINETIC_SHIELD) @@ -218,15 +224,23 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) local t = target:getTalentFromId(target.T_CHARGED_SHIELD) dam = t.css_on_damage(target, t, type, dam) end - + if dam ~= lastdam then + game:delayedLogDamage(src, target, 0, ("%s(%d to psi shield)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) + end + lastdam = dam if type ~= DamageType.PHYSICAL and target.knowTalent and target:knowTalent(target.T_STONE_FORTRESS) and target:hasEffect(target.EFF_DWARVEN_RESILIENCE) then dam = math.max(0, dam - target:combatArmor() * (50 + target:getTalentLevel(target.T_STONE_FORTRESS) * 10) / 100) end + if dam ~= lastdam then + game:delayedLogDamage(src, target, 0, ("%s(%d to armor)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) + end -- Damage Smearing - if type ~= DamageType.TEMPORAL and target:hasEffect(target.EFF_DAMAGE_SMEARING) then + if dam > 0 and type ~= DamageType.TEMPORAL and target:hasEffect(target.EFF_DAMAGE_SMEARING) then local smear = dam + local type = DamageType.TEMPORAL target:setEffect(target.EFF_SMEARED, 6, {src=src, power=smear/6, no_ct_effect=true}) + game:delayedLogDamage(src, target, 0, ("%s(%d smeared)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", dam), false) dam = 0 end @@ -279,19 +293,24 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) end -- Static reduce damage - if target.isTalentActive and target:isTalentActive(target.T_ANTIMAGIC_SHIELD) then + if dam > 0 and target.isTalentActive and target:isTalentActive(target.T_ANTIMAGIC_SHIELD) then local t = target:getTalentFromId(target.T_ANTIMAGIC_SHIELD) + lastdam = dam dam = t.on_damage(target, t, type, dam) + if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d antimagic)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam - dam), false) end end - if target.isTalentActive and target:isTalentActive(target.T_ENERGY_DECOMPOSITION) then + if dam > 0 and target.isTalentActive and target:isTalentActive(target.T_ENERGY_DECOMPOSITION) then local t = target:getTalentFromId(target.T_ENERGY_DECOMPOSITION) + lastdam = dam dam = t.on_damage(target, t, type, dam) + if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d dissipated)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam - dam), false) end end -- Flat damage reduction ("armour") - if target.flat_damage_armor then + if dam > 0 and target.flat_damage_armor then local dec = (target.flat_damage_armor.all or 0) + (target.flat_damage_armor[type] or 0) + if dec > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d reduction)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", dec), false) end dam = math.max(0, dam - dec) print("[PROJECTOR] after flat damage armor", dam) end @@ -373,10 +392,12 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) end end - if src.attr and src:attr("martyrdom") and not no_martyr then + if dam > 0 and src.attr and src:attr("martyrdom") and not no_martyr then + game:delayedLogMessage(src, target, "martyrdom", "#CRIMSON##Source# damages %s through Martyrdom!", string.his_her_self(src)) DamageType.defaultProjector(target, src.x, src.y, type, dam * src.martyrdom / 100, tmp, true) end if target.attr and target:attr("reflect_damage") and not no_martyr and src.x and src.y then + game:delayedLogMessage(target, src, "reflect_damage"..(src.uid or ""), "#CRIMSON##Source# reflects damage back to #Target#!") DamageType.defaultProjector(target, src.x, src.y, type, dam * target.reflect_damage / 100, tmp, true) end diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index f76c1cdf547563de53bd3a7140c4e4b561cb1020..fdc7e23c638d828745b11d21d9fc155491b5207b 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -5506,12 +5506,12 @@ newEntity{ base = "BASE_TOOL_MISC", --Thanks Alex! self.wielder.combat_spellspeed = self.wielder.combat_spellspeed - direction * 0.04 self.wielder.combat_mindspeed = self.wielder.combat_mindspeed - direction * 0.04 - if self.wielder.resists.all == -10 then + if self.wielder.resists.all <= -10 then self.wielder.inc_damage.all = 10 game.logPlayer(who, "#GOLD#As the final sands drop into place, you feel a surge of power.") self.finished=true end - if self.wielder.resists.all == 10 then + if self.wielder.resists.all >= 10 then self.wielder.flat_damage_armor.all = 10 game.logPlayer(who, "#GOLD#As the final sands drop into place, you suddenly feel safer.") self.finished=true diff --git a/game/modules/tome/data/quests/keepsake.lua b/game/modules/tome/data/quests/keepsake.lua index 799ae1e24b5fdc4f5fcb54a3defc7c635ca9857d..2c3b5f346e5887764b2480e442354b8b2207b1fd 100644 --- a/game/modules/tome/data/quests/keepsake.lua +++ b/game/modules/tome/data/quests/keepsake.lua @@ -149,8 +149,8 @@ on_caravan_destroyed_chat_over = function(self, who) game.level.default_down.y = spot.y -- make yourself mortal again - game.player:heal(10000) - game.player:incHate(10000) + game.player:heal(game.player.max_life) + game.player:incHate(game.player.max_hate) who.die = who.old_die who.old_die = nil diff --git a/game/modules/tome/data/talents/celestial/combat.lua b/game/modules/tome/data/talents/celestial/combat.lua index d66cd20f7702134ae6d66bd331a385d40963d47d..39ec927da4cfd6e49fe478f51494316a71f35ab1 100644 --- a/game/modules/tome/data/talents/celestial/combat.lua +++ b/game/modules/tome/data/talents/celestial/combat.lua @@ -67,7 +67,7 @@ newTalent{ game:playSoundNear(self, "talents/spell_generic") local target = game.level.map(x, y, Map.ACTOR) if target then - target:setEffect(self.EFF_MARTYRDOM, 10, {power=t.getReturnDamage(self, t), apply_power=self:combatSpellpower()}) + target:setEffect(self.EFF_MARTYRDOM, 10, {src = self, power=t.getReturnDamage(self, t), apply_power=self:combatSpellpower()}) else return end diff --git a/game/modules/tome/data/talents/chronomancy/energy.lua b/game/modules/tome/data/talents/chronomancy/energy.lua index 8e803e69369c9623392c52218195d855a10866bd..32d20c41a36366a9d82f3c2a8029603b063ebc0d 100644 --- a/game/modules/tome/data/talents/chronomancy/energy.lua +++ b/game/modules/tome/data/talents/chronomancy/energy.lua @@ -47,7 +47,7 @@ newTalent{ end, info = function(self, t) local absorption = t.getAbsorption(self, t) - return ([[Reduces all incoming energy damage (all except mind and physical damage) by 30%%, up to a maximum of %d. + return ([[Partially dissipates all incoming energy damage (all except mind and physical damage), reducing it by 30%%, up to a maximum of %d. The maximum damage reduction will scale with your Spellpower.]]):format(absorption) end, } diff --git a/game/modules/tome/data/talents/cursed/cursed-form.lua b/game/modules/tome/data/talents/cursed/cursed-form.lua index 9f1b93b6351beb5afba5ba1f5c4d3f330b7254c9..c7808b2fadefe80c93c76ceead75692143c31274 100644 --- a/game/modules/tome/data/talents/cursed/cursed-form.lua +++ b/game/modules/tome/data/talents/cursed/cursed-form.lua @@ -50,7 +50,7 @@ newTalent{ local heal = math.min(t.getRegenRate(self, t), maxHeal) local temp = self.healing_factor self.healing_factor = 1 - self:heal(heal) + self:heal(heal, t) self.healing_factor = temp self.unnatural_body_heal = math.max(0, (self.unnatural_body_heal or 0) - heal) diff --git a/game/modules/tome/data/talents/gifts/fungus.lua b/game/modules/tome/data/talents/gifts/fungus.lua index 90d25110f1ad589e78fcace2f6c60654d7f65d0b..94fa834e5f6d7bfac6dfb64a426a8dde83ad658a 100644 --- a/game/modules/tome/data/talents/gifts/fungus.lua +++ b/game/modules/tome/data/talents/gifts/fungus.lua @@ -99,7 +99,7 @@ newTalent{ action = function(self, t) local amt = self.life_regen * t.getMult(self, t) - self:heal(amt) + self:heal(amt, t) game:playSoundNear(self, "talents/heal") return true diff --git a/game/modules/tome/data/talents/gifts/mindstar-mastery.lua b/game/modules/tome/data/talents/gifts/mindstar-mastery.lua index fe1650cd30140554348e89ef4e9c74c53700e5f1..efb513c8c3484878a5a856484c8a81f918ff7a91 100644 --- a/game/modules/tome/data/talents/gifts/mindstar-mastery.lua +++ b/game/modules/tome/data/talents/gifts/mindstar-mastery.lua @@ -169,7 +169,7 @@ newTalent{ if core.fov.distance(self.x, self.y, x, y) > 1 then break end target:attr("allow_on_heal", 1) - target:heal(dam, self) + target:heal(dam, t) target:attr("allow_on_heal", -1) target:incEquilibrium(-dam / 10) break diff --git a/game/modules/tome/data/talents/gifts/storm-drake.lua b/game/modules/tome/data/talents/gifts/storm-drake.lua index 4becd302cda9de7c14c0f3dbc3f54499e4e91fb3..61361ecf8e8cfb363dc9a88fe381a2b8ea2f93db 100644 --- a/game/modules/tome/data/talents/gifts/storm-drake.lua +++ b/game/modules/tome/data/talents/gifts/storm-drake.lua @@ -88,7 +88,7 @@ newTalent{ if target.life - dam < 0 then dam = target.life end target:takeHit(dam, self) - game:delayedLogDamage(self, target, dam, ("#PURPLE#%d pure damage#LAST#"):format(math.ceil(dam))) + game:delayedLogDamage(self, target, dam, ("#PURPLE#%d STATIC#LAST#"):format(math.ceil(dam))) end, nil, {type="lightning_explosion"}) game:playSoundNear(self, "talents/lightning") return true diff --git a/game/modules/tome/data/talents/misc/inscriptions.lua b/game/modules/tome/data/talents/misc/inscriptions.lua index 073f6ab8ccecf366f0645a19760ce445df01d583..6b871d54b9a9de44473850f9c02de9fafd119b74 100644 --- a/game/modules/tome/data/talents/misc/inscriptions.lua +++ b/game/modules/tome/data/talents/misc/inscriptions.lua @@ -93,7 +93,7 @@ newInscription{ action = function(self, t) local data = self:getInscriptionData(t.short_name) self:attr("allow_on_heal", 1) - self:heal(data.heal + data.inc_stat) + self:heal(data.heal + data.inc_stat, t) self:attr("allow_on_heal", -1) return true end, @@ -932,7 +932,7 @@ newInscription{ else target:forceUseTalent(eff[2], {ignore_energy=true}) end - self:heal(data.heal + data.inc_stat) + self:heal(data.heal + data.inc_stat, t) end game.level.map:particleEmitter(px, py, 1, "shadow_zone") @@ -942,7 +942,7 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Activate the taint on a foe, removing %d effects from it and healing you for %d per effects.]]):format(data.effects, data.heal + data.inc_stat) + return ([[Activate the taint on a foe, removing %d effects from it and healing you for %d for each effect.]]):format(data.effects, data.heal + data.inc_stat) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) diff --git a/game/modules/tome/data/talents/misc/races.lua b/game/modules/tome/data/talents/misc/races.lua index f17d83b21e04c01721845320b8d494ecd847301b..566771f9d38451fa3296f3fd4517120205e9e6ca 100644 --- a/game/modules/tome/data/talents/misc/races.lua +++ b/game/modules/tome/data/talents/misc/races.lua @@ -722,7 +722,7 @@ newTalent{ end end self:attr("allow_on_heal", 1) - self:heal(t.heal(self, t)) + self:heal(t.heal(self, t), t) self:attr("allow_on_heal", -1) return true end, diff --git a/game/modules/tome/data/talents/psionic/feedback.lua b/game/modules/tome/data/talents/psionic/feedback.lua index 94d88b3b81caf02ac129288fdc0fc81165bc250f..c3300dd717b2973d870d4113ce7d463d8e3f321f 100644 --- a/game/modules/tome/data/talents/psionic/feedback.lua +++ b/game/modules/tome/data/talents/psionic/feedback.lua @@ -123,7 +123,7 @@ newTalent{ local inc = "inc"..name:capitalize() if name == "heal" then self:attr("allow_on_heal", 1) - self:heal(self:mindCrit(v), self) + self:heal(self:mindCrit(v), t) self:attr("allow_on_heal", -1) elseif self[inc] then self[inc](self, v) diff --git a/game/modules/tome/data/talents/spells/explosives.lua b/game/modules/tome/data/talents/spells/explosives.lua index c3643fcdcec0579175c358af2ea9a035615e4308..398dc82be51f126e9cab487d3346d91f011f8fa2 100644 --- a/game/modules/tome/data/talents/spells/explosives.lua +++ b/game/modules/tome/data/talents/spells/explosives.lua @@ -120,7 +120,7 @@ newTalent{ end end) - if ammo.alchemist_bomb and ammo.alchemist_bomb.leech then self:heal(math.min(self.max_life * ammo.alchemist_bomb.leech / 100, dam_done)) end + if ammo.alchemist_bomb and ammo.alchemist_bomb.leech then self:heal(math.min(self.max_life * ammo.alchemist_bomb.leech / 100, dam_done), ammo) end local _ _, x, y = self:canProject(tg, x, y) game.level.map:particleEmitter(x, y, tg.radius, particle, {radius=tg.radius, grids=grids, tx=x, ty=y}) diff --git a/game/modules/tome/data/talents/uber/const.lua b/game/modules/tome/data/talents/uber/const.lua index 43f273cd0e50f16fae3b4a92173ecffeaae9c328..4465d8aa42faabc48b68d4a9db8173b7149e82e7 100644 --- a/game/modules/tome/data/talents/uber/const.lua +++ b/game/modules/tome/data/talents/uber/const.lua @@ -24,9 +24,9 @@ uberTalent{ require = { special={desc="Be close to the draconic world", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:attr("drake_touched") and self:attr("drake_touched") >= 2) end} }, trigger = function(self, t, value) if self.life - value < self.max_life * 0.3 and not self:isTalentCoolingDown(t) then - self:heal(self.max_life * 0.4) + self:heal(self.max_life * 0.4, t) self:startTalentCooldown(t) - game.logSeen(self,"%s's draconic body hardens and heals!",self.name) --I5 + game.logSeen(self,"%s's draconic body hardens and heals!",self.name) end end, info = function(self, t) diff --git a/game/modules/tome/data/talents/undeads/skeleton.lua b/game/modules/tome/data/talents/undeads/skeleton.lua index c94ac61a6c37dbb290dee6f05bfd4c3b79752c98..dc985df5439e9b79e7e4992990216310316c5482 100644 --- a/game/modules/tome/data/talents/undeads/skeleton.lua +++ b/game/modules/tome/data/talents/undeads/skeleton.lua @@ -94,7 +94,7 @@ newTalent{ short_name = "SKELETON_REASSEMBLE", end, action = function(self, t) self:attr("allow_on_heal", 1) - self:heal(t.getHeal(self, t), self) + self:heal(t.getHeal(self, t), t) self:attr("allow_on_heal", -1) if core.shader.active(4) then self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_dark"}, {type="runicshield", color={0.34, 0.1, 0.5, 1}})) end game:playSoundNear(self, "talents/heal") diff --git a/game/modules/tome/data/timed_effects/mental.lua b/game/modules/tome/data/timed_effects/mental.lua index c564c250bd66a9758e72071aa9c7d88175ec577c..fc21c2d17367ff184e3b19c5c977e738e13b394a 100644 --- a/game/modules/tome/data/timed_effects/mental.lua +++ b/game/modules/tome/data/timed_effects/mental.lua @@ -1880,9 +1880,9 @@ newEffect{ eff.healid = self:addTemporaryValue("no_life_regen", 1) end, deactivate = function(self, eff) - self:heal(eff.kills * eff.hp_per_kill * self.max_life / 100) self:removeTemporaryValue("unstoppable", eff.tmpid) self:removeTemporaryValue("no_life_regen", eff.healid) + self:heal(eff.kills * eff.hp_per_kill * self.max_life / 100, eff) end, } diff --git a/game/modules/tome/data/timed_effects/other.lua b/game/modules/tome/data/timed_effects/other.lua index 3d9c66cbf733c1b9b67165828c380ebc6aff1e60..793b14568334004ed77e69688e013a963b1dee43 100644 --- a/game/modules/tome/data/timed_effects/other.lua +++ b/game/modules/tome/data/timed_effects/other.lua @@ -2187,7 +2187,7 @@ newEffect{ local dead, val = self:takeHit(eff.dam, self, {special_death_msg="burnt to death by cauterize"}) local srcname = self.x and self.y and game.level.map.seens(self.x, self.y) and self.name:capitalize() or "Something" - game:delayedLogDamage(self, self, val, ("%s%d %s#LAST#"):format(DamageType:get(DamageType.FIRE).text_color or "#aaaaaa#", math.ceil(val), DamageType:get(DamageType.FIRE).name), false) + game:delayedLogDamage(eff, self, val, ("%s%d %s#LAST#"):format(DamageType:get(DamageType.FIRE).text_color or "#aaaaaa#", math.ceil(val), DamageType:get(DamageType.FIRE).name), false) end, } diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua index 32fdff67aebeac8a8c08547995155969ca826d4c..68db3e75a1eae48c7f303f6ac9a6ae9675a79887 100644 --- a/game/modules/tome/data/timed_effects/physical.lua +++ b/game/modules/tome/data/timed_effects/physical.lua @@ -1778,7 +1778,10 @@ newEffect{ local blocked = dam - amt local shield = self:hasShield() if shield then shield:check("on_block", self, src, type, dam, eff) end - if eff.properties.br then self:heal(blocked) end + if eff.properties.br then + self:heal(blocked, src) + game:delayedLogMessage(self, src, "block_heal", "#CRIMSON##Source# heals from blocking with %s shield!", string.his_her(self)) + end if eff.properties.ref and src.life then DamageType.defaultProjector(src, src.x, src.y, type, blocked, tmp, true) end if (self:knowTalent(self.T_RIPOSTE) or amt == 0) and src.life then src:setEffect(src.EFF_COUNTERSTRIKE, (1 + dur_inc) * (src.global_speed or 1), {power=eff.power, no_ct_effect=true, src=self, crit_inc=crit_inc, nb=nb}) end -- specify duration here to avoid stacking for high speed attackers return amt