Skip to content
Snippets Groups Projects
Commit c025a0c5 authored by dg's avatar dg
Browse files

New wild gifts talent tree: Harmony

git-svn-id: http://svn.net-core.org/repos/t-engine4@3378 51575b47-30f0-44d4-a5cc-537603b46e54
parent ad28ec84
No related branches found
No related tags found
No related merge requests found
......@@ -837,16 +837,25 @@ end
--- Called before healing
function _M:onHeal(value, src)
if self:hasEffect(self.EFF_UNSTOPPABLE) then
return 0
end
if self:attr("encased_in_ice") then
return 0
end
if self:hasEffect(self.EFF_UNSTOPPABLE) then return 0 end
if self:attr("encased_in_ice") then return 0 end
value = value * util.bound((self.healing_factor or 1), 0, 2.5)
if self:attr("stunned") then
value = value / 2
if self:attr("stunned") then value = value / 2 end
local eff = self:hasEffect(self.EFF_HEALING_NEXUS)
if eff and value > 0 and not self.heal_leech_active then
eff.src.heal_leech_active = true
eff.src:heal(value * eff.pct, src)
eff.src.heal_leech_active = nil
eff.src:incEquilibrium(-eff.eq)
if eff.src == self then
game.logSeen(self, "%s heal is doubled!", self.name)
else
game.logSeen(self, "%s steals %s heal!", eff.src.name:capitalize(), self.name)
return 0
end
end
print("[HEALING]", self.uid, self.name, "for", value)
......
......@@ -128,34 +128,34 @@ newTalent{
}
newTalent{
name = "Natural Perfection",
name = "Healing Nexus",
type = {"wild-gift/harmony", 4},
require = gifts_req4,
points = 5,
equilibrium = 20,
cooldown = 50,
equilibrium = 24,
cooldown = 20,
range = 10,
tactical = { BUFF = 2 },
tactical = { DISABLE = 3, HEAL = 0.5 },
direct_hit = true,
requires_target = true,
range = 0,
radius = function(self, t) return 1 + self:getTalentLevelRaw(t) end,
target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=true, talent=t} end,
action = function(self, t)
local nb = math.ceil(self:getTalentLevel(t) + 2)
local tids = {}
for tid, _ in pairs(self.talents_cd) do
local tt = self:getTalentFromId(tid)
if tt.type[2] <= self:getTalentLevelRaw(t) and tt.type[1]:find("^wild%-gift/") then
tids[#tids+1] = tid
end
end
for i = 1, nb do
if #tids == 0 then break end
local tid = rng.tableRemove(tids)
self.talents_cd[tid] = nil
end
self.changed = true
local tg = self:getTalentTarget(t)
local grids = self:project(tg, self.x, self.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
target:setEffect(target.EFF_HEALING_NEXUS, 3 + self:getTalentLevelRaw(t), {src=self, pct=0.4 + self:getTalentLevel(t) / 10, eq=5 + self:getTalentLevel(t)})
end)
game.level.map:particleEmitter(self.x, self.y, tg.radius, "ball_acid", {radius=tg.radius})
game:playSoundNear(self, "talents/spell_generic2")
return true
end,
info = function(self, t)
return ([[Your deep link with Nature allows you to reset the cooldown of %d of your wild gifts of level %d or less.]]):
format(math.ceil(self:getTalentLevel(t) + 2), self:getTalentLevelRaw(t))
return ([[A wave a natural energies flow around you in a radius of %d, all creatures hit will suffer healing nexus for %d turns.
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).
Each heal leeched will also restore %d equilibrium]]):
format(self:getTalentRadius(t), 3 + self:getTalentLevelRaw(t), (0.4 + self:getTalentLevel(t) / 10) * 100, 5 + self:getTalentLevel(t))
end,
}
......@@ -3998,3 +3998,16 @@ newEffect{
end
end,
}
newEffect{
name = "HEALING_NEXUS",
desc = "Healing Nexus",
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,
type = "physical",
status = "beneficial",
parameters = { pct = 1 },
activate = function(self, eff)
end,
deactivate = function(self, eff)
end,
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment