Skip to content
Snippets Groups Projects
Commit 3914ce82 authored by dg's avatar dg
Browse files

Speeds are always limited to 10% (can never go to 0)

git-svn-id: http://svn.net-core.org/repos/t-engine4@6696 51575b47-30f0-44d4-a5cc-537603b46e54
parent 57ae9fe7
No related branches found
No related tags found
No related merge requests found
......@@ -1052,7 +1052,7 @@ end
--- Gets the weapon speed
function _M:combatSpeed(weapon)
weapon = weapon or self.combat or {}
return (weapon.physspeed or 1) / self.combat_physspeed
return (weapon.physspeed or 1) / math.max(self.combat_physspeed, 0.1)
end
--- Gets the crit rate
......@@ -1263,12 +1263,12 @@ end
--- Gets spellspeed
function _M:combatSpellSpeed()
return 1 / self.combat_spellspeed
return 1 / math.max(self.combat_spellspeed, 0.1)
end
-- Gets mental speed
function _M:combatMindSpeed()
return 1 / self.combat_mindspeed
return 1 / math.max(self.combat_mindspeed, 0.1)
end
--- Gets summon speed
......@@ -1610,6 +1610,7 @@ function _M:combatMovementSpeed(x, y)
local t = self:getTalentFromId(self.T_DARK_VISION)
movement_speed = movement_speed + t.getMovementSpeedChange(self, t)
end
movement_speed = math.max(movement_speed, 0.1)
return mult * (self.base_movement_speed or 1) / movement_speed
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