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

change scaling on suncloak

parent 1e6fdf68
No related branches found
No related tags found
No related merge requests found
......@@ -4832,6 +4832,9 @@ function _M:getTalentCooldown(t)
if type(cd) == "function" then cd = cd(self, t) end
if not cd then return end
-- Can not touch this cooldown
if t.fixed_cooldown then return cd end
if t.type[1] == "inscriptions/infusions" then
local eff = self:hasEffect(self.EFF_INFUSION_COOLDOWN)
if eff and eff.power then cd = cd + eff.power end
......
......@@ -78,7 +78,8 @@ newTalent{
type = {"celestial/sun", 2},
require = divi_req2,
points = 5,
cooldown = 20, -- CD reduction works on this
cooldown = 20,
fixed_cooldown = true,
positive = -15,
tactical = { BUFF = 2 },
direct_hit = true,
......@@ -87,8 +88,9 @@ newTalent{
range = 10,
getCap = function(self, t) return math.max(50, 100 - self:getTalentLevelRaw(t) * 10) end,
getHaste = function(self, t) return math.min(0.9, self:combatTalentSpellDamage(t, 0.2, 0.7)) end,
getCD = function(self, t) return math.min(0.5, self:combatTalentSpellDamage(t, 5, 450) / 1000) end,
action = function(self, t)
self:setEffect(self.EFF_SUNCLOAK, 6, {cap=t.getCap(self, t), haste=t.getHaste(self, t)})
self:setEffect(self.EFF_SUNCLOAK, 6, {cap=t.getCap(self, t), haste=t.getHaste(self, t), cd=t.getCD(self, t)})
game:playSoundNear(self, "talents/flame")
return true
end,
......@@ -96,7 +98,7 @@ newTalent{
return ([[You wrap yourself in a cloak of sunlight that empowers your magic and protects you for 6 turns.
While the cloak is active your spell casting speed is increased by %d%%, your spell cooldowns are reduced by %d%%, and you cannot take more than %d%% of your maximum life from a single blow.
The effects will increase with your Spellpower.]]):
format(t.getHaste(self, t)*100, t.getHaste(self, t)*100, t.getCap(self, t))
format(t.getHaste(self, t)*100, t.getCD(self, t)*100, t.getCap(self, t))
end,
}
......
......@@ -2549,13 +2549,13 @@ newEffect{
type = "magical",
subtype = { sun=true, },
status = "beneficial",
parameters = {cap = 1, haste = 0.1},
parameters = {cap = 1, haste = 0.1, cd = 0.1},
on_gain = function(self, err) return "#Target# is energized and protected by the Sun!", "+Suncloak" end,
on_lose = function(self, err) return "#Target#'s solar fury subsides.", "-Suncloak" end,
activate = function(self, eff)
self:effectTemporaryValue(eff, "flat_damage_cap", {all=eff.cap})
self:effectTemporaryValue(eff, "combat_spellspeed", eff.haste)
self:effectTemporaryValue(eff, "spell_cooldown_reduction", eff.haste)
self:effectTemporaryValue(eff, "spell_cooldown_reduction", eff.cd)
eff.particle = self:addParticles(Particles.new("suncloak", 1))
end,
deactivate = function(self, eff)
......
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