diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 5a82bcabb..73fc8c66b 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.141 $ $NHDT-Date: 1584869896 2020/03/22 09:38:16 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.142 $ $NHDT-Date: 1584872363 2020/03/22 10:19:23 $ General Fixes and Modified Features ----------------------------------- @@ -90,6 +90,7 @@ correctly account for fuel remaining when lit candles are attached praying on an unaligned altar outside of Gehennom behaved like an ordinary prayer; make that always fail Discworld typo: Moving Pictures passage 12 "or" -> "of" +unicorn corpses and wraith corpses could be sacrificed even if "too old" Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/pray.c b/src/pray.c index d69db0db4..7718bc247 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pray.c $NHDT-Date: 1584756090 2020/03/21 02:01:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.141 $ */ +/* NetHack 3.6 pray.c $NHDT-Date: 1584872363 2020/03/22 10:19:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.142 $ */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1371,6 +1371,8 @@ dosacrifice() value = eaten_stat(value, otmp); } + /* same race or former pet results apply even if the corpse is + too old (value==0) */ if (your_race(ptr)) { if (is_demon(g.youmonst.data)) { You("find the idea very satisfying."); @@ -1454,8 +1456,16 @@ dosacrifice() adjalign(-3); value = -1; HAggravate_monster |= FROMOUTSIDE; + } else if (!value) { + ; /* too old; don't give undead or unicorn bonus or penalty */ } else if (is_undead(ptr)) { /* Not demons--no demon corpses */ - if (u.ualign.type != A_CHAOTIC) + /* most undead that leave a corpse yield 'human' (or other race) + corpse so won't get here; the exception is wraith; give the + bonus for wraith to chaotics too because they are sacrificing + something valuable (unless hero refuses to eat such things) */ + if (u.ualign.type != A_CHAOTIC + /* reaching this side of the 'or' means hero is chaotic */ + || (ptr == &mons[PM_WRAITH] && u.uconduct.unvegetarian)) value += 1; } else if (is_unicorn(ptr)) { int unicalign = sgn(ptr->maligntyp);