name_to_monclass (trunk only)
Move the code for determining monster class from user's input string
out of do_class_genocide() and into new routine name_to_monclass(). I'm
planning to use it when name_to_mon fails to match anything for controlled
polymorph (not ready for prime time yet).
Also, avoid getting stuck in a loop if hangup occurs while prompting
player for class of monster to genocide. ESC, whether deliberate or fake
input after hangup, will now be the same as specifying "none", throwing
away the genocide opportunity.
This commit is contained in:
@@ -1335,6 +1335,7 @@ E int FDECL(max_passive_dmg, (struct monst *,struct monst *));
|
||||
E boolean FDECL(same_race, (struct permonst *,struct permonst *));
|
||||
E int FDECL(monsndx, (struct permonst *));
|
||||
E int FDECL(name_to_mon, (const char *));
|
||||
E int FDECL(name_to_monclass, (const char *,int *));
|
||||
E int FDECL(gender, (struct monst *));
|
||||
E int FDECL(pronoun_gender, (struct monst *));
|
||||
E boolean FDECL(levl_follower, (struct monst *));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)monsym.h 3.5 1992/10/18 */
|
||||
/* SCCS Id: @(#)monsym.h 3.5 2007/04/07 */
|
||||
/* Monster symbols and creation information rev 1.0 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#define S_FUNGUS 32
|
||||
#define S_GNOME 33
|
||||
#define S_GIANT 34
|
||||
#define S_invisible 35 /* non-class present in def_monsyms[] */
|
||||
#define S_JABBERWOCK 36
|
||||
#define S_KOP 37
|
||||
#define S_LICH 38
|
||||
@@ -73,11 +74,6 @@
|
||||
|
||||
#define MAXMCLASSES 61 /* number of monster classes */
|
||||
|
||||
#if 0 /* moved to decl.h so that makedefs.c won't see them */
|
||||
extern const char def_monsyms[MAXMCLASSES]; /* default class symbols */
|
||||
extern uchar monsyms[MAXMCLASSES]; /* current class symbols */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Default characters for monsters. These correspond to the monster classes
|
||||
* above.
|
||||
|
||||
Reference in New Issue
Block a user