[1.1.5] Doomed: Unseen Force still broken
Posted: Sat Mar 29, 2014 4:34 pm
Force of Will/Unseen Force still has negative values at talent levels below 4, at least for me.
(See also my report for 1.0.6d:)
Since Hachem_Muche couldn't replicate it, it's probably something OS specific. From looking at the lua, it's getSecondHitChance that's returning negative values.
Cursed/Force of will lines 311-319
I'm not sure if it's combatTalentScale that combatTalentScale returns a negative number, but it looks like math.floor is assumed to return zero so that hitCount will be 1. Having a hard time finding documentation, but I think all it does with negative numbers is return next smaller integer.
lines 332-338
Also I think I'm only seeing one hit per round, even with talent level 6.5 and supposedly a 24% chance per turn for an extra strike. I guess this comes from xtrahits and hitCount being crazy negative numbers in line 337, and then line 338 adding it back, while xtrahits messes with the if condition so at least it's reliably one hit per round.
Now, if somebody else has trouble reproducing it, I'm on 64-bit linux, and maybe combatTalentScale works differently from windows or 32-bit where negative numbers are involved.
(See also my report for 1.0.6d:)
Since Hachem_Muche couldn't replicate it, it's probably something OS specific. From looking at the lua, it's getSecondHitChance that's returning negative values.
Cursed/Force of will lines 311-319
Code: Select all
getSecondHitChance = function(self, t) return self:combatTalentScale(self:getTalentLevel(t)-4, 15, 35) end,
action = function(self, t)
game.logSeen(self, "An unseen force begins to swirl around %s!", self.name)
local duration = t.getDuration(self, t)
local particles = self:addParticles(Particles.new("force_area", 1, { radius = self:getTalentRange(t) }))
self.unseenForce = { duration = duration, particles = particles }
return true
end,
lines 332-338
Code: Select all
if #targets > 0 then
local damage = t.getDamage(self, t)
local knockback = t.getKnockback(self, t)
local xtrahits = t.getSecondHitChance(self,t)/100
local hitCount = 1 + math.floor(xtrahits)
if rng.percent(xtrahits - math.floor(xtrahits)*100) then hitCount = hitCount + 1 end
Now, if somebody else has trouble reproducing it, I'm on 64-bit linux, and maybe combatTalentScale works differently from windows or 32-bit where negative numbers are involved.