Prompt and taunt you after 3rd and final death
authorAaron Traas <aaron@traas.org>
Thu, 13 Jul 2017 18:44:55 +0000 (14:44 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 14 Jul 2017 01:52:27 +0000 (21:52 -0400)
Fixed a bug where you'd not be asked about whether to be resurrected a
final time. Now you are.

main.c
tests/coverage_dungeon.html.tpl
tests/pitfall.chk
tests/pitfall.log

diff --git a/main.c b/main.c
index 37461f7e44d6afd28f5a0998a01e2200be0f53e8..61f75850d6a1ef36f7d9a36d2ddbbcf34a9f85ba 100644 (file)
--- a/main.c
+++ b/main.c
@@ -487,8 +487,8 @@ static void croak(void)
          *  death and exit. */
         rspeak(DEATH_CLOSING);
         terminate(endgame);
-    } else if (game.numdie == NDEATHS ||
-               !yes(query, yes_response, arbitrary_messages[OK_MAN]))
+    } else if ( !yes(query, yes_response, arbitrary_messages[OK_MAN])
+                || game.numdie == NDEATHS)
         terminate(endgame);
     else {
         game.place[WATER] = game.place[OIL] = LOC_NOWHERE;
index dc01a52376a59a5343acb9827afc60589a4801b3..a3607b05a61e3ed1581eb20b3caf5af09160336f 100644 (file)
                 <td width="10%" class="headerCovTableHead">% Coverage</td>
               </tr>
               <tr>
-                <td class="headerItem">Test:</td>
+                <td class="headerItem">Test:</a></td>
                 <td class="headerValue">adventure.yaml</td>
                 <td></td>
-                <td class="headerItem">Locations:</td>
+                <td class="headerItem"><a href="#locations">Locations:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
               </tr>
               <tr>
-                <td class="headerItem">Date:</td>
+                <td class="headerItem">Date:</a></td>
                 <td class="headerValue">2017-07-07 21:47:56</td>
                 <td></td>
-                <td class="headerItem">Arbitrary Messages:</td>
+                <td class="headerItem"><a href="#arbitrary_messages">Arbitrary Messages:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
@@ -60,7 +60,7 @@
                 <td></td>
                 <td></td>
                 <td></td>
-                <td class="headerItem">Objects:</td>
+                <td class="headerItem"><a href="#objects">Objects:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
@@ -69,7 +69,7 @@
                 <td></td>
                 <td></td>
                 <td></td>
-                <td class="headerItem">Hints:</td>
+                <td class="headerItem"><a href="#hints">Hints:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
@@ -78,7 +78,7 @@
                 <td></td>
                 <td></td>
                 <td></td>
-                <td class="headerItem">Classes:</td>
+                <td class="headerItem"><a href="#classes">Classes:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
@@ -87,7 +87,7 @@
                 <td></td>
                 <td></td>
                 <td></td>
-                <td class="headerItem">Turn threshold:</td>
+                <td class="headerItem"><a href="#turn_thresholds">Turn threshold:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
@@ -96,7 +96,7 @@
                 <td></td>
                 <td></td>
                 <td></td>
-                <td class="headerItem">Obituaries:</td>
+                <td class="headerItem"><a href="#obituaries">Obituaries:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
                 <td></td>
                 <td></td>
                 <td></td>
-                <td class="headerItem">Actions:</td>
+                <td class="headerItem"><a href="#actions">Actions:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
                 <td></td>
                 <td></td>
                 <td></td>
-                <td class="headerItem">Specials:</td>
+                <td class="headerItem"><a href="#specials">Specials:</a></td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}</td>
                 <td class="headerCovTableEntry">{}%</td>
     <br>
 
     <center>
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="locations" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Location</td>
                 <td class="tableHead">long</td>
         </table>
         <br>
 
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="arbitrary_messages" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Arbitrary Message</td>
                 <td class="tableHead">Covered?</td>
         </table>
         <br>
 
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="objects" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Objects</td>
                 <td class="tableHead">Covered?</td>
         </table>
         <br>
         
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="hints" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Hint Name</td>
                 <td class="tableHead">Question</td>
         </table>
         <br>
 
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="classes" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Class threshold</td>
                 <td class="tableHead">Message</td>
         </table>
         <br>
 
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="turn_thresholds" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Turn threshold</td>
                 <td class="tableHead">Message</td>
         </table>
         <br>
 
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="obituaries" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Obituary</td>
                 <td class="tableHead">Query</td>
         </table>
         <br>
 
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="actions" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Action ID</td>
                 <td class="tableHead">Message</td>
         </table>
         <br>
 
-        <table width="60%" cellpadding=1 cellspacing=1 border=0>
+        <table id="specials" width="60%" cellpadding=1 cellspacing=1 border=0>
             <tr>
                 <td class="tableHead">Special ID</td>
                 <td class="tableHead">Message</td>
index ce55f55a44d027a683b4ee032bec53c122b2d638..23d4859fe6eed594e89d8cffd14577ad30516093 100644 (file)
@@ -57,9 +57,55 @@ There is food here.
 
 There is a bottle of water here.
 
+> xyzzy
+
+>>Foof!<<
+
+It is now pitch dark.  If you proceed you will likely fall into a pit.
+
+> n
+
+There is no way to go that direction.
+
+You fell into a pit and broke every bone in your body!
+
+You clumsy oaf, you've done it again!  I don''t know how long I can
+keep this up.  Do you want me to try reincarnating you again?
+
+> y
+
+Okay, now where did I put my orange smoke?....  >POOF!<
+Everything disappears in a dense cloud of orange smoke.
+
+You're inside building.
+
+There are some keys on the ground here.
+
+There is a shiny brass lamp nearby.
+
+There is food here.
+
+There is a bottle of water here.
+
+> xyzzy
+
+>>Foof!<<
+
+It is now pitch dark.  If you proceed you will likely fall into a pit.
+
+> w
+
+You fell into a pit and broke every bone in your body!
+
+Now you''ve really done it!  I'm out of orange smoke!  You don''t expect
+me to do a decent reincarnation without any orange smoke, do you?
+
+> y
+
+Okay, if you're so smart, do it yourself!  I'm leaving!
 
-You scored 22 out of a possible 430, using 3 turns.
+You scored 6 out of a possible 430, using 7 turns.
 
 You are obviously a rank amateur.  Better luck next time.
 
-To achieve the next higher rating, you need 24 more points.
+To achieve the next higher rating, you need 40 more points.
index 8342e3758cc47659f6fb33a6d7b13f4fe598a8e1..6c5adc7991589518aaa2a5943ed278a6e9471c55 100644 (file)
@@ -1,7 +1,14 @@
 ## Death by pitfall
+# Die 3 times so we can cover all the opituary messages
 n
 seed 780351908
 enter building
 xyzzy
 s
 y
+xyzzy
+n
+y
+xyzzy
+w
+y