Files
nethack/doc
PatR 0ce2439e82 github issue #1275: curses init vs pauper
Reported by ars3niy, the curses interface could behave strangely on
the first turn if the 'pauper' option/conduct was specified.

There isn't any definitive flag indicating whether or not the game
has started.  Since 'moves' has traditionally been initialized to 1
rather than to 0, there were several instances of
|  if (moves <= 1 && invent != NULL)
being used to determine the starting state on the assumption that
once hero has inventory, the game has begun.  Introduction of the
'pauper' option made the test for non-Null invent become unreliable.
For paupers, the program would behave as if the game hadn't started
yet until the player finally made a time-consuming move.

This changes compile-time initialization of 'moves' from 1 to 0,
then sets it to 1 when initial inventory would be bestowed (even
when 'pauper' inhibits that).  That's probably not the best place
for it, but testing for 'moves==0' now should produce an identical
effect as 'moves<=1 && invent!=NULL' used to accomplish.

It would have been much simpler just to give paupers 1 gold piece,
or perhaps one rock, in place of usual starting gear so that their
initial inventory wouldn't be empty, but the moves+invent way of
checking for start-of-play has always bothered me.

Should 'pauper' be preventing 'nethack -X' from giving its starting
wand of wishing?  Conducts and explore mode don't really overlap so
maybe it doesn't matter.

Fixes #1275
2024-08-31 14:08:04 -07:00
..
2022-06-18 10:29:15 -04:00
2024-02-28 20:15:56 -08:00
2023-08-28 16:17:41 -04:00
2022-01-29 22:57:22 -05:00
2022-01-29 22:57:22 -05:00
2022-01-29 22:57:22 -05:00
2024-02-28 20:15:56 -08:00
2024-05-16 23:38:54 -07:00
2018-11-11 10:29:52 -05:00
2018-11-11 10:29:52 -05:00
2024-02-28 20:15:56 -08:00
2024-02-29 09:03:00 -05:00
2024-02-28 20:15:56 -08:00
2022-02-22 20:14:44 -05:00
2024-02-28 20:15:56 -08:00
2024-02-29 07:40:19 -05:00
2024-03-19 18:59:23 +02:00