diff --git a/game/modules/tome/data/gfx/particles_images/doomed_gestures_ALL_tentacles.png b/game/modules/tome/data/gfx/particles_images/doomed_gestures_ALL_tentacles.png new file mode 100644 index 0000000000000000000000000000000000000000..305bd4fbf89dd2c91bc4dc86f6d958ab70b6168a Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/doomed_gestures_ALL_tentacles.png differ diff --git a/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_M_Po_tentacles.png b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_M_Po_tentacles.png new file mode 100644 index 0000000000000000000000000000000000000000..f7e51098dcb889c7e63b06eb3cce435f3e1d86a7 Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_M_Po_tentacles.png differ diff --git a/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_M_tentacles.png b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_M_tentacles.png new file mode 100644 index 0000000000000000000000000000000000000000..7a71bb66914a69f95389210cb88afec0b5bee240 Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_M_tentacles.png differ diff --git a/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_tentacles.png b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_tentacles.png new file mode 100644 index 0000000000000000000000000000000000000000..8667672bbd5bf7eb58ce3bccb3a7767aee806abe Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Pa_tentacles.png differ diff --git a/game/modules/tome/data/gfx/particles_images/doomed_gestures_Po_G_tentacles.png b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Po_G_tentacles.png new file mode 100644 index 0000000000000000000000000000000000000000..67d54e58037559a99d1f6120f9982444cf26ee35 Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Po_G_tentacles.png differ diff --git a/game/modules/tome/data/gfx/particles_images/doomed_gestures_Po_tentacles.png b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Po_tentacles.png new file mode 100644 index 0000000000000000000000000000000000000000..9b330724e4eefcee9ec692fa2929e06ba7b863a6 Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/doomed_gestures_Po_tentacles.png differ diff --git a/game/modules/tome/data/talents/cursed/gestures.lua b/game/modules/tome/data/talents/cursed/gestures.lua index 9b6fcf90178978381e95fdf983ade72f0198b38f..89e241c79fc4561380fdb16862a649c83c99a68f 100644 --- a/game/modules/tome/data/talents/cursed/gestures.lua +++ b/game/modules/tome/data/talents/cursed/gestures.lua @@ -39,6 +39,30 @@ local function canUseGestures(self) return nb >= 2 and true or false, dam -- return damage for use with Gesture of Guarding 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{ name = "Gesture of Pain", type = {"cursed/gestures", 1}, @@ -160,10 +184,13 @@ newTalent{ return self:combatSpeed(), hit end, + on_learn = gestures_gfx_update, on_unlearn = gestures_gfx_update, activate = function(self, t) - return { } + game:onTickEnd(function() gestures_gfx_update(self) end) + return {} end, deactivate = function(self, t, p) + game:onTickEnd(function() gestures_gfx_update(self) end) return true end, info = function(self, t) @@ -192,6 +219,7 @@ newTalent{ getResistAllChange = function(self, t) return -math.min(30, (math.sqrt(self:getTalentLevel(t)) - 0.5) * 12) end, + on_learn = gestures_gfx_update, on_unlearn = gestures_gfx_update, info = function(self, t) local resistAllChange = t.getResistAllChange(self, t) local duration = t.getDuration(self, t) @@ -216,6 +244,7 @@ newTalent{ return math.floor(math.min(14, self:getTalentLevel(t) * 1.2)) end, + on_learn = gestures_gfx_update, on_unlearn = gestures_gfx_update, info = function(self, t) local mindpowerChange = t.getMindpowerChange(self, t, 2) local mindCritChange = t.getMindCritChange(self, t) @@ -265,8 +294,10 @@ newTalent{ tGestureOfPain.attack(self, tGestureOfPain, who) end end, + on_learn = gestures_gfx_update, on_unlearn = function(self, t) self:removeEffect(self.EFF_GESTURE_OF_GUARDING) + gestures_gfx_update(self) end, info = function(self, t) local damageChange = t.getDamageChange(self, t, true)