fix github issue #742 - suit of no digestion
Reported by vultur-cadens: slow digestion from wearing white dragon scales/mail blocked per-turn hunger and didn't cause any hunger, unlike ring of slow digestion which blocks per-turn hunger but still causes some hunger as a worn ring itself. If no rings or amulet were worn, wearing the suit prevented the hero from ever burning any nutrition. Change to treat wearing the suit to be quite a bit like wearing a ring, unless hero is also wearing an actual ring of slow digestion (then the hunger cost of the suit is 'free'). Wearing a ring of slow digestion and another ring consumes two units of nutrition every 20 turns, no matter what suit. Wearing white dragon scales/mail and two non-slow digestion rings now consumes three units of nutrition every 20 turns. Using the suit to effectively get an extra ring finger isn't free. Fixes #742
This commit is contained in:
@@ -1163,6 +1163,9 @@ corpses of neuter monsters had random chance to be flagged as female so would
|
||||
one-shot food testing ability conferred by blessed scroll of food detection
|
||||
didn't warn about globs of green slime because the relevant code was
|
||||
only executed for corpses, eggs, and tins, not for globs
|
||||
worn ring of slow digestion blocks per-turn hunger but not the hunger caused
|
||||
by wearing it; white dragon scales/mail was blocking per-turn hunger
|
||||
and didn't cause any hunger itself; change to treat it like the ring
|
||||
|
||||
curses: 'msg_window' option wasn't functional for curses unless the binary
|
||||
also included tty support
|
||||
|
||||
18
src/eat.c
18
src/eat.c
@@ -3036,8 +3036,26 @@ gethungry(void)
|
||||
* +0 ring of protection might do something (enhanced "magical
|
||||
* cancellation") if hero doesn't have protection from some
|
||||
* other source (cloak or second ring).
|
||||
*
|
||||
* [If wearing duplicate rings whose effects don't stack,
|
||||
* should they both consume nutrition, or just one of them?
|
||||
* Two +0 rings of protection are treated as if only one,
|
||||
* but this could apply to most rings.]
|
||||
*/
|
||||
switch (accessorytime) { /* note: use even cases among 0..19 only */
|
||||
case 0:
|
||||
/* 3.7: if not wearing a ring of slow digestion, obtaining
|
||||
that property from worn armor (white dragon scales/mail)
|
||||
causes the armor to burn nutrition; since it's not
|
||||
actually a ring, we don't check for it on the ring
|
||||
turns; because of that, wearing two (non-slow digestion)
|
||||
rings plus the armor consumes more nutrition that one
|
||||
non-slow digestion ring plus ring of slow digestion */
|
||||
if (Slow_digestion
|
||||
&& (!uright || uright->otyp != RIN_SLOW_DIGESTION)
|
||||
&& (!uleft || uleft->otyp != RIN_SLOW_DIGESTION))
|
||||
u.uhunger--;
|
||||
break;
|
||||
case 4:
|
||||
if (uleft && uleft->otyp != MEAT_RING
|
||||
/* more hungry if +/- is nonzero or +/- doesn't apply or
|
||||
|
||||
Reference in New Issue
Block a user