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

Time Shield changed to heal you instead of damage you

git-svn-id: http://svn.net-core.org/repos/t-engine4@6749 51575b47-30f0-44d4-a5cc-537603b46e54
parent bede38ef
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ newTalent{
require = spells_req1,
points = 5,
random_ego = "utility",
mana = 20,
mana = 10,
cooldown = 30,
tactical = { DISABLE = 2 },
reflectable = true,
......@@ -57,31 +57,29 @@ newTalent{
type = {"spell/temporal", 2},
require = spells_req2,
points = 5,
mana = 50,
mana = 25,
cooldown = 18,
tactical = { DEFEND = 2 },
range = 10,
no_energy = true,
getMaxAbsorb = function(self, t) return 50 + self:combatTalentSpellDamage(t, 50, 450) end,
getDuration = function(self, t) return util.bound(5 + math.floor(self:getTalentLevel(t)), 5, 15) end,
getDotDuration = function(self, t) return util.bound(4 + math.floor(self:getTalentLevel(t)), 4, 12) end,
getTimeReduction = function(self, t) return util.bound(15 + math.floor(self:getTalentLevel(t) * 2), 15, 35) end,
getTimeReduction = function(self, t) return 25 + util.bound(15 + math.floor(self:getTalentLevel(t) * 2), 15, 35) end,
action = function(self, t)
self:setEffect(self.EFF_TIME_SHIELD, t.getDuration(self, t), {power=t.getMaxAbsorb(self, t), dot_dur=t.getDotDuration(self, t), time_reducer=t.getTimeReduction(self, t)})
self:setEffect(self.EFF_TIME_SHIELD, t.getDuration(self, t), {power=t.getMaxAbsorb(self, t), dot_dur=5, time_reducer=t.getTimeReduction(self, t)})
game:playSoundNear(self, "talents/spell_generic")
return true
end,
info = function(self, t)
local maxabsorb = t.getMaxAbsorb(self, t)
local duration = t.getDuration(self, t)
local dotdur = t.getDotDuration(self,t)
local time_reduc = t.getTimeReduction(self,t)
return ([[This intricate spell instantly erects a time shield around the caster, preventing any incoming damage and sending it forward in time.
Once either the maximum damage (%d) is absorbed, or the time runs out (%d turns), the stored damage will return as a temporal wake over time (%d turns).
Each turn the temporal wake is active, a temporal vortex will spawn at your feet, damaging any inside after one turn for three turns.
Once either the maximum damage (%d) is absorbed, or the time runs out (%d turns), the stored damage will return as a temporal restoration field over time (5 turns).
Each turn the restoration field is active, you get healed for 10%% of the absorbed damage (Aegis Shielding talent affects the percentage).
While under the effect of Time Shield, all newly applied magical, physical and mental effects will have their durations reduced by %d%%.
The shield's max absorption will increase with your Spellpower.]]):
format(maxabsorb, duration, dotdur, time_reduc)
format(maxabsorb, duration, time_reduc)
end,
}
......@@ -91,7 +89,7 @@ newTalent{
require = spells_req3,
points = 5,
random_ego = "utility",
mana = 120,
mana = 100,
cooldown = 40,
tactical = { DISABLE = 1, ESCAPE = 3, PROTECT = 3 },
range = 10,
......
......@@ -139,10 +139,13 @@ newEffect{
self:removeTemporaryValue("reduce_status_effects_time", eff.durid)
self:removeParticles(eff.particle)
-- Time shield ends, setup a dot if needed
-- Time shield ends, setup a restoration field if needed
if eff.power - self.time_shield_absorb > 0 then
print("Time shield dot", eff.power - self.time_shield_absorb, (eff.power - self.time_shield_absorb) / eff.dot_dur)
self:setEffect(self.EFF_TIME_DOT, eff.dot_dur, {power=(eff.power - self.time_shield_absorb) / eff.dot_dur})
local val = (eff.power - self.time_shield_absorb) / eff.dot_dur / 2
if self:attr("shield_factor") then val = val * (100 + self:attr("shield_factor")) / 100 end
print("Time shield restoration field", eff.power - self.time_shield_absorb, val)
self:setEffect(self.EFF_TIME_DOT, eff.dot_dur, {power=val})
end
self:removeTemporaryValue("time_shield", eff.tmpid)
......@@ -153,14 +156,14 @@ newEffect{
newEffect{
name = "TIME_DOT",
desc = "Temporal Wake",
long_desc = function(self, eff) return ("The time distortion protecting the target has ended. All damage forwarded in time is now appearing as temporal vortexes each turn. Temporal Vortexes do %0.2f temporal damage per turn for 3 turn."):format(eff.power) end,
desc = "Temporal Restoration Field",
long_desc = function(self, eff) return ("The time distortion has created a restoration field, healing the target for %d each turn."):format(eff.power) end,
type = "other",
subtype = { time=true },
status = "detrimental",
status = "beneficial",
parameters = { power=10 },
on_gain = function(self, err) return "The powerful time-altering energies come crashing down on #target#.", "+Temporal Wake" end,
on_lose = function(self, err) return "The fabric of time around #target# returns to normal.", "-Temporal Wake" end,
on_gain = function(self, err) return "The powerful time-altering energies generate a restoration field on #target#.", "+Temporal Restoration Field" end,
on_lose = function(self, err) return "The fabric of time around #target# returns to normal.", "-Temporal Restoration Field" end,
activate = function(self, eff)
eff.particle = self:addParticles(Particles.new("time_shield", 1))
end,
......@@ -168,15 +171,7 @@ newEffect{
self:removeParticles(eff.particle)
end,
on_timeout = function(self, eff)
-- Add a lasting map effect
game.level.map:addEffect(self,
self.x, self.y, 3,
DamageType.TEMPORAL, eff.power,
0,
5, nil,
{type="temporal_vortex"},
nil, true
)
self:heal(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