diff --git a/game/modules/tome/class/interface/Archery.lua b/game/modules/tome/class/interface/Archery.lua index 112ea1839f83305ce94e311d88db9a244e837798..d3bb3277211308c7d52ec37dbcaf661e67e49f8c 100644 --- a/game/modules/tome/class/interface/Archery.lua +++ b/game/modules/tome/class/interface/Archery.lua @@ -451,17 +451,19 @@ local function archery_projectile(tx, ty, tg, self, tmp) end end - -- Regen on being hit - if hitted and not target.dead and target:attr("stamina_regen_when_hit") then target:incStamina(target.stamina_regen_when_hit) end - if hitted and not target.dead and target:attr("mana_regen_when_hit") then target:incMana(target.mana_regen_when_hit) end - if hitted and not target.dead and target:attr("equilibrium_regen_when_hit") then target:incEquilibrium(-target.equilibrium_regen_when_hit) end - if hitted and not target.dead and target:attr("psi_regen_when_hit") then target:incPsi(target.psi_regen_when_hit) end - if hitted and not target.dead and target:attr("hate_regen_when_hit") then target:incHate(target.hate_regen_when_hit) end - if hitted and not target.dead and target:attr("vim_regen_when_hit") then target:incVim(target.vim_regen_when_hit) end - - -- Resource regen on hit - if hitted and self:attr("stamina_regen_on_hit") then self:incStamina(self.stamina_regen_on_hit) end - if hitted and self:attr("mana_regen_on_hit") then self:incMana(self.mana_regen_on_hit) end + if self ~= target then + -- Regen on being hit + if hitted and not target.dead and target:attr("stamina_regen_when_hit") then target:incStamina(target.stamina_regen_when_hit) end + if hitted and not target.dead and target:attr("mana_regen_when_hit") then target:incMana(target.mana_regen_when_hit) end + if hitted and not target.dead and target:attr("equilibrium_regen_when_hit") then target:incEquilibrium(-target.equilibrium_regen_when_hit) end + if hitted and not target.dead and target:attr("psi_regen_when_hit") then target:incPsi(target.psi_regen_when_hit) end + if hitted and not target.dead and target:attr("hate_regen_when_hit") then target:incHate(target.hate_regen_when_hit) end + if hitted and not target.dead and target:attr("vim_regen_when_hit") then target:incVim(target.vim_regen_when_hit) end + + -- Resource regen on hit + if hitted and self:attr("stamina_regen_on_hit") then self:incStamina(self.stamina_regen_on_hit) end + if hitted and self:attr("mana_regen_on_hit") then self:incMana(self.mana_regen_on_hit) end + end -- Ablative armor if hitted and not target.dead and target:attr("carbon_spikes") then diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 16e4d944204cdb3d68db4c3af2a8c1e6d2da3ba2..983e83bedaeb975a91a9231117af8c1457e13e7c 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -550,7 +550,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) hitted = true - if self:attr("vim_on_melee") then self:incVim(self:attr("vim_on_melee")) end + if self:attr("vim_on_melee") and self ~= target then self:incVim(self:attr("vim_on_melee")) end else self:logCombat(target, "#Source# misses #Target#.") target:fireTalentCheck("callbackOnMeleeMiss", self, dam) @@ -876,17 +876,19 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) end -- Regen on being hit - if hitted and not target.dead and target:attr("stamina_regen_when_hit") then target:incStamina(target.stamina_regen_when_hit) end - if hitted and not target.dead and target:attr("mana_regen_when_hit") then target:incMana(target.mana_regen_when_hit) end - if hitted and not target.dead and target:attr("equilibrium_regen_when_hit") then target:incEquilibrium(-target.equilibrium_regen_when_hit) end - if hitted and not target.dead and target:attr("psi_regen_when_hit") then target:incPsi(target.psi_regen_when_hit) end - if hitted and not target.dead and target:attr("hate_regen_when_hit") then target:incHate(target.hate_regen_when_hit) end - if hitted and not target.dead and target:attr("vim_regen_when_hit") then target:incVim(target.vim_regen_when_hit) end - - -- Resource regen on hit - if hitted and self:attr("stamina_regen_on_hit") then self:incStamina(self.stamina_regen_on_hit) end - if hitted and self:attr("mana_regen_on_hit") then self:incMana(self.mana_regen_on_hit) end - if hitted and self:attr("psi_regen_on_hit") then self:incPsi(self.psi_regen_on_hit) end + if self ~= target then + if hitted and not target.dead and target:attr("stamina_regen_when_hit") then target:incStamina(target.stamina_regen_when_hit) end + if hitted and not target.dead and target:attr("mana_regen_when_hit") then target:incMana(target.mana_regen_when_hit) end + if hitted and not target.dead and target:attr("equilibrium_regen_when_hit") then target:incEquilibrium(-target.equilibrium_regen_when_hit) end + if hitted and not target.dead and target:attr("psi_regen_when_hit") then target:incPsi(target.psi_regen_when_hit) end + if hitted and not target.dead and target:attr("hate_regen_when_hit") then target:incHate(target.hate_regen_when_hit) end + if hitted and not target.dead and target:attr("vim_regen_when_hit") then target:incVim(target.vim_regen_when_hit) end + + -- Resource regen on hit + if hitted and self:attr("stamina_regen_on_hit") then self:incStamina(self.stamina_regen_on_hit) end + if hitted and self:attr("mana_regen_on_hit") then self:incMana(self.mana_regen_on_hit) end + if hitted and self:attr("psi_regen_on_hit") then self:incPsi(self.psi_regen_on_hit) end + end -- Ablative armor if hitted and not target.dead and target:attr("carbon_spikes") then