Skip to content

Commit

Permalink
initial sling skill
Browse files Browse the repository at this point in the history
     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.
  • Loading branch information
nethack.rankin committed May 8, 2008
1 parent 2f1882b commit d5ca34a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion src/weapon.c
Original file line number Diff line number Diff line change
@@ -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. */

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d5ca34a

Please sign in to comment.