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

Disruption Shield visualy changes when it is into the mana eating phase

parent 4c0e5362
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -231,6 +231,7 @@ newTalent{
absorbed = cb.value
cb.value = 0
game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):tformat(absorbed), false)
p.was_depleted = false
return true
else
cb.value = cb.value - self.disruption_shield_power
......@@ -238,6 +239,14 @@ newTalent{
self.disruption_shield_power = 0
end
if not p.was_depleted then
p.was_depleted = true
if core.shader.active(4) then
self:removeParticles(p.particle)
p.particle = self:addParticles(Particles.new("shader_shield", 1, {size_factor=1.8, img="shield6"}, {type="runicshield", shieldIntensity=0.1, ellipsoidalFactor=1, scrollingSpeed=1, time_factor=2000, bubbleColor={0.8, 0.1, 1.0, 0.8}, auraWidth=0.2, auraColor={0.85, 0.3, 1.0, 0.8}}))
end
end
local do_explode = false
local ratio = t.getManaRatio(self, t)
local mana_usage = cb.value * ratio
......@@ -282,6 +291,14 @@ newTalent{
game.logSeen(self, "%s restores Disruption Shield (+%d) with Aegis!", self:getName(), energy / 2)
end
self.disruption_shield_storage = 0
local p = self:isTalentActive(t.id)
if not p then return end
p.was_depleted = false
if core.shader.active(4) then
self:removeParticles(p.particle)
p.particle = self:addParticles(Particles.new("shader_shield", 1, {size_factor=1.4, img="runicshield"}, {type="runicshield", shieldIntensity=0.1, ellipsoidalFactor=1, scrollingSpeed=-1, time_factor=12000, bubbleColor={0.8, 0.1, 1.0, 0.8}, auraColor={0.85, 0.3, 1.0, 0.8}}))
end
end,
activate = function(self, t)
self.disruption_shield_storage = 0
......@@ -290,7 +307,6 @@ newTalent{
local particle
if core.shader.active(4) then
-- particle = self:addParticles(Particles.new("shader_shield", 1, {size_factor=1.3, img="shield6"}, {type="shield", ellipsoidalFactor=1.05, shieldIntensity=0.1, time_factor=-2500, color={0.8, 0.1, 1.0}, impact_color = {0, 1, 0}, impact_time=800}))
particle = self:addParticles(Particles.new("shader_shield", 1, {size_factor=1.4, img="runicshield"}, {type="runicshield", shieldIntensity=0.1, ellipsoidalFactor=1, scrollingSpeed=-1, time_factor=12000, bubbleColor={0.8, 0.1, 1.0, 0.8}, auraColor={0.85, 0.3, 1.0, 0.8}}))
else
particle = self:addParticles(Particles.new("disruption_shield", 1))
......
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