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

Doomer Gestures now have visuals

parent 4a96378d
No related branches found
No related tags found
No related merge requests found
Pipeline #
game/modules/tome/data/gfx/particles_images/doomed_gestures_ALL_tentacles.png

79.9 KiB

game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_M_Po_tentacles.png

76.2 KiB

game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_M_tentacles.png

50.8 KiB

game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_tentacles.png

41 KiB

game/modules/tome/data/gfx/particles_images/doomed_gestures_Po_G_tentacles.png

50.3 KiB

game/modules/tome/data/gfx/particles_images/doomed_gestures_Po_tentacles.png

46 KiB

...@@ -39,6 +39,30 @@ local function canUseGestures(self) ...@@ -39,6 +39,30 @@ local function canUseGestures(self)
return nb >= 2 and true or false, dam -- return damage for use with Gesture of Guarding return nb >= 2 and true or false, dam -- return damage for use with Gesture of Guarding
end end
local function gestures_gfx_update(self)
local pain = self:isTalentActive(self.T_GESTURE_OF_PAIN)
local malice = self:knowTalent(self.T_GESTURE_OF_MALICE)
local power = self:knowTalent(self.T_GESTURE_OF_POWER)
local guarding = self:knowTalent(self.T_GESTURE_OF_GUARDING)
local img = nil
if pain and not malice and not power and not guarding then img = "doomed_gestures_Po_tentacles"
elseif pain and malice and not power and not guarding then img = "doomed_gestures_Pa_M_tentacles"
elseif pain and malice and power and not guarding then img = "doomed_gestures_Pa_M_Po_tentacles"
elseif pain and malice and power and guarding then img = "doomed_gestures_ALL_tentacles"
elseif not pain and power and not guarding then img = "doomed_gestures_Po_tentacles"
elseif not pain and power and guarding then img = "doomed_gestures_Po_G_tentacles"
end
if self._gesturepain_gfx then
self:removeParticles(self._gesturepain_gfx)
self._gesturepain_gfx = nil
end
if img and core.shader.active() then
self._gesturepain_gfx = self:addParticles(Particles.new("shader_shield", 1, {toback=false, size_factor=1.5, img=img}, {type="tentacles", appearTime=0.7, time_factor=1200, noup=0.0}))
end
end
newTalent{ newTalent{
name = "Gesture of Pain", name = "Gesture of Pain",
type = {"cursed/gestures", 1}, type = {"cursed/gestures", 1},
...@@ -160,10 +184,13 @@ newTalent{ ...@@ -160,10 +184,13 @@ newTalent{
return self:combatSpeed(), hit return self:combatSpeed(), hit
end, end,
on_learn = gestures_gfx_update, on_unlearn = gestures_gfx_update,
activate = function(self, t) activate = function(self, t)
return { } game:onTickEnd(function() gestures_gfx_update(self) end)
return {}
end, end,
deactivate = function(self, t, p) deactivate = function(self, t, p)
game:onTickEnd(function() gestures_gfx_update(self) end)
return true return true
end, end,
info = function(self, t) info = function(self, t)
...@@ -192,6 +219,7 @@ newTalent{ ...@@ -192,6 +219,7 @@ newTalent{
getResistAllChange = function(self, t) getResistAllChange = function(self, t)
return -math.min(30, (math.sqrt(self:getTalentLevel(t)) - 0.5) * 12) return -math.min(30, (math.sqrt(self:getTalentLevel(t)) - 0.5) * 12)
end, end,
on_learn = gestures_gfx_update, on_unlearn = gestures_gfx_update,
info = function(self, t) info = function(self, t)
local resistAllChange = t.getResistAllChange(self, t) local resistAllChange = t.getResistAllChange(self, t)
local duration = t.getDuration(self, t) local duration = t.getDuration(self, t)
...@@ -216,6 +244,7 @@ newTalent{ ...@@ -216,6 +244,7 @@ newTalent{
return math.floor(math.min(14, self:getTalentLevel(t) * 1.2)) return math.floor(math.min(14, self:getTalentLevel(t) * 1.2))
end, end,
on_learn = gestures_gfx_update, on_unlearn = gestures_gfx_update,
info = function(self, t) info = function(self, t)
local mindpowerChange = t.getMindpowerChange(self, t, 2) local mindpowerChange = t.getMindpowerChange(self, t, 2)
local mindCritChange = t.getMindCritChange(self, t) local mindCritChange = t.getMindCritChange(self, t)
...@@ -265,8 +294,10 @@ newTalent{ ...@@ -265,8 +294,10 @@ newTalent{
tGestureOfPain.attack(self, tGestureOfPain, who) tGestureOfPain.attack(self, tGestureOfPain, who)
end end
end, end,
on_learn = gestures_gfx_update,
on_unlearn = function(self, t) on_unlearn = function(self, t)
self:removeEffect(self.EFF_GESTURE_OF_GUARDING) self:removeEffect(self.EFF_GESTURE_OF_GUARDING)
gestures_gfx_update(self)
end, end,
info = function(self, t) info = function(self, t)
local damageChange = t.getDamageChange(self, t, true) local damageChange = t.getDamageChange(self, t, true)
......
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