[net.games.rogue] enchanted arrows

vasse (02/16/83)

I had heard of that bug and It was in Version 3.6.  If you have the sources,
there is a quick change that you can make to fix this.  Inadvertently, the
author forgot to initialize the arrow before throwing it on the floor.  This
means that what ever junk was in the variables before will still be there.  If
you find one and pick it up, You will always kill on the first shot.  The
change is to be made where the arrow was thrown (I'm not exactly sure where
exactly that is) and it should follow the same format as when your mace and
bow are initialized before they are given to you at the start of the game.
I think it was a total of two lines.  It's a good bug!!!
					Rich
					...ucbvax!sdcsvax!vasse

mike (02/20/83)

    Here is a fix for the "magic-arrow" bug in version 3.6 of rogue.
The fix should be made to the file 'move.c' in the routine 'be_trapped'
under the 'ARROWTRAP' case in the switch statement (I have included a
little context to help you locate the spot):

                .
                .
                .
		msg("An arrow shoots past you.");
		item = new_item(sizeof *arrow);
		arrow = (struct object *) ldata(item);
		arrow->o_type = WEAPON;
		arrow->o_which = ARROW;
		init_weapon(arrow, ARROW);
		arrow->o_count = 1;
		arrow->o_pos = hero;

		/* BUG FIX!  This fixes the infamous "arrow bug". */
		arrow->o_hplus = arrow->o_dplus = 0;
		if (rnd(100) < 15)
		    arrow->o_hplus += rnd(3)+1;
		/* End of BUG FIX! */

		fall(item, FALSE);
                .
                .
                .

    This bug turns the record file into a farce (our top scores were
in the hundreds of millions).  By the way, what is the "current"
version of rogue? 5? 6? 23?  Anyone know where I can get source (or
4.1bsd binary) for it?

			Mike Hibler
			New Mexico Tech
			ucbvax!unmvax!nmtvax!mike
			mike.nmt@rand-relay