A basic version of starting character rerolling

This adds a "reroll" option that lets players reroll their
character's attributes and starting inventory. Although I generally
think doing this makes the game worse, a) some players are going to
do it regardless and b) if a player is going for a challenge game,
rather than to win, it may be required. So in the absence of an
option like this, players repeatedly start and quit games instead,
creating a large number of junk logfile entries and generally
causing problems for other players on the same shared machine
(because repeatedly reloading the game is very CPU-intensive).

This should in theory be windowport-agnostic (although in practice
it may not be). Tested on tty, X11 and curses; on tty and X11 it
works fine (although X11 treats the change in attributes as
something that needs a status highlight), on curses it is slightly
jankier in terms of what other windows are drawn in the background
(but still plays correctly and I suspect this is a pre-existing
bug).

To form a complete implementation, we will need to consider the
following:

- Should there be a delay on a) starting the game and/or b)
  rerolling? If so, what should it be (maybe configurable via
  sysconf?)

- Should we take more steps to discourage players from rerolling?
  It would be bad if players see the option exists and turn it on
  just because it exists, or (worse) treat it as condoning the
  particular style of play.

- Should we take steps to detect that players are rerolling
  manually and a) tell them to use the option instead, b) tell them
  that this is not an intended way to play (and may make the game
  less enjoyable and/or prevent them getting the practice they need
  to eventually win)?

Breaks save and bones files.
This commit is contained in:
Alex Smith
2025-11-30 06:49:14 +00:00
parent e428046ffa
commit 656f58b099
11 changed files with 117 additions and 10 deletions

View File

@@ -56,6 +56,7 @@ pushweapon when wielding a new weapon, put your previously [False]
quick_farsight usually skip the chance to browse the map when [False]
randomly triggered clairvoyance takes place
rawio allow the use of raw I/O [False]
reroll allow rerolling of starting inventory [False]
rest_on_space count the space bar as a rest character [False]
safe_pet prevent you from (knowingly) attacking your pet(s) [True]
safe_wait require use of 'm' prefix before '.' or 's' to [True]