Commit 029f6aef3fcdfa2b0558ab303b2a6aaf4f97c603

Authored by Chris Davidson
1 parent 4f41ad77

Redesign Life Tap

Now grants lifesteal for 2 turns
... ... @@ -110,15 +110,17 @@ newTalent{
110 110 cooldown = 20,
111 111 range = 10,
112 112 no_energy = true,
113   - tactical = { BUFF = 2 },
114   - getMult = function(self,t) return self:combatTalentScale(t, 8, 16) end,
  113 + tactical = { HEAL = 2 },
  114 + getMult = function(self,t) return self:combatTalentSpellDamage(t, 4, 30) end,
115 115 action = function(self, t)
116   - self:setEffect(self.EFF_LIFE_TAP, 7, {power=t.getMult(self,t)})
  116 + self:setEffect(self.EFF_LIFE_TAP, 2, {power=t.getMult(self,t)})
117 117 game:playSoundNear(self, "talents/spell_generic2")
118 118 return true
119 119 end,
120 120 info = function(self, t)
121   - return ([[Tap your life force to provide a furious boost, increasing all damage you deal by %0.1f%% for 7 turns.]]):
  121 + return ([[Feed on the pain you cause your foes.
  122 + For 2 turns you gain %d%% lifesteal on all damage dealt.
  123 + The lifesteal will increase with your Spellpower.]]):
122 124 format(t.getMult(self,t))
123 125 end,
124 126 }
... ...
... ... @@ -581,18 +581,24 @@ newEffect{
581 581 newEffect{
582 582 name = "LIFE_TAP", image = "talents/life_tap.png",
583 583 desc = "Life Tap",
584   - long_desc = function(self, eff) return ("The target taps its blood's hidden power, increasing all damage done by %d%%."):format(eff.power) end,
  584 + long_desc = function(self, eff) return ("The target taps its blood's hidden power, healing for %d%% of all damage they deal."):format(eff.power) end,
585 585 type = "magical",
586 586 subtype = { blight=true },
587 587 status = "beneficial",
588   - parameters = { power=10 },
589   - on_gain = function(self, err) return "#Target# is overloaded with power.", "+Life Tap" end,
590   - on_lose = function(self, err) return "#Target# seems less dangerous.", "-Life Tap" end,
  588 + parameters = { power=0 },
  589 + on_gain = function(self, err) return "#Target# looks healthier as he deals damage.", "+Life Tap" end,
  590 + on_lose = function(self, err) return "#Target# stops leeching life.", "-Life Tap" end,
591 591 activate = function(self, eff)
592   - eff.pid = self:addTemporaryValue("inc_damage", {all=eff.power})
593 592 end,
594 593 deactivate = function(self, eff)
595   - self:removeTemporaryValue("inc_damage", eff.pid)
  594 + end,
  595 + callbackOnDealDamage = function(self, eff, value, target, dead, death_node)
  596 + -- Lifesteal done here to avoid stacking in bad ways with other LS effects
  597 + if value <= 0 or not target then return end
  598 + local leech = math.min(value, target.life) * eff.power / 100
  599 + if leech > 0 then
  600 + self:heal(leech, self)
  601 + end
596 602 end,
597 603 }
598 604
... ...