🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Ken Arnold%CGL Sun, 23 Jun 1985 01:00
Genocide scroll fix
#812
Author: Ken Arnold%CGL
Date: Sun, 23 Jun 1985 01:00
62 lines
2192 bytes
Here is a fix to something which has annoyed the bejezus out of me
ever since we got hack, which is that you can only genocide monsters
whose symbols are letters.  I have had desires to genocide daemons,
for example, but couldn't because the check for validity of input was
not to see if it was a known monster character, but just if it was
an upper or lower case letter or a '@'.  Here is the context diff to
fix it.

----- CUT HERE -----
*** /tmp/,RCSt1007524	Tue Jun 18 16:19:41 1985
--- hack.read.c	Mon May 27 16:45:59 1985
***************
*** 189,195
  		else do {
  	    pline("What monster do you want to genocide (Type the letter)? ");
  			getlin(buf);
! 		} while(strlen(buf) != 1 || !letter(*buf));
  		if(!index(fut_geno, *buf))
  			charcat(fut_geno, *buf);
  		if(!index(genocided, *buf))

--- 189,195 -----
  		else do {
  	    pline("What monster do you want to genocide (Type the letter)? ");
  			getlin(buf);
! 		} while(strlen(buf) != 1 || !monster(*buf));
  		if(!index(fut_geno, *buf))
  			charcat(fut_geno, *buf);
  		if(!index(genocided, *buf))
***************
*** 515,518
  		}
  	if(!on) seehx = 0;
  #endif	QUEST
  }

--- 515,538 -----
  		}
  	if(!on) seehx = 0;
  #endif	QUEST
+ }
+ 
+ monster(ch)
+ register char ch;
+ {
+ 	register struct permonst	*mp;
+ 	extern struct permonst		pm_eel;
+ 
+ 	/*
+ 	 * can't genocide certain monsters
+ 	 */
+ 	if (ch == '1' || ch == '2' || ch == ' ')
+ 		return FALSE;
+ 
+ 	if (ch == pm_eel.mlet)
+ 		return TRUE;
+ 	for (mp = mons; mp < &mons[CMNUM+2]; mp++)
+ 		if (mp->mlet == ch)
+ 			return TRUE;
+ 	return FALSE;
  }
Re: Genocide scroll fix
#833
Author: Andries Brouwer
Date: Tue, 25 Jun 1985 20:30
7 lines
1039 bytes
Several people have complained about the fact that it was (is)
impossible to genocide certain monsters. This is on purpose;
I want to prevent that one, by wishing three times for 3 scrolls
of genocide, can eliminate all the tough monsters.
The distinction letters-nonletters is completely arbitrary, and
if I made an explicit list of nongenocidable monsters it might
look a bit different, but it *would* contain daemons.
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