Login
User Name:

Password:



Register

Forgot your password?
 I3 and IMC
Dec 26, 2024 3:27 am
By GatewaySysop
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
LOP 1.6
Author: Remcon
Submitted by: Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
Users Online
Bing

Members: 0
Guests: 21
Stats
Files
Topics
Posts
Members
Newest Member
496
3,808
19,708
594
MaisieMacl

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » [Bug] Projectile skills are n...
Forum Rules | Mark all | Recent Posts

[Bug] Projectile skills are not properly learnable
< Newer Topic :: Older Topic > AFKMud 2.02

Pages:<< prev 1 next >>
Post is unread #1 Dec 2, 2007 9:06 pm   Last edited Dec 2, 2007 9:10 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,697
JoinedJan 1, 2002

 
Bug: Projectile skills are not properly learnable
Danger: Low - All projectile skill is being applied to archery alone and not blowguns or slings.
Discovered in: AFKMud 2.02
Found by: Zeno and Kayle
Fixed by: Samson

---

archery.cpp, ranged_got_target

Locate:
   switch ( projectile->value[3] )
   {
      default:
      case 13:
      case 14:
         wtype = gsn_archery;
         break;

      case 15:
         wtype = gsn_blowguns;
         break;

      case 16:
         wtype = gsn_slings;
         break;
   }


Change to:
   switch ( projectile->value[4] )
   {
      default:
      case PROJ_BOLT:
      case PROJ_ARROW:
         wtype = gsn_archery;
         break;

      case PROJ_DART:
         wtype = gsn_blowguns;
         break;

      case PROJ_STONE:
         wtype = gsn_slings;
         break;
   }


Locate:
      switch ( projectile->value[3] )
      {
         default:
         case 13:
         case 14:
            ch->learn_from_failure( gsn_archery );
            break;

         case 15:
            ch->learn_from_failure( gsn_blowguns );
            break;

         case 16:
            ch->learn_from_failure( gsn_slings );
            break;
      }


Change to:
      switch ( projectile->value[4] )
      {
         default:
         case PROJ_BOLT:
         case PROJ_ARROW:
            ch->learn_from_failure( gsn_archery );
            break;

         case PROJ_DART:
            ch->learn_from_failure( gsn_blowguns );
            break;

         case PROJ_STONE:
            ch->learn_from_failure( gsn_slings );
            break;
      }


The projectile/archery code additions were quite complex and changed a number of things. One of which was the meaning of the various values on projectile items. value[3] is the damage type, which is not relevant to the skill being used. The code should have been referencing value[4] which is the PROJECTILE type, which matches up to the type of weapon being used. Further, since it was using hardcoded numerical values, the checks were out of range anyway and would always cause the skill increase to apply to archery even if the person is not using a crossbow or bow.

Pages:<< prev 1 next >>