fix pull request #478 - homemade tin nutrition
Homemade tin would yield a flat 50 points of nutrition even when made from a corpse that provides less than 50 points. Take the minimum of the two amounts instead of always 50. Fixes #478
This commit is contained in:
+2
-1
@@ -433,7 +433,7 @@ statues representing petrified creatures on Medusa's level might be from
|
|||||||
attempt to make corpse or statue of a named player character would yield that
|
attempt to make corpse or statue of a named player character would yield that
|
||||||
of a random monster instead when 'record' was empty; could result in
|
of a random monster instead when 'record' was empty; could result in
|
||||||
statues of non-stonable creatures in cockatrice nests
|
statues of non-stonable creatures in cockatrice nests
|
||||||
indent items in perm_invent window
|
homemade tin of very low nutrition corpse gave more nutrition than the corpse
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
@@ -615,6 +615,7 @@ curses: for vertical status, line up conditions in columns; usually two but
|
|||||||
condense to three per line if the status window isn't tall enough
|
condense to three per line if the status window isn't tall enough
|
||||||
[at present, highlighting with inverse video includes trailing spaces
|
[at present, highlighting with inverse video includes trailing spaces
|
||||||
used to align entries in their columns--that's a feature...]
|
used to align entries in their columns--that's a feature...]
|
||||||
|
curses: indent items in perm_invent window by one space
|
||||||
macOS: Xcode project was failing to build if the path to the NetHack source
|
macOS: Xcode project was failing to build if the path to the NetHack source
|
||||||
tree contained a space; the issue was within some shell script code
|
tree contained a space; the issue was within some shell script code
|
||||||
contained within the project
|
contained within the project
|
||||||
|
|||||||
@@ -1352,10 +1352,19 @@ consume_tin(const char *mesg)
|
|||||||
/* charge for one at pre-eating cost */
|
/* charge for one at pre-eating cost */
|
||||||
tin = costly_tin(COST_OPEN);
|
tin = costly_tin(COST_OPEN);
|
||||||
|
|
||||||
if (tintxts[r].nut < 0) /* rotten */
|
if (tintxts[r].nut < 0) { /* rotten */
|
||||||
make_vomiting((long) rn1(15, 10), FALSE);
|
make_vomiting((long) rn1(15, 10), FALSE);
|
||||||
else
|
} else {
|
||||||
lesshungry(tintxts[r].nut);
|
int nutamt = tintxts[r].nut;
|
||||||
|
|
||||||
|
/* nutrition from a homemade tin (made from a single corpse)
|
||||||
|
shouldn't be more than nutrition from the corresponding
|
||||||
|
corpse; other tinning modes might use more than one corpse
|
||||||
|
or add extra ingredients so aren't similarly restricted */
|
||||||
|
if (r == HOMEMADE_TIN && nutamt > mons[mnum].cnutrit)
|
||||||
|
nutamt = mons[mnum].cnutrit;
|
||||||
|
lesshungry(nutamt);
|
||||||
|
}
|
||||||
|
|
||||||
if (tintxts[r].greasy) {
|
if (tintxts[r].greasy) {
|
||||||
/* Assume !Glib, because you can't open tins when Glib. */
|
/* Assume !Glib, because you can't open tins when Glib. */
|
||||||
|
|||||||
Reference in New Issue
Block a user