Add new hallucinatory gods.
This commit is contained in:
@@ -1108,6 +1108,7 @@ allow reading many more items
|
|||||||
when you're hiding under something a zap downward should not hit that
|
when you're hiding under something a zap downward should not hit that
|
||||||
something, while a zap upward should
|
something, while a zap upward should
|
||||||
show more explicit reason why player was helpless at death
|
show more explicit reason why player was helpless at death
|
||||||
|
added new hallucinatory-only gods
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific New Features
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
+55
-11
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 pray.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
/* NetHack 3.5 pray.c $NHDT-Date: 1427670643 2015/03/29 23:10:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.69 $ */
|
||||||
/* NetHack 3.5 pray.c $Date: 2012/05/07 01:44:38 $ $Revision: 1.62 $ */
|
/* NetHack 3.5 pray.c $Date: 2012/05/07 01:44:38 $ $Revision: 1.62 $ */
|
||||||
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
|
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1863,26 +1863,70 @@ aligntyp alignment;
|
|||||||
return gnam;
|
return gnam;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *hallu_gods[] = {
|
||||||
|
"the Flying Spaghetti Monster", /* Church of the FSM */
|
||||||
|
"Eris", /* Discordianism */
|
||||||
|
"the Martians", /* every science fiction ever */
|
||||||
|
"Xom", /* Crawl */
|
||||||
|
"AnDoR dRaKoN", /* ADOM */
|
||||||
|
"the Central Bank of Yendor", /* economics */
|
||||||
|
"Tooth Fairy", /* real world(?) */
|
||||||
|
"Om", /* Discworld */
|
||||||
|
"Yawgmoth", /* Magic: the Gathering */
|
||||||
|
"Morgoth", /* LoTR */
|
||||||
|
"Cthulhu", /* Lovecraft */
|
||||||
|
"the Ori", /* Stargate */
|
||||||
|
"destiny", /* why not? */
|
||||||
|
"your Friend the Computer", /* Paranoia */
|
||||||
|
};
|
||||||
|
|
||||||
/* hallucination handling for priest/minion names: select a random god
|
/* hallucination handling for priest/minion names: select a random god
|
||||||
iff character is hallucinating */
|
iff character is hallucinating */
|
||||||
const char *
|
const char *
|
||||||
halu_gname(alignment)
|
halu_gname(alignment)
|
||||||
aligntyp alignment;
|
aligntyp alignment;
|
||||||
{
|
{
|
||||||
const char *gnam;
|
const char *gnam = NULL;
|
||||||
int which;
|
int which;
|
||||||
|
|
||||||
if (!Hallucination) return align_gname(alignment);
|
if (!Hallucination)
|
||||||
|
return align_gname(alignment);
|
||||||
|
|
||||||
which = randrole();
|
/* The priest may not have initialized god names. If this is the
|
||||||
switch (rn2(3)) {
|
* case, and we roll priest, we need to try again. */
|
||||||
case 0: gnam = roles[which].lgod; break;
|
do
|
||||||
case 1: gnam = roles[which].ngod; break;
|
which = randrole();
|
||||||
case 2: gnam = roles[which].cgod; break;
|
while (!roles[which].lgod);
|
||||||
default: gnam = 0; break; /* lint suppression */
|
|
||||||
|
switch (rn2(9)) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
gnam = roles[which].lgod;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
gnam = roles[which].ngod;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
gnam = roles[which].cgod;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
gnam = hallu_gods[rn2(sizeof hallu_gods / sizeof *hallu_gods)];
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
gnam = Moloch;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
impossible("rn2 broken in halu_gname?!?");
|
||||||
}
|
}
|
||||||
if (!gnam) gnam = Moloch;
|
if (!gnam) {
|
||||||
if (*gnam == '_') ++gnam;
|
impossible("No random god name?");
|
||||||
|
gnam = "your Friend the Computer"; /* Paranoia */
|
||||||
|
}
|
||||||
|
if (*gnam == '_')
|
||||||
|
++gnam;
|
||||||
return gnam;
|
return gnam;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user