]> granicus.if.org Git - nethack/commitdiff
^X/enlightenment tweaks
authorPatR <rankin@nethack.org>
Fri, 5 May 2017 01:03:12 +0000 (18:03 -0700)
committerPatR <rankin@nethack.org>
Fri, 5 May 2017 01:03:12 +0000 (18:03 -0700)
Noticed while working on something else:
  You entered the dungeon N turns ago
was missing the terminating period, and when polymorphed into a
1 hit die critter, plural "hit dice" is incorrect.  0 hit dice is
confusing even when fully spelled out, so include an explanatory
remark with it.

Don't include score (available if configured with SCORE_ON_BOTL)
unless player has the 'showscore' option enabled.  The value is
an approximation--accurate as far as it goes, but the value can
change depending upon how the game ends.  Someone who asks to have
it displayed on the status line will probably be used to that, but
others might start reporting bugs for it.

doc/fixes36.1
src/cmd.c

index 4e4eb01b8fd203ab4faf141fed161c23f879b9f1..3db597f9f7071653de1f92e0c51e8a602ade9ca5 100644 (file)
@@ -410,6 +410,8 @@ save 'autodescribe' option value prior to detection or #terrain display and
        restore it after rather than leave it forced on
 humanoid pet could become hostile but still remain tame if it observed hero
        attacking a peaceful creature
+minor ^X/enlightenment bugs: grammar when poly'd into '1 hit dice' critter,
+       missing punctuation for "You entered the dungeon N turns ago"
 
 
 Platform- and/or Interface-Specific Fixes
index f9473e6a71ce2698063da29c95ac7a0effbbe5be..d88664664b2955f07dafa9561405162fa94d11b4 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 cmd.c   $NHDT-Date: 1457207033 2016/03/05 19:43:53 $  $NHDT-Branch: chasonr $:$NHDT-Revision: 1.220 $ */
+/* NetHack 3.6 cmd.c   $NHDT-Date: 1493946186 2017/05/05 01:03:06 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.255 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1586,7 +1586,10 @@ int final;
     }
 }
 
-/* characteristics: expanded version of bottom line strength, dexterity, &c */
+/* characteristics: expanded version of bottom line strength, dexterity, &c;
+   [3.6.1: now includes all status info (except things already shown in the
+   'background' section), primarily so that blind players can suppress the
+   status line(s) altogether and use ^X feedback on demand to view HP, &c] */
 STATIC_OVL void
 characteristics_enlightenment(mode, final)
 int mode;
@@ -1612,22 +1615,39 @@ int final;
     enl_msg("Your armor class ", "is ", "was ", buf, "");
 
     if (Upolyd) {
-        Sprintf(buf, "%d hit dice", mons[u.umonnum].mlevel);
+        switch (mons[u.umonnum].mlevel) {
+        case 0:
+            /* status line currently being explained shows "HD:0" */
+            Strcpy(buf, "0 hit dice (actually 1/2)");
+            break;
+        case 1:
+            Strcpy(buf, "1 hit die");
+            break;
+        default:
+            Sprintf(buf, "%d hit dice", mons[u.umonnum].mlevel);
+            break;
+        }
     } else {
         /* flags.showexp does not matter */
         /* experience level is already shown in the Background section */
         Sprintf(buf, "%-1ld experience point%s",
-                u.uexp, u.uexp == 1 ? "" : "s");
+                u.uexp, plur(u.uexp));
     }
     you_have(buf, "");
 
-    Sprintf(buf, " You entered the dungeon %ld turn%s ago",
-            moves, moves == 1 ? "" : "s");
-    putstr(en_win, 0, buf);
+    /* this is shown even if the 'time' option is off */
+    Sprintf(buf, "the dungeon %ld turn%s ago", moves, plur(moves));
+    /* same phrasing at end of game:  "entered" is unconditional */
+    enlght_line(You_, "entered ", buf, "");
 
 #ifdef SCORE_ON_BOTL
-    Sprintf(buf, "%ld", botl_score());
-    enl_msg("Your score ", "is ", "was ", buf, "");
+    if (flags.showscore) {
+        /* describes what's shown on status line, which is an approximation;
+           only show it here if player has the 'showscore' option enabled */
+        Sprintf(buf, "%ld%s", botl_score(),
+                !final ? "" : " before end-of-game adjustments");
+        enl_msg("Your score ", "is ", "was ", buf, "");
+    }
 #endif
 
     /* bottom line order */