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

Retch now also has a chance to remove a detrimental or beneficial (depending...

Retch now also has a chance to remove a detrimental or beneficial (depending on undead status) physical effect
Ghoulish Leap cooldown reduces with level
Ghoul talent now provides a maximum damage cap. No blows can deal more than X% of their total life


git-svn-id: http://svn.net-core.org/repos/t-engine4@6780 51575b47-30f0-44d4-a5cc-537603b46e54
parent 5c1c7751
No related branches found
No related tags found
No related merge requests found
......@@ -1625,8 +1625,44 @@ newDamageType{
local target = game.level.map(x, y, Map.ACTOR)
if target and (target:attr("undead") or target.retch_heal) then
target:heal(dam * 1.5)
if src.getTalentLevel then
local tl = src:getTalentLevel(src.T_RETCH)
if rng.percent(tl * 5) then
local effs = {}
local status = "detrimental"
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.status == status and e.type == "physical" then
effs[#effs+1] = {"effect", eff_id}
end
end
if #effs > 0 then
local eff = rng.tableRemove(effs)
target:removeEffect(eff[2])
end
end
end
elseif target then
DamageType:get(DamageType.BLIGHT).projector(src, x, y, DamageType.BLIGHT, dam)
if src.getTalentLevel then
local tl = src:getTalentLevel(src.T_RETCH)
if rng.percent(tl * 5) then
local effs = {}
local status = "beneficial"
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.status == status and e.type == "physical" then
effs[#effs+1] = {"effect", eff_id}
end
end
if #effs > 0 then
local eff = rng.tableRemove(effs)
target:removeEffect(eff[2])
end
end
end
end
end,
}
......
......@@ -35,8 +35,14 @@ newTalent{
self.inc_stats[self.STAT_CON] = self.inc_stats[self.STAT_CON] - 2
self:onStatChange(self.STAT_CON, -2)
end,
getMaxDamage = function(self, t) return math.max(50, 100 - self:getTalentLevelRaw(t) * 10) end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "flat_damage_cap", {all=t.getMaxDamage(self, t)})
end,
info = function(self, t)
return ([[Improves your ghoulish body, increasing Strength and Constitution by %d.]]):format(2 * self:getTalentLevelRaw(t))
return ([[Improves your ghoulish body, increasing Strength and Constitution by %d.
Your body also becomes incredibly resilient to damage, you can never take a blow that deals more than %d%% of your maximum life.]])
:format(2 * self:getTalentLevelRaw(t), t.getMaxDamage(self, t))
end,
}
......@@ -45,9 +51,9 @@ newTalent{
type = {"undead/ghoul", 2},
require = undeads_req2,
points = 5,
cooldown = 20,
tactical = { CLOSEIN = 3 },
direct_hit = true,
cooldown = function(self, t) return math.max(10, 22 - self:getTalentLevelRaw(t) * 2) end,
range = function(self, t) return math.floor(4 + self:getTalentLevel(t) * 1.2) end,
requires_target = true,
action = function(self, t)
......@@ -110,7 +116,9 @@ newTalent{
info = function(self, t)
local dam = 10 + self:combatTalentStatDamage(t, "con", 10, 60)
return ([[Vomit on the ground around you, healing any undead in the area and damaging anyone else.
Lasts %d turns, and deals %d blight damage or heals %d life.]]):format(self:getTalentLevelRaw(t) * 2 + 5, damDesc(self, DamageType.BLIGHT, dam), dam * 1.5)
Lasts %d turns, and deals %d blight damage or heals %d life.
Creatures standing in the retch also have %d%% chance to loose a physical effect each turn.
Undeads will be stripped from a detrimental effect while others will be stripped from a beneficial effect.]]):format(self:getTalentLevelRaw(t) * 2 + 5, damDesc(self, DamageType.BLIGHT, dam), dam * 1.5, self:getTalentLevel(t) * 5)
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