fix github pull request #355 - Sokoban cheating

Track sokoban cheating (taking actions that incur a luck penalty).
The pull request only reported the number of times (possibly zero)
that the player broke nethack's sokoban rules when reporting the
"you obtained the Sokoban prize" achievement, which is when the
count is most meaningful, but this implements it as a full-fledged
conduct instead.  This way the #conduct command can be used after
"creative nethacking" to check immediately whether an action has
violated the Sokoban rules so a player willing to put in a bit of
effort can eventually learn which actions have a negative impact.

The new conduct is only shown during games where the character has
entered the Sokoban branch, but once that has happened it gets shown
no matter the location at the time of #conduct or end of game.

Most of this wasn't in the pull request:  expanding the Guidebook to
give more information about sokoban and its conduct.

Bump EDITLEVEL to invalidate to-be-3.7 save files because u.uconduct
has been extended.

Fixes #355
This commit is contained in:
PatR
2020-07-03 02:21:30 -07:00
parent 26dcf68df8
commit 8801ec34eb
7 changed files with 164 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.237 $ $NHDT-Date: 1593651682 2020/07/02 01:01:22 $
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.239 $ $NHDT-Date: 1593768043 2020/07/03 09:20:43 $
General Fixes and Modified Features
-----------------------------------
@@ -385,6 +385,9 @@ boolean options can optionally have the form "name:value" with value taken
from among "true", "yes", "on", or "false", "no", "off"
record number of wishes and artifact wishes in xlogfile
give feedback for '#chat' directed at walls
add 'Sokoban' conduct, tracking the number of times the special Sokoban rules
which incur luck penalties have been violated; don't report it
unless/until Sokoban branch has been entered
Platform- and/or Interface-Specific New Features