Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site sdcsvax.UUCP
Path: utzoo!linus!philabs!sdcsvax!laman
From: laman@sdcsvax.UUCP
Newsgroups: net.games.rogue
Subject: 3.6 Bug fix (Spoiling on Nymphs!!!)
Message-ID: <1142@sdcsvax.UUCP>
Date: Sat, 9-Jul-83 16:57:06 EDT
Article-I.D.: sdcsvax.1142
Posted: Sat Jul  9 16:57:06 1983
Date-Received: Mon, 11-Jul-83 10:20:19 EDT
Organization: U.C. San Diego, CS Dept
Lines: 30

There is a bug in rogue 3.6.  "fight.c" is the file with the bug in it.
In the code where the nymph hits the player, there is a search through his pack.
The if statement in the loop was hoping NOT to remove a ring that was worn,
but the ISWEARING() call passes the WRONG argument! Consequently, the Nymph
would remove a ring that was worn (It happened to me).  Below is the offending
code.

					:
					:
					:
			if (obj != cur_armor && obj != cur_weapon &&
			    is_magic(obj) && !ISWEARING(obj) &&
			    rnd(++nobj) == 0)
					:
					:
					:

And here is the change.  As you can see ISWEARING is expecting to be passed
a ring type, not an arbitrary object.

			if (obj != cur_armor && obj != cur_weapon &&
			    is_magic(obj) &&
			    !((obj->o_type == RING) && ISWEARING(obj->o_which))
			    && rnd(++nobj) == 0)

Happy rogueing!

			Mike Laman
			sdcsvax!laman