WingedEspeon wrote:
E: I seem to have encountered the same bug with a shalore prowler right around to time I put points into adrenaline, although only decreased global speed to 96% this time. I'm wondering if leveling up adrenaline to the point that it give the speed increase when enemies are present would cause the problem. (you don't get the increase when enemies come into sight because you don't have the full talent yet, but you lose global speed when they leave/get killed as you now have the talent.)
If it is caused by Prowler, I'd suspect Adrenaline over Nimble. Nimble grants a temporary effect that gives you a global speed bonus, while Adrenaline adds and removes a temporary value to the player which increases global speed, which can be slightly more wonky.
As the add on does have talents that affect global speed, and it has happened to more than one character, it seems likely that something is going wrong with it, but I can see anything in the code for Adrenaline that would cause a permanent speed decrease. The values for both speed and life regen are checked and reset every time the player acts, and putting points into talents on the level up page will cause a turn to pass, triggering the callback. Leveling it up 'mid-fight' should not have any adverse affects.
Could be that I'm just totally over-looking something because it's been a while since I've delved into this code (or because I'm a total hack), so here's the callback, in case any modders or devs happen to spot something I'm missing:
Code:
callbackOnAct = function(self, t)
-- Remove the existing regen rate
if self.temp_adrenalineSpeed then
self:removeTemporaryValue("global_speed", self.temp_adrenalineSpeed)
end
if self.temp_adrenalineLife then
self:removeTemporaryValue("life_regen", self.temp_adrenalineLife)
end
self.temp_adrenalineSpeed = nil
self.temp_adrenalineLife = nil
-- Calculate visible enemies
local nb_foes = 0
local act
for i = 1, #self.fov.actors_dist do
act = self.fov.actors_dist[i]
if act and self:reactionToward(act) < 0 and self:canSee(act) then nb_foes = nb_foes + 1 end
end
-- Add new regens if needed
if nb_foes >= 1 then
if nb_foes > 4 then
nb_foes = 4
end
self.temp_adrenalineLife = self:addTemporaryValue("life_regen", t.getLifeRate(self, t) * nb_foes)
if self:getTalentLevelRaw(t) >= 3 then
self.temp_adrenalineSpeed = self:addTemporaryValue("global_speed", t.getSpeed(self, t) * nb_foes)
end
end
end,
I really wish I could figure this out, but I just can't replicate the problem or see any cause for it :/