Skip to content
Snippets Groups Projects
Commit d6b7beb2 authored by DarkGod's avatar DarkGod
Browse files

Metaflow now only boosts spell levels for soem turns after activation

parent 0b53d4fe
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -211,11 +211,7 @@ newTalent{
end },
getTalentCount = function(self, t) return math.floor(self:combatTalentScale(t, 2, 7, "log")) end,
getMaxLevel = function(self, t) return util.bound(math.floor(self:getTalentLevel(t)), 1, 4) end,
passives = function(self, t, p)
if self:getTalentLevel(t) >= 6 then
self:talentTemporaryValue(p, "spells_bonus_level", 1)
end
end,
getDur = function(self, t) return math.floor(self:combatTalentScale(t, 2, 7)) end,
action = function(self, t)
local tids = {}
for tid, _ in pairs(self.talents_cd) do
......@@ -231,6 +227,7 @@ newTalent{
local tid = rng.tableRemove(tids)
self.talents_cd[tid] = nil
end
self:setEffect(self.EFF_METAFLOW, t:_getDur(self), {power=1})
self.changed = true
game:playSoundNear(self, "talents/spell_generic")
return true
......@@ -239,8 +236,7 @@ newTalent{
local talentcount = t.getTalentCount(self, t)
local maxlevel = t.getMaxLevel(self, t)
return ([[Your mastery of arcane flows allow you to reset the cooldown of up to %d of your spells (that don't have a fixed cooldown) of tier %d or less.
Passive effect:
At talent level 6 all known spells are considered one talent level higher when casting them.]]):
tformat(talentcount, maxlevel)
In addition for %d turns you are overflowing with energy; all known spells are considered one talent level higher when casting them.]]):
tformat(talentcount, maxlevel, t:_getDur(self))
end,
}
......@@ -5358,3 +5358,46 @@ newEffect{
game.level.map:removeParticleEmitter(eff.particle)
end,
}
newEffect{
name = "METAFLOW", image = "talents/metaflow.png",
desc = _t"Metaflow",
long_desc = function(self, eff) return ("Overflowing with energy, increasing all spells talent level by %d."):tformat(eff.power) end,
type = "magical",
subtype = { meta=true },
status = "beneficial",
parameters = {power=1},
on_gain = function(self, err) return _t"#Target# is overflowing with energy!", true end,
on_lose = function(self, err) return _t"#Target# is no more overflowing with energy.", true end,
udpateSustains = function(self)
local reset = {}
for tid, act in pairs(self.sustain_talents) do if act then
local t = self:getTalentFromId(tid)
if not t.no_sustain_autoreset and self:knowTalent(tid) then
reset[#reset+1] = tid
end
end end
self.turn_procs.resetting_talents = true
for i, tid in ipairs(reset) do
self:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_talent_fail=true})
self:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_talent_fail=true, talent_reuse=true})
end
self.turn_procs.resetting_talents = nil
end,
activate = function(self, eff, ed)
eff.tmpid = self:addTemporaryValue("spells_bonus_level", eff.power)
ed.udpateSustains(self)
if core.shader.allow("adv") then
eff.particle1, eff.particle2 = self:addParticles3D("volumetric", {kind="fast_sphere", appear=10, radius=1.2, twist=50, density=15, growSpeed=0.002, scrollingSpeed=0.008, img="continuum_01"})
else
eff.particle1 = self:addParticles(Particles.new("generic_shield", 1, {r=1, g=0, b=0, a=0.5}))
end
end,
deactivate = function(self, eff, ed)
self:removeTemporaryValue("spells_bonus_level", eff.tmpid)
if eff.particle1 then self:removeParticles(eff.particle1) end
if eff.particle2 then self:removeParticles(eff.particle2) end
ed.udpateSustains(self)
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