From: NHOrus Date: Sun, 9 Jul 2017 17:03:30 +0000 (+0300) Subject: Two more lines of coverage; more cleanup for macros X-Git-Tag: 2017-07-10~10 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=53b68161ff5dcc6015fe5ff133830549d7359ed1;p=open-adventure.git Two more lines of coverage; more cleanup for macros --- diff --git a/advent.h b/advent.h index f902a3e..553d1c7 100644 --- a/advent.h +++ b/advent.h @@ -60,7 +60,7 @@ #define LIQUID() (game.prop[BOTTLE] == WATER_BOTTLE? WATER : game.prop[BOTTLE] == OIL_BOTTLE ? OIL : NO_OBJECT ) #define LIQLOC(LOC) (CNDBIT((LOC),COND_FLUID)? CNDBIT((LOC),COND_OILY) ? OIL : WATER : NO_OBJECT) #define FORCED(LOC) CNDBIT(LOC, COND_FORCED) -#define DARK(DUMMY) ((!tstbit(conditions[game.loc],COND_LIT)) && (game.prop[LAMP] == LAMP_DARK || !HERE(LAMP))) +#define DARK(DUMMY) (!CNDBIT(game.loc,COND_LIT) && (game.prop[LAMP] == LAMP_DARK || !HERE(LAMP))) #define PCT(N) (randrange(100) < (N)) #define GSTONE(OBJ) ((OBJ) == EMERALD || (OBJ) == RUBY || (OBJ) == AMBER || (OBJ) == SAPPH) #define FOREST(LOC) CNDBIT(LOC, COND_FOREST) diff --git a/tests/illformed.chk b/tests/illformed.chk index 73ca685..57dff92 100644 --- a/tests/illformed.chk +++ b/tests/illformed.chk @@ -98,6 +98,18 @@ how much it will affect your score to accept the hints. Finally, to save time, you may specify "brief", which tells me never to repeat the full description of a place unless you explicitly ask me to. +> _ + +I don't know how to apply that word here. + +You're in front of building. + +> back + +Sorry, but I no longer seem to remember how it was you got here. + +You're in front of building. + > eat grate Don't be ridiculous! @@ -242,7 +254,9 @@ Blasting requires dynamite. > building -You're in front of building. +You are standing at the end of a road before a small brick building. +Around you is a forest. A small stream flows out of the building and +down a gully. > cave @@ -271,9 +285,7 @@ Carry what? I am unsure how you are facing. Use compass points or nearby objects. -You are standing at the end of a road before a small brick building. -Around you is a forest. A small stream flows out of the building and -down a gully. +You're in front of building. > eat @@ -597,7 +609,7 @@ Okay, "boo". > score -You have garnered 27 out of a possible 430 points, using 103 turns. +You have garnered 27 out of a possible 430 points, using 105 turns. > z @@ -605,7 +617,7 @@ OK > score -You have garnered 27 out of a possible 430 points, using 105 turns. +You have garnered 27 out of a possible 430 points, using 107 turns. > quit keys @@ -654,7 +666,7 @@ Do you really want to quit now? OK -You scored 27 out of a possible 430, using 113 turns. +You scored 27 out of a possible 430, using 115 turns. You are obviously a rank amateur. Better luck next time. diff --git a/tests/illformed.log b/tests/illformed.log index 13821c4..65d49cc 100644 --- a/tests/illformed.log +++ b/tests/illformed.log @@ -6,6 +6,8 @@ seed 1801426495 version help info +_ +back eat grate eat building in diff --git a/tests/weirddwarf.chk b/tests/weirddwarf.chk index 84731c2..90104c8 100644 --- a/tests/weirddwarf.chk +++ b/tests/weirddwarf.chk @@ -501,6 +501,10 @@ Carry what? You can't be serious! +> find dwarf + +I believe what you want is right here with you. + > attack With what? Your bare hands? @@ -510,7 +514,7 @@ With what? Your bare hands? Feed what? -You scored 103 out of a possible 430, using 87 turns. +You scored 103 out of a possible 430, using 88 turns. Your score qualifies you as a novice class adventurer. diff --git a/tests/weirddwarf.log b/tests/weirddwarf.log index 70c6e53..b7af3a0 100644 --- a/tests/weirddwarf.log +++ b/tests/weirddwarf.log @@ -88,5 +88,6 @@ read dwarf feed dwarf carry carry dwarf +find dwarf attack feed