Unerring arrows have an error.
Posted: Tue Jan 18, 2011 11:30 pm
The ammo's combat.atk field is never checked by the archery code, so these don't help any. I think Combat:combatAttack should be rewritten as below and then combatAttack can be called with both the launcher and the ammo in the archery code.
EDIT: Actually, I found a bug in combatAttackMag actually being called combatAttackDex, and decided to just write a complete diff with this rewrite here...
EDIT4: And finally: http://pastebin.com/tz2Q1P7C
Code: Select all
--- Gets the attack
function _M:combatAttack(weapon, ammo)
weapon = weapon or self.combat or {}
local stats
if self.use_psi_combat then stats = (self:getWil(50) - 5) + (self:getCun(50) - 5)
else stats = (self:getStr(50) - 5) + (self:getDex(50) - 5)
end
return self.combat_atk + self:getTalentLevel(Talents.T_WEAPON_COMBAT) * 5 + (weapon.atk or 0) + (ammo and ammo.atk or 0) + stats + (self:getLck() - 50) * 0.4
end
EDIT4: And finally: http://pastebin.com/tz2Q1P7C