From d5ca34a45b80450620cf689d8c25acc5b3f1876d Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 8 May 2008 03:50:44 +0000 Subject: [PATCH] initial sling skill From a bug report, archeologists were inadvertently starting out at basic skill level in sling because of their carried touchstone, which is flagged as being sling ammo. --- doc/fixes34.4 | 1 + src/weapon.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 591c13c2b..9cbf2da9d 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -370,6 +370,7 @@ a hangup save while picking up gold from shop floor could duplicate that gold jellyfish do not technically have a head potion explosion during failed alchemy should awaken nearby monsters lit south wall of C quest leader's room contained dark gap at secret door spot +archeologist shouldn't start with sling skill by carrying slingable touchstone Platform- and/or Interface-Specific Fixes diff --git a/src/weapon.c b/src/weapon.c index 9f9c4d6ab..09d960fa9 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)weapon.c 3.5 2007/05/09 */ +/* SCCS Id: @(#)weapon.c 3.5 2008/05/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1288,6 +1288,11 @@ const struct def_skill *class_skill; /* Set skill for all weapons in inventory to be basic */ for (obj = invent; obj; obj = obj->nobj) { + /* don't give skill just because of carried ammo, wait until + we see the relevant launcher (prevents an archeologist's + touchstone from inadvertently providing skill in sling) */ + if (is_ammo(obj)) continue; + skill = weapon_type(obj); if (skill != P_NONE) P_SKILL(skill) = P_BASIC;