corpse_xname overhaul (trunk only)
Extend the capabilities of corpse_xname() so that various callers can
be simplified. It can how handle an article prefix, effectively turning it
into corpse_doname() (not quite; still need doname() to see a count when
quantity is more than one, or to see bless/curse state). It can also handle
inclusion of adjectives like "partly eaten" or "bite-covered". For unique
monsters those come out in the form
the Chromatic Dragon's partly eaten corpse
instead of the old
partly eaten Chromatic Dragon corpse
[so wishing probably needs to be taught about potentially finding a monster
name before assorted adjectives such as blessed; also, name_to_mon() needs
to learn how to cope with the possessive suffix].
A sizeable chunk of this patch deals with consolidating some of the
redundant "petrified by a cockatrice corpse" handling. It may be possible
to consolidate all remaining instances together since they're quite similar,
but I didn't think about that until just now and I want to get this patch
over with.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)hack.h 3.5 2005/03/28 */
|
||||
/* SCCS Id: @(#)hack.h 3.5 2005/12/10 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -76,6 +76,15 @@
|
||||
#define COST_BITE 13 /* start eating food */
|
||||
#define COST_OPEN 14 /* open tin */
|
||||
|
||||
/* bitmask flags for corpse_xname();
|
||||
PFX_THE takes precedence over ARTICLE, NO_PFX takes precedence over both */
|
||||
#define CXN_NORMAL 0 /* no special handling */
|
||||
#define CXN_SINGULAR 1 /* override quantity if greather than 1 */
|
||||
#define CXN_NO_PFX 2 /* suppress "the" from "the Unique Monst */
|
||||
#define CXN_PFX_THE 4 /* prefix with "the " (unless pname) */
|
||||
#define CXN_ARTICLE 8 /* include a/an/the prefix */
|
||||
#define CXN_NOCORPSE 16 /* suppress " corpse" suffix */
|
||||
|
||||
/*
|
||||
* This is the way the game ends. If these are rearranged, the arrays
|
||||
* in end.c and topten.c will need to be changed. Some parts of the
|
||||
|
||||
Reference in New Issue
Block a user