🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Jim Prescott Sat, 07 Dec 1985 03:28
Bug in dart throwing
#5
Author: Jim Prescott
Date: Sat, 07 Dec 1985 03:28
52 lines
2467 bytes
The following is a bugfix for dart throwing.  Without this fix when you
throw a dart you lose it's magical bonuses and suffer an additional -4
penalty to hit.  The problem is that darts are falling into the same code
that matches bows with arrows, bolts with crossbows etc.  The whistle is
the next object defined after the weapons.

The patch to do.c fixes the bug and the patch to objects.h corrects a
the comment describing the codes action.

*** do.c.orig	Fri Dec  6 20:39:57 1985
--- do.c	Fri Dec  6 21:36:20 1985
***************
*** 331,337
  
  		if(obj->olet == WEAPON_SYM) {
  			tmp = -1+u.ulevel+mon->data->ac+abon();
! 			if(obj->otyp < ROCK) {
  				if(!uwep ||
  				    uwep->otyp != obj->otyp+(BOW-ARROW))
  					tmp -= 4;

--- 331,337 -----
  
  		if(obj->olet == WEAPON_SYM) {
  			tmp = -1+u.ulevel+mon->data->ac+abon();
! 			if(obj->otyp < DART) {
  				if(!uwep ||
  				    uwep->otyp != obj->otyp+(BOW-ARROW))
  					tmp -= 4;
*** objects.h.orig	Fri Dec  6 20:40:10 1985
--- objects.h	Fri Dec  6 21:35:57 1985
***************
*** 97,103
  	FOOD("dead zruty",	0, 6, 60, 600),
  
  /* weapons ... - ROCK come several at a time */
! /* weapons ... - (ROCK-1) are shot using idem+(BOW-ARROW) */
  /* weapons AXE, SWORD, THSWORD are good for worm-cutting */
  /* weapons (PICK-)AXE, DAGGER, CRYSKNIFE are good for tin-opening */
  #define WEAPON(name,prob,wt,ldam,sdam)	{ name, NULL, NULL, 1, 0 /*%%*/,\

--- 97,103 -----
  	FOOD("dead zruty",	0, 6, 60, 600),
  
  /* weapons ... - ROCK come several at a time */
! /* weapons ... - (DART-1) are shot using idem+(BOW-ARROW) */
  /* weapons AXE, SWORD, THSWORD are good for worm-cutting */
  /* weapons (PICK-)AXE, DAGGER, CRYSKNIFE are good for tin-opening */
  #define WEAPON(name,prob,wt,ldam,sdam)	{ name, NULL, NULL, 1, 0 /*%%*/,\
-- 
					Jim Prescott
			rochester!moscom!jgp or moscom!jgp@rochester
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads