Skip to content
Snippets Groups Projects
Commit f2aa05fb authored by Eric Wykoff's avatar Eric Wykoff
Browse files

entropy now removes a single sustain per turn

parent e351dc2e
No related branches found
No related tags found
1 merge request!123Chrono wrap up
...@@ -168,10 +168,9 @@ newTalent{ ...@@ -168,10 +168,9 @@ newTalent{
points = 5, points = 5,
paradox = function (self, t) return getParadoxCost(self, t, 20) end, paradox = function (self, t) return getParadoxCost(self, t, 20) end,
cooldown = 12, cooldown = 12,
tactical = { ATTACK = { TEMPORAL = 2 }, DEBUFF=3 }, tactical = { DEBUFF=3 },
range = 10, range = 10,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 20, 100, getParadoxSpellpower(self, t)) end, getDuration = function(self, t) return getExtensionModifier(self, t, math.floor(self:combatTalentScale(t, 1, 7))) end,
getDuration = function(self, t) return getExtensionModifier(self, t, math.floor(self:combatTalentScale(t, 3, 7))) end,
target = function(self, t) target = function(self, t)
return {type="hit", range=self:getTalentRange(t), talent=t} return {type="hit", range=self:getTalentRange(t), talent=t}
end, end,
...@@ -183,18 +182,14 @@ newTalent{ ...@@ -183,18 +182,14 @@ newTalent{
if not x or not y or not target then return nil end if not x or not y or not target then return nil end
local _ _, x, y = self:canProject(tg, x, y) local _ _, x, y = self:canProject(tg, x, y)
local damage = self:spellCrit(t.getDamage(self, t)) target:setEffect(target.EFF_ENTROPY, t.getDuration(self, t), {apply_power=getParadoxSpellpower(self, t)})
target:setEffect(target.EFF_ENTROPY, t.getDuration(self, t), {power=damage, src=self, apply_power=getParadoxSpellpower(self, t)})
game:playSoundNear(self, "talents/dispel") game:playSoundNear(self, "talents/dispel")
return true return true
end, end,
info = function(self, t) info = function(self, t)
local damage = t.getDamage(self, t)
local duration = t.getDuration(self, t) local duration = t.getDuration(self, t)
return ([[Over the next %d turns all beneficial timed effects on the target tick twice as fast. return ([[Each turn, for the next %d turns, one of the target's sustained talents will be deactivated.]]):format(duration)
Each timed effect affected by this talent deals %0.2f temporal damage to the target.
The damage will scale with your Spellpower.]]):format(duration, damDesc(self, DamageType.TEMPORAL, damage))
end, end,
} }
...@@ -3182,41 +3182,27 @@ newEffect{ ...@@ -3182,41 +3182,27 @@ newEffect{
newEffect{ newEffect{
name = "ENTROPY", image = "talents/entropy.png", name = "ENTROPY", image = "talents/entropy.png",
desc = "Entropy", desc = "Entropy",
long_desc = function(self, eff) return ("The target's timed effects are ticking twice as fast and it's taking %d temporal damage per turn, per timed effect."):format(eff.power) end, long_desc = function(self, eff) return "The target is losing one sustain per turn." end,
on_gain = function(self, err) return "#Target# is caught in an entropic field!", "+Entropy" end, on_gain = function(self, err) return "#Target# is caught in an entropic field!", "+Entropy" end,
on_lose = function(self, err) return "#Target# is free from the entropy.", "-Entropy" end, on_lose = function(self, err) return "#Target# is free from the entropy.", "-Entropy" end,
type = "magical", type = "magical",
subtype = { temporal=true }, subtype = { temporal=true },
status = "detrimental", status = "detrimental",
parameters = {power=10}, parameters = {},
on_timeout = function(self, eff) on_timeout = function(self, eff)
local count = 0 local effs = {}
local todel = {}
-- Go through all spell effects -- Go through all sustained talents
for eff_id, p in pairs(self.tmp) do for tid, act in pairs(self.sustain_talents) do
local e = self.tempeffect_def[eff_id] if act then
if e.type ~= "other" and e.status == "beneficial" then effs[#effs+1] = {"talent", tid}
if p.dur <= 0 then
todel[#todel+1] = eff
else
if e.on_timeout then
if p.src then p.src.__project_source = p end -- intermediate projector source
if e.on_timeout(self, p) then
todel[#todel+1] = eff
end
if p.src then p.src.__project_source = nil end
end
end
count = count + 1
p.dur = p.dur - e.decrease
end end
end end
DamageType:get(DamageType.TEMPORAL).projector(eff.src, self.x, self.y, DamageType.TEMPORAL, eff.power*count) -- deactivate one at random
if #effs > 0 then
while #todel > 0 do local eff = rng.tableRemove(effs)
self:removeEffect(table.remove(todel)) self:forceUseTalent(eff[2], {ignore_energy=true})
end end
end, 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