🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.games.hack
Article #5

Bug in dart throwing

#5
From: 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
Technical Details
Message-ID: <612@moscom.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!akgua!gatech!seismo!rochester!ritcv!moscom!jgp

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site moscom.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!akgua!gatech!seismo!rochester!ritcv!moscom!jgp
From: jgp@moscom.UUCP (Jim Prescott)
Newsgroups: net.games.hack
Subject: Bug in dart throwing
Message-ID: <612@moscom.UUCP>
Date: Fri, 6-Dec-85 22:28:35 EST
Article-I.D.: moscom.612
Posted: Fri Dec  6 22:28:35 1985
Date-Received: Sun, 8-Dec-85 03:30:31 EST
Distribution: net
Organization: MOSCOM Corp, E Rochester, NY, USA
Lines: 52