Skip to content
Snippets Groups Projects
Commit b90ce1a8 authored by Eric Wykoff's avatar Eric Wykoff
Browse files

haste and redux particles

parent fd933cb5
No related branches found
No related tags found
No related merge requests found
......@@ -1317,7 +1317,7 @@ function _M:move(x, y, force)
if moved and not force and ox and oy and (ox ~= self.x or oy ~= self.y) and config.settings.tome.smooth_move > 0 then
local blur = 0
if game.level.data.zero_gravity then blur = 2 end
if self:attr("lightning_speed") or self:attr("step_up") or self:attr("wild_speed") then blur = 3 end
if self:attr("lightning_speed") or self:attr("step_up") or self:attr("wild_speed") or self:hasEffect(self.EFF_HASTE) then blur = 3 end
if self:hasEffect(self.EFF_CELERITY) then local eff = self:hasEffect(self.EFF_CELERITY) blur = eff.charges end
self:setMoveAnim(ox, oy, config.settings.tome.smooth_move, blur, 8, config.settings.tome.twitch_move and 0.15 or 0)
if Map.tiles and Map.tiles.use_images then if self.x < ox then self:MOflipX(self:isTileFlipped()) elseif self.x > ox then self:MOflipX(not self:isTileFlipped()) end end
......
......@@ -1486,6 +1486,15 @@ newEffect{
subtype = { temporal=true },
status = "beneficial",
parameters = { max_cd=1},
activate = function(self, eff)
if core.shader.allow("adv") then
eff.particle1, eff.particle2 = self:addParticles3D("volumetric", {kind="transparent_cylinder", twist=1, shineness=10, density=10, radius=1.4, growSpeed=0.004, img="coggy_00"})
end
end,
deactivate = function(self, eff)
self:removeParticles(eff.particle1)
self:removeParticles(eff.particle2)
end,
}
newEffect{
......@@ -1610,9 +1619,23 @@ newEffect{
on_lose = function(self, err) return "#Target# slows down.", "-Haste" end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("global_speed_add", eff.power)
if not self.shader then
eff.set_shader = true
self.shader = "shadow_simulacrum"
self.shader_args = { color = {0.4, 0.4, 0}, base = 1, time_factor = 3000 }
self:removeAllMOs()
game.level.map:updateMap(self.x, self.y)
end
end,
deactivate = function(self, eff)
if eff.set_shader then
self.shader = nil
self:removeAllMOs()
game.level.map:updateMap(self.x, self.y)
end
self:removeTemporaryValue("global_speed_add", eff.tmpid)
self:removeParticles(eff.particle1)
self:removeParticles(eff.particle2)
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