added new hallucinatory-only gods
options to create the character blind or nudist
moving clouds on the plane of air
+tribute to Terry Pratchett
Platform- and/or Interface-Specific New Features
-/* NetHack 3.5 extern.h $NHDT-Date: 1426966688 2015/03/21 19:38:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.411 $ */
+/* NetHack 3.5 extern.h $NHDT-Date: 1428196810 2015/04/05 01:20:10 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.451 $ */
/* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
(struct obj *, int, genericptr_t, int, const char *));
E char *FDECL(coyotename, (struct monst *,char *));
E const char *FDECL(noveltitle, (int *));
+E const char *FDECL(lookup_novel, (const char *, int *));
/* ### do_wear.c ### */
-/* NetHack 3.5 do_name.c $NHDT-Date: 1426558927 2015/03/17 02:22:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.53 $ */
+/* NetHack 3.5 do_name.c $NHDT-Date: 1428196077 2015/04/05 01:07:57 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.64 $ */
/* NetHack 3.5 do_name.c $Date: 2012/01/29 03:00:17 $ $Revision: 1.49 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
const char *aname;
short objtyp;
+ /* Do this now because there's no point in even asking for a name */
+ if (obj->otyp == SPE_NOVEL) {
+ pline("%s already has a published name.", Ysimple_name2(obj));
+ return;
+ }
+
Sprintf(qbuf, "What do you want to name %s ",
is_plural(obj) ? "these" : "this");
(void)safe_qbuf(qbuf, qbuf, "?", obj, xname, simpleonames, "item");
return buf;
}
+/* make sure "The Colour of Magic" remains the first entry in here */
static const char * const sir_Terry_novels[] = {
"The Colour of Magic", "The Light Fantastic", "Equal Rites",
"Mort", "Sourcery", "Wyrd Sisters", "Pyramids", "Guards! Guards!",
return sir_Terry_novels[j];
}
+const char *
+lookup_novel(lookname, idx)
+const char *lookname;
+int *idx;
+{
+ int k;
+
+ /* Take American or U.K. spelling of this one */
+ if (strcmpi(lookname, "The Color of Magic") == 0)
+ lookname = sir_Terry_novels[0];
+ for (k = 0; k < SIZE(sir_Terry_novels); ++k) {
+ if (strcmpi(lookname, sir_Terry_novels[k]) == 0) {
+ if (idx) *idx = k;
+ return sir_Terry_novels[k];
+ }
+ }
+
+ return (const char *)0;
+}
/*do_name.c*/
-/* NetHack 3.5 objnam.c $NHDT-Date: 1427440866 2015/03/27 07:21:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.109 $ */
+/* NetHack 3.5 objnam.c $NHDT-Date: 1428196817 2015/04/05 01:20:17 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.120 $ */
/* NetHack 3.5 objnam.c $Date: 2011/10/27 02:24:54 $ $Revision: 1.101 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
}
}
+ if (typ && wizard) {
+ if (typ == SPE_NOVEL) {
+ if (name && !lookup_novel((char *)name, (int *)0)) {
+ pline("There's no novel by that name.");
+ return ((struct obj *)0);
+ }
+ }
+ }
+
/*
* Create the object, then fine-tune it.
*/
aname = artifact_name(name, &objtyp);
if (aname && objtyp == otmp->otyp) name = aname;
+ /* 3.6.0 tribute - fix up novel */
+ if (otmp->otyp == SPE_NOVEL) {
+ int novidx = 0;
+ const char *novelname;
+
+ novelname = lookup_novel(name, &novidx);
+ if (novelname) {
+ otmp->novelidx = novidx;
+ name = novelname;
+ }
+ }
+
otmp = oname(otmp, name);
if (otmp->oartifact) {
otmp->quan = 1L;
- u.uconduct.wisharti++; /* KMH, conduct */
+ u.uconduct.wisharti++;
}
}