Skip to content
Snippets Groups Projects
Commit 7c9c4c21 authored by dg's avatar dg
Browse files

small fixes

git-svn-id: http://svn.net-core.org/repos/t-engine4@3958 51575b47-30f0-44d4-a5cc-537603b46e54
parent 492ee6e9
No related branches found
No related tags found
No related merge requests found
......@@ -1015,37 +1015,39 @@ function _M:displayParticles(nb_keyframes)
local del = {}
local e = next(self.particles)
while e do
adx, ady = 0, 0
if e.x and e.y then
-- Make sure we display on the real screen coords: handle current move anim position
if e._mo then
adx, ady = e._mo:getMoveAnim(self._map, e.x, e.y)
else
adx, ady = self._map:getScroll()
adx, ady = adx / self.tile_w, ady / self.tile_h
if e.ps then
adx, ady = 0, 0
if e.x and e.y then
-- Make sure we display on the real screen coords: handle current move anim position
if e._mo then
adx, ady = e._mo:getMoveAnim(self._map, e.x, e.y)
else
adx, ady = self._map:getScroll()
adx, ady = adx / self.tile_w, ady / self.tile_h
end
end
end
if nb_keyframes == 0 and e.x and e.y then
-- Just display it, not updating, no emitting
if e.x + e.radius >= self.mx and e.x - e.radius < self.mx + self.viewport.mwidth and e.y + e.radius >= self.my and e.y - e.radius < self.my + self.viewport.mheight then
e.ps:toScreen(self.display_x + (adx + e.x - self.mx + 0.5) * self.tile_w * self.zoom, self.display_y + (ady + e.y - self.my + 0.5) * self.tile_h * self.zoom, self.seens(e.x, e.y), e.zoom * self.zoom)
end
elseif e.x and e.y then
alive = e.ps:isAlive()
if nb_keyframes == 0 and e.x and e.y then
-- Just display it, not updating, no emitting
if e.x + e.radius >= self.mx and e.x - e.radius < self.mx + self.viewport.mwidth and e.y + e.radius >= self.my and e.y - e.radius < self.my + self.viewport.mheight then
e.ps:toScreen(self.display_x + (adx + e.x - self.mx + 0.5) * self.tile_w * self.zoom, self.display_y + (ady + e.y - self.my + 0.5) * self.tile_h * self.zoom, self.seens(e.x, e.y), e.zoom * self.zoom)
end
elseif e.x and e.y then
alive = e.ps:isAlive()
-- Update more, if needed
if alive and e.x + e.radius >= self.mx and e.x - e.radius < self.mx + self.viewport.mwidth and e.y + e.radius >= self.my and e.y - e.radius < self.my + self.viewport.mheight then
e.ps:toScreen(self.display_x + (adx + e.x - self.mx + 0.5) * self.tile_w * self.zoom, self.display_y + (ady + e.y - self.my + 0.5) * self.tile_h * self.zoom, self.seens(e.x, e.y))
end
-- Update more, if needed
if alive and e.x + e.radius >= self.mx and e.x - e.radius < self.mx + self.viewport.mwidth and e.y + e.radius >= self.my and e.y - e.radius < self.my + self.viewport.mheight then
e.ps:toScreen(self.display_x + (adx + e.x - self.mx + 0.5) * self.tile_w * self.zoom, self.display_y + (ady + e.y - self.my + 0.5) * self.tile_h * self.zoom, self.seens(e.x, e.y))
end
if not alive then
if not alive then
del[#del+1] = e
e.dead = true
end
else
del[#del+1] = e
e.dead = true
end
else
del[#del+1] = e
e.dead = true
end
e = next(self.particles, e)
......
......@@ -57,7 +57,7 @@ newTalent{
elseif self:isTalentActive(self.T_FROST_INFUSION) then inc_dam = frosti.getIncrease(self,frosti); damtype = DamageType.ICE; particle = "ball_ice"
else inc_dam = fireinf.getIncrease(self,fireinf) + (ammo.alchemist_bomb.power or 0) / 100; damtype = self:knowTalent(self.T_FIRE_INFUSION) and DamageType.FIREBURN or DamageType.FIRE
end
local dam = self:combatTalentSpellDamage(t, 15, 150, (ammo.alchemist_power + self:combatSpellpower()) / 2)
local dam = self:combatTalentSpellDamage(t, 15, 150, ((ammo.alchemist_power or 0) + self:combatSpellpower()) / 2)
dam = dam * (1 + inc_dam)
return dam, damtype, particle
end,
......@@ -228,7 +228,7 @@ newTalent{
local damtype = DamageType.SPELLKNOCKBACK
local particle = "ball_fire"
inc_dam = self:getTalentLevel(self.T_FIRE_INFUSION) * 0.05 + (ammo.alchemist_bomb.power or 0) / 100
local dam = self:combatTalentSpellDamage(t, 15, 120, (ammo.alchemist_power + self:combatSpellpower()) / 2)
local dam = self:combatTalentSpellDamage(t, 15, 120, ((ammo.alchemist_power or 0) + self:combatSpellpower()) / 2)
dam = dam * (1 + inc_dam)
return dam, damtype, particle
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