From 3914ce822907632f86b0697eddb19915d63adef1 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Tue, 7 May 2013 18:30:19 +0000 Subject: [PATCH] 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 --- game/modules/tome/class/interface/Combat.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index cde50e8af7..0fe95341d7 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -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 -- GitLab