Unerring arrows have an error.

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Unerring arrows have an error.

#1 Post by yufra »

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.

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
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
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Unerring arrows have an error.

#2 Post by darkgod »

done
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply