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

Damage Smearing will now convert all damage except temporal damage into...

Damage Smearing will now convert all damage except temporal damage into temporal damage over time rather than arcane damage


git-svn-id: http://svn.net-core.org/repos/t-engine4@3455 51575b47-30f0-44d4-a5cc-537603b46e54
parent a17ea8d9
No related branches found
No related tags found
No related merge requests found
......@@ -1180,12 +1180,7 @@ function _M:onTakeHit(value, src)
if self.on_takehit then value = self:check("on_takehit", value, src) end
-- Chronomancy
if self:attr("damage_smearing") and value >= 10 then
self:setEffect(self.EFF_SMEARED, 5, {src=src, power=value/6})
value = value / 6
end
-- Shield of Light
if value > 0 and self:isTalentActive(self.T_SHIELD_OF_LIGHT) then
if value <= 2 then
drain = value
......
......@@ -108,6 +108,13 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
if type ~= DamageType.PHYSICAL and target.knowTalent and target:knowTalent(target.T_STONE_FORTRESS) and target:hasEffect(target.EFF_DWARVEN_RESILIENCE) then
dam = math.max(0, dam - target:combatArmor() * (50 + target:getTalentLevel(target.T_STONE_FORTRESS) * 10) / 100)
end
-- Damage Smearing
if type ~= DamageType.TEMPORAL and target:hasEffect(target.EFF_DAMAGE_SMEARING) then
local smear = dam
target:setEffect(target.EFF_SMEARED, 6, {src=src, power=smear/6})
dam = 0
end
-- Reduce damage with resistance
if target.resists then
......
......@@ -105,7 +105,7 @@ newTalent{
require = temporal_req4,
points = 5,
paradox = 25,
cooldown = 50,
cooldown = 25,
tactical = { DEFEND = 2 },
getDuration = function(self, t) return 2 + math.ceil(self:getTalentLevel(t) * getParadoxModifier(self, pm)) end,
action = function(self, t)
......@@ -115,7 +115,7 @@ newTalent{
end,
info = function(self, t)
local duration = t.getDuration(self, t)
return ([[For the next %d turns you spread all damage that deals 10 or more points out over five turns rather then taking it all at once.
return ([[For the next %d turns you convert all non-temporal damage you receive into temporal damage spread out over six turns.
The duration will scale with your Paradox.]]):format (duration)
end,
}
......@@ -2539,20 +2539,20 @@ newEffect{
on_gain = function(self, err) return "The fabric of time alters around #target#.", "+Damage Smearing" end,
on_lose = function(self, err) return "The fabric of time around #target# stabilizes.", "-Damage Smearing" end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("damage_smearing", eff.power)
-- eff.tmpid = self:addTemporaryValue("damage_smearing", eff.power)
--- Warning there can be only one time shield active at once for an actor
eff.particle = self:addParticles(Particles.new("time_shield", 1))
end,
deactivate = function(self, eff)
self:removeParticles(eff.particle)
self:removeTemporaryValue("damage_smearing", eff.tmpid)
-- self:removeTemporaryValue("damage_smearing", eff.tmpid)
end,
}
newEffect{
name = "SMEARED",
desc = "Smeared",
long_desc = function(self, eff) return ("Damage received in the past is returned as %0.2f arcane damage per turn."):format(eff.power) end,
long_desc = function(self, eff) return ("Damage received in the past is returned as %0.2f temporal damage per turn."):format(eff.power) end,
type = "time",
status = "detrimental",
parameters = { power=10 },
......@@ -2568,7 +2568,7 @@ newEffect{
return old_eff
end,
on_timeout = function(self, eff)
DamageType:get(DamageType.ARCANE).projector(eff.src, self.x, self.y, DamageType.ARCANE, eff.power)
DamageType:get(DamageType.TEMPORAL).projector(eff.src, self.x, self.y, DamageType.TEMPORAL, eff.power)
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