Change the MAX_REROLLS option to be MAX_REROLL_RATE

Having a hard cap on the number of rerolls doesn't help save CPU
usage from excessive rerolling, because if the cap is set low
enough to keep the CPU usage reasonable it isn't high enough for
players to actually use the feature.

Instead, allow capping the number of rerolls per second. (Sensible
values seem to be in the 5-10 range.) If the player attempts more
rerolls than this, show a paranoid confirmation prompt: the need to
type the answer to the prompt will slow a human user down (and if
the prompt is filled in too quickly, it will simply just be shown
again, preventing attempts to use automation to skip the prompt).
This commit is contained in:
Alex Smith
2026-05-22 06:02:00 +01:00
parent 7d512fd8ce
commit 3f837939ba
7 changed files with 49 additions and 37 deletions
+3 -3
View File
@@ -55,9 +55,9 @@ GENERICUSERS=play player game games nethack nethacker ec2-user
# letter and "lock" (eg. alock, block, ...)
MAXPLAYERS=10
# Limit the number of rerolls
# Default is 0 (meaning infinite), valid values are 0-255
MAX_REROLLS=0
# Limit the number of rerolls per second when using the reroll option.
# 0 means that there is no limit on how quickly the user can reroll.
MAX_REROLL_RATE=0
# If not null, added to string "To get local support, " in the support
# information help.