Limiting Slow Projectiles to 95%
Posted: Sat Sep 03, 2011 4:24 am
Referring to the function in actor that slows projectiles. If this couldn't reduce projectile speed by more then 95% I think it would prevent future head aches.
Everything about ToME
https://forums.te4.org/
Code: Select all
Index: game/modules/tome/data/talents/chronomancy/energy.lua
===================================================================
--- game/modules/tome/data/talents/chronomancy/energy.lua (revision 4312)
+++ game/modules/tome/data/talents/chronomancy/energy.lua (working copy)
@@ -61,7 +61,7 @@
sustain_paradox = 75,
cooldown = 10,
tactical = { BUFF = 2 },
- getPower = function(self, t) return 10 + (self:combatTalentSpellDamage(t, 10, 50)) end,
+ getPower = function(self, t) return math.min(10 + (self:combatTalentSpellDamage(t, 10, 50)), 95) end,
activate = function(self, t)
game:playSoundNear(self, "talents/heal")
return {
Index: game/modules/tome/data/talents/techniques/field-control.lua
===================================================================
--- game/modules/tome/data/talents/techniques/field-control.lua (revision 4312)
+++ game/modules/tome/data/talents/techniques/field-control.lua (working copy)
@@ -115,7 +115,7 @@
tactical = { BUFF = 2 },
activate = function(self, t)
return {
- slow_projectiles = self:addTemporaryValue("slow_projectiles", 15 + self:getDex(10, true) * self:getTalentLevel(t)),
+ slow_projectiles = self:addTemporaryValue("slow_projectiles", math.min(15 + self:getDex(10, true) * self:getTalentLevel(t), 95)),
}
end,
@@ -125,6 +125,6 @@
end,
info = function(self, t)
return ([[Your great dexterity allows you to see incoming projectiles (spells, arrows, ...), slowing them down by %d%%.]]):
- format(15 + self:getDex(10, true) * self:getTalentLevel(t))
+ format(math.min(15 + self:getDex(10, true) * self:getTalentLevel(t), 95))
end,
}