Untested code below...
Code: Select all
newTalent{
name = "Attenuate",
type = {"chronomancy/flux", 3},
require = chrono_req3,
points = 5,
cooldown = 6,
tactical = { ATTACKAREA = { TEMPORAL = 2 } },
range = 10,
paradox = function (self, t) return getParadoxCost(self, t, 10) end,
radius = function(self, t) return math.floor(self:combatTalentScale(t, 1, 2)) end,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 25, 290, getParadoxSpellpower(self, t)) end,
getDuration = function(self, t) return getExtensionModifier(self, t, 6) end,
target = function(self, t)
return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), nowarning=true, talent=t}
end,
requires_target = true,
direct_hit = true,
action = function(self, t)
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local _ _, x, y = self:canProject(tg, x, y)
local damage = self:spellCrit(t.getDamage(self, t))
self:project(tg, x, y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
if target:isTalentActive(target.T_REALITY_SMEARING) then
target:setEffect(target.EFF_ATTENUATE_BEN, t.getDuration(self, t), {power=(damage/6)*0.4, src=self})
else
target:setEffect(target.EFF_ATTENUATE_DET, t.getDuration(self, t), {power=damage/6, src=self, apply_power=getParadoxSpellpower(self, t)})
end
end)
game.level.map:particleEmitter(x, y, tg.radius, "generic_sploom", {rm=100, rM=100, gm=200, gM=220, bm=200, bM=220, am=35, aM=90, radius=tg.radius, basenb=60})
game:playSoundNear(self, "talents/tidalwave")
return true
end,
info = function(self, t)
local damage = t.getDamage(self, t)/6
local duration = t.getDuration(self, t)
local radius = self:getTalentRadius(t)
return ([[Deals %0.2f temporal damage per turn for %d turns to all targets in a radius of %d. Targets with Reality Smearing active will instead recover %d life per turn for %d turns.
If a target is reduced below 20%% life while Attenuate is active it may be instantly slain.
The damage will scale with your Spellpower.]]):format(damDesc(self, DamageType.TEMPORAL, damage), duration, radius, damage *0.4, duration)
end,
}
Code: Select all
newTalent{
name = "Echoes From The Past",
type = {"chronomancy/timetravel", 4},
require = chrono_req4,
points = 5,
paradox = function (self, t) return getParadoxCost(self, t, 24) end,
cooldown = 12,
tactical = { ATTACKAREA = {TEMPORAL = 2} },
range = 0,
radius = function(self, t) return math.floor(self:combatTalentScale(t, 2.5, 4.5)) end,
target = function(self, t)
return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=false, talent=t}
end,
direct_hit = true,
requires_target = true,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 20, 220, getParadoxSpellpower(self, t)) end,
getPercent = function(self, t) return self:combatTalentLimit(t, 40, 15, 30)/100 end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local damage = self:spellCrit(t.getDamage(self, t))
self:project(tg, self.x, self.y, function(px, py)
DamageType:get(DamageType.TEMPORAL).projector(self, px, py, DamageType.TEMPORAL, damage)
-- Echo
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
local percent = t.getPercent(self, t)/target.rank
local dam = (target.max_life - target.life) * percent
DamageType:get(DamageType.TEMPORAL).projector(self, px, py, DamageType.TEMPORAL, dam)
end)
game.level.map:particleEmitter(self.x, self.y, 1, "shout", {size=4, distorion_factor=0.6, radius=self:getTalentRadius(t), life=30, nb_circles=8, rm=0.6, rM=0.6, gm=0.6, gM=0.6, bm=1, bM=1, am=0.6, aM=0.8})
game:playSoundNear(self, "talents/warp")
return true
end,
info = function(self, t)
local percent = t.getPercent(self, t) * 100
local radius = self:getTalentRadius(t)
local damage = t.getDamage(self, t)
return ([[Creates a temporal echo in a radius of %d around you. Affected targets take %0.2f temporal damage, as well as up to %d%% of the difference between their current life and max life as additional temporal damage.
The additional damage will be divided by the target's rank and the damage scales with your Spellpower.]]):
format(radius, damDesc(self, DamageType.TEMPORAL, damage), percent)
end,
}
