-$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.137 $ $NHDT-Date: 1584482684 2020/03/17 22:04:44 $
+$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.140 $ $NHDT-Date: 1584756090 2020/03/21 02:01:30 $
General Fixes and Modified Features
-----------------------------------
correctly account for fuel remaining when lit candles are attached
to candelabrum (the previous code would make the game unwinnable if
there were 15 or fewer turns remaining)
+praying on an unaligned altar outside of Gehennom behaved like an ordinary
+ prayer; make that always fail
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
-/* NetHack 3.6 pray.c $NHDT-Date: 1581322665 2020/02/10 08:17:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.140 $ */
+/* NetHack 3.6 pray.c $NHDT-Date: 1584756090 2020/03/21 02:01:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.141 $ */
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
/* NetHack may be freely redistributed. See license for details. */
int
dosacrifice()
{
- static NEARDATA const char cloud_of_smoke[] =
- "A cloud of %s smoke surrounds you...";
+ static NEARDATA const char
+ cloud_of_smoke[] = "A cloud of %s smoke surrounds you...";
register struct obj *otmp;
int value = 0, pm;
boolean highaltar;
"So, mortal! You dare desecrate my High Temple!");
/* Throw everything we have at the player */
god_zaps_you(altaralign);
- } else if (value
- < 0) { /* I don't think the gods are gonna like this... */
+ } else if (value < 0) { /* don't think the gods are gonna like this... */
gods_upset(altaralign);
} else {
int saved_anger = u.ugangr;
g.p_aligntyp = on_altar() ? a_align(u.ux, u.uy) : u.ualign.type;
g.p_trouble = in_trouble();
- if (is_demon(g.youmonst.data) && (g.p_aligntyp != A_CHAOTIC)) {
+ if (is_demon(g.youmonst.data) /* ok if chaotic or none (Moloch) */
+ && (g.p_aligntyp == A_LAWFUL || g.p_aligntyp != A_NEUTRAL)) {
if (praying)
pline_The("very idea of praying to a %s god is repugnant to you.",
g.p_aligntyp ? "lawful" : "neutral");
else
alignment = u.ualign.record;
- if ((g.p_trouble > 0) ? (u.ublesscnt > 200) /* big trouble */
- : (g.p_trouble < 0) ? (u.ublesscnt > 100) /* minor difficulties */
- : (u.ublesscnt > 0)) /* not in trouble */
+ if (g.p_aligntyp == A_NONE) /* praying to Moloch */
+ g.p_type = -2;
+ else if ((g.p_trouble > 0) ? (u.ublesscnt > 200) /* big trouble */
+ : (g.p_trouble < 0) ? (u.ublesscnt > 100) /* minor difficulties */
+ : (u.ublesscnt > 0)) /* not in trouble */
g.p_type = 0; /* too soon... */
else if ((int) Luck < 0 || u.ugangr || alignment < 0)
g.p_type = 1; /* too naughty... */
aligntyp alignment = g.p_aligntyp;
u.uinvulnerable = FALSE;
- if (g.p_type == -1) {
+ if (g.p_type == -2) {
+ /* praying at an unaligned altar, not necessarily in Gehennom */
+ You("%s diabolical laughter all around you...",
+ !Deaf ? "hear" : "intuit");
+ wake_nearby();
+ adjalign(-2);
+ exercise(A_WIS, FALSE);
+ if (!Inhell) {
+ /* hero's god[dess] seems to be keeping his/her head down */
+ pline("Nothing else happens."); /* not actually true... */
+ return 1;
+ } /* else use regular Inhell result below */
+ } else if (g.p_type == -1) {
+ /* praying while poly'd into an undead creature while non-chaotic */
godvoice(alignment,
(alignment == A_LAWFUL)
? "Vile creature, thou durst call upon me?"