From: Eric S. Raymond Date: Sun, 16 Jul 2017 11:13:06 +0000 (-0400) Subject: Fix bug where knife hit might not be reported. X-Git-Tag: 1.3~81 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=8bce57d3dfc533b5aa8dab77428033b2c53f10bb Fix bug where knife hit might not be reported. --- diff --git a/adventure.yaml b/adventure.yaml index f857ac7..2d8755e 100644 --- a/adventure.yaml +++ b/adventure.yaml @@ -2666,7 +2666,7 @@ arbitrary_messages: !!omap - DWARF_SINGLE: 'There is a threatening little dwarf in the room with you!' - KNIFE_THROWN: 'One sharp nasty knife is thrown at you!' - SAYS_PLUGH: 'A hollow voice says "PLUGH".' -#- GETS_YOU: 'It gets you!' +- GETS_YOU: 'It gets you!' - MISSES_YOU: 'It misses!' - UNSURE_FACING: 'I am unsure how you are facing. Use compass points or nearby objects.' - NO_INOUT_HERE: |- diff --git a/main.c b/main.c index c9aca31..af11a4b 100644 --- a/main.c +++ b/main.c @@ -448,7 +448,7 @@ static bool dwarfmove(void) rspeak(stick > 1 ? MULTIPLE_HITS : (stick == 1 ? ONE_HIT : NONE_HIT), stick); } else { rspeak(KNIFE_THROWN); - rspeak(MISSES_YOU); + rspeak(stick ? GETS_YOU : MISSES_YOU); } if (stick == 0) return true; diff --git a/tests/bigfail.chk b/tests/bigfail.chk index 0a47e52..2a2c1ca 100644 --- a/tests/bigfail.chk +++ b/tests/bigfail.chk @@ -2174,9 +2174,64 @@ You're on west bank of fissure. A crystal bridge spans the fissure. +> inven + +You are currently holding the following: +Brass lantern +Black rod +Batteries + +> e + +You're on east bank of fissure. + +A crystal bridge spans the fissure. + +> e + +There is a threatening little dwarf in the room with you! + +One sharp nasty knife is thrown at you! + +It gets you! + +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 is a richly-carved ebony statuette here! + +There is an emerald here the size of a plover's egg! + +There is a jewel-encrusted trident here! + +A small velvet pillow lies on the floor. + +There is a platinum pyramid here, 8 inches on a side! + +There are diamonds here! + +There is an enormous ruby here! + +There are bars of silver here! + +There is a persian rug spread out on the floor! + +There is a large sparkling nugget of gold here! + +A precious jade necklace has been dropped here! + +There is precious jewelry here! + -You scored 217 out of a possible 430, using 362 turns. +You scored 207 out of a possible 430, using 365 turns. You may now consider yourself a "Seasoned Adventurer". -To achieve the next higher rating, you need 34 more points. +To achieve the next higher rating, you need 44 more points. diff --git a/tests/bigfail.log b/tests/bigfail.log index c09d88d..6711100 100644 --- a/tests/bigfail.log +++ b/tests/bigfail.log @@ -378,3 +378,7 @@ e e # PARALLEL1 coverage n +inven +e +e +y diff --git a/tests/listenloud.chk b/tests/listenloud.chk index 4635e09..60ef13b 100644 --- a/tests/listenloud.chk +++ b/tests/listenloud.chk @@ -678,7 +678,7 @@ There is a threatening little dwarf in the room with you! One sharp nasty knife is thrown at you! -It misses! +It gets you! Oh dear, you seem to have gotten yourself killed. I might be able to help you out, but I've never really done this before. Do you want me