Commit c025a0c587bacd9d5dd536027428afda4f9e5bd2

Authored by dg
1 parent ad28ec84

New wild gifts talent tree: Harmony


git-svn-id: http://svn.net-core.org/repos/t-engine4@3378 51575b47-30f0-44d4-a5cc-537603b46e54
... ... @@ -837,16 +837,25 @@ end
837 837
838 838 --- Called before healing
839 839 function _M:onHeal(value, src)
840   - if self:hasEffect(self.EFF_UNSTOPPABLE) then
841   - return 0
842   - end
843   - if self:attr("encased_in_ice") then
844   - return 0
845   - end
  840 + if self:hasEffect(self.EFF_UNSTOPPABLE) then return 0 end
  841 + if self:attr("encased_in_ice") then return 0 end
  842 +
846 843 value = value * util.bound((self.healing_factor or 1), 0, 2.5)
847 844
848   - if self:attr("stunned") then
849   - value = value / 2
  845 + if self:attr("stunned") then value = value / 2 end
  846 +
  847 + local eff = self:hasEffect(self.EFF_HEALING_NEXUS)
  848 + if eff and value > 0 and not self.heal_leech_active then
  849 + eff.src.heal_leech_active = true
  850 + eff.src:heal(value * eff.pct, src)
  851 + eff.src.heal_leech_active = nil
  852 + eff.src:incEquilibrium(-eff.eq)
  853 + if eff.src == self then
  854 + game.logSeen(self, "%s heal is doubled!", self.name)
  855 + else
  856 + game.logSeen(self, "%s steals %s heal!", eff.src.name:capitalize(), self.name)
  857 + return 0
  858 + end
850 859 end
851 860
852 861 print("[HEALING]", self.uid, self.name, "for", value)
... ...
... ... @@ -128,34 +128,34 @@ newTalent{
128 128 }
129 129
130 130 newTalent{
131   - name = "Natural Perfection",
  131 + name = "Healing Nexus",
132 132 type = {"wild-gift/harmony", 4},
133 133 require = gifts_req4,
134 134 points = 5,
135   - equilibrium = 20,
136   - cooldown = 50,
  135 + equilibrium = 24,
  136 + cooldown = 20,
137 137 range = 10,
138   - tactical = { BUFF = 2 },
  138 + tactical = { DISABLE = 3, HEAL = 0.5 },
  139 + direct_hit = true,
  140 + requires_target = true,
  141 + range = 0,
  142 + radius = function(self, t) return 1 + self:getTalentLevelRaw(t) end,
  143 + target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=true, talent=t} end,
139 144 action = function(self, t)
140   - local nb = math.ceil(self:getTalentLevel(t) + 2)
141   - local tids = {}
142   - for tid, _ in pairs(self.talents_cd) do
143   - local tt = self:getTalentFromId(tid)
144   - if tt.type[2] <= self:getTalentLevelRaw(t) and tt.type[1]:find("^wild%-gift/") then
145   - tids[#tids+1] = tid
146   - end
147   - end
148   - for i = 1, nb do
149   - if #tids == 0 then break end
150   - local tid = rng.tableRemove(tids)
151   - self.talents_cd[tid] = nil
152   - end
153   - self.changed = true
  145 + local tg = self:getTalentTarget(t)
  146 + local grids = self:project(tg, self.x, self.y, function(px, py)
  147 + local target = game.level.map(px, py, Map.ACTOR)
  148 + if not target then return end
  149 + target:setEffect(target.EFF_HEALING_NEXUS, 3 + self:getTalentLevelRaw(t), {src=self, pct=0.4 + self:getTalentLevel(t) / 10, eq=5 + self:getTalentLevel(t)})
  150 + end)
  151 + game.level.map:particleEmitter(self.x, self.y, tg.radius, "ball_acid", {radius=tg.radius})
154 152 game:playSoundNear(self, "talents/spell_generic2")
155 153 return true
156 154 end,
157 155 info = function(self, t)
158   - return ([[Your deep link with Nature allows you to reset the cooldown of %d of your wild gifts of level %d or less.]]):
159   - format(math.ceil(self:getTalentLevel(t) + 2), self:getTalentLevelRaw(t))
  156 + return ([[A wave a natural energies flow around you in a radius of %d, all creatures hit will suffer healing nexus for %d turns.
  157 + While under the effect all healing done to the creature will instead heal you for %d%% of the heal value (and no healing at all goes to the target).
  158 + Each heal leeched will also restore %d equilibrium]]):
  159 + format(self:getTalentRadius(t), 3 + self:getTalentLevelRaw(t), (0.4 + self:getTalentLevel(t) / 10) * 100, 5 + self:getTalentLevel(t))
160 160 end,
161 161 }
... ...
... ... @@ -3998,3 +3998,16 @@ newEffect{
3998 3998 end
3999 3999 end,
4000 4000 }
  4001 +
  4002 +newEffect{
  4003 + name = "HEALING_NEXUS",
  4004 + desc = "Healing Nexus",
  4005 + long_desc = function(self, eff) return ("All healing done to the target is instead redirected to %s by %d%%."):format(eff.src.name, eff.pct * 100, eff.src.name) end,
  4006 + type = "physical",
  4007 + status = "beneficial",
  4008 + parameters = { pct = 1 },
  4009 + activate = function(self, eff)
  4010 + end,
  4011 + deactivate = function(self, eff)
  4012 + end,
  4013 +}
... ...