Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Sil

Reply
 
Thread Tools Display Modes
Old November 18, 2012, 06:18   #1
bron
Swordsman
 
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 493
bron is on a distinguished road
sil 1.1: minor bug with thrown weapons

I've noticed that sometimes the "attack to-hit" modifier for a thrown weapon is higher than it should be. I looked into this, and it appears the trouble is that when the character is wielding a melee weapon for which they have "affinity", that extra +1 for the melee weapon is not subtracted from the modifier for the thrown weapon. Thus, if a Noldor is wielding a sword and then throws a spear, the spear gets the benefit of the +1 sword affinity modifier.

More precisely: in cmd2.c, routine do_cmd_throw, it has:

Code:
        ...
        attack_mod = p_ptr->skill_use[S_MEL] + i_ptr->att;

        // subtract out the melee weapon's bonus (as we had already accounted for it)
        attack_mod -= (&inventory[INVEN_WIELD])->att;
        ...
This removes the wielded weapon's attack modifier, as is only proper, but only the modifier on the weapon itself. The code should also subtract the melee weapon affinity bonus (if any) at this point, but does not.
bron is offline   Reply With Quote
Old November 18, 2012, 11:24   #2
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 904
half is on a distinguished road
Well spotted!

This is an advantage of having a combat rolls window. Presumably bugs like this would never be spotted in most games. Of course with all the different combinations of abilities and affinities, Sil has more opportunities for bugs like this to arise.

I've added it to the bugs list.
half is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sil: smithing (bug?) (feature?) bron Sil 3 September 11, 2012 02:10
Minor 3.3.2 bug with identify-by-use bron Vanilla 1 November 12, 2011 11:43
Bug while trying to switch weapons Raggy Development 14 June 10, 2011 10:03
Minor bug in 'n' command fyonn Vanilla 7 July 14, 2010 09:59
3.1.0 Very minor bug perost Vanilla 0 January 9, 2009 21:48


All times are GMT +1. The time now is 00:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.