X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=3c4c034bfb94d2655812ffeeea4c56564525122a;hb=2848494a01db9baccf69c9a592ea5a916af84a8a;hp=debbb4670a310de8dc4f98d6332be88dfef578d5;hpb=9c7c23b75aefa03b41a7fb562359310e027510a9;p=open-adventure.git diff --git a/main.c b/main.c index debbb46..3c4c034 100644 --- a/main.c +++ b/main.c @@ -188,7 +188,7 @@ static bool fallback_handler(char *buf) * notes). */ static void checkhints(void) { - if (COND[game.loc] >= game.conds) { + if (conditions[game.loc] >= game.conds) { for (int hint = 0; hint < HINT_COUNT; hint++) { if (game.hinted[hint]) continue; @@ -799,7 +799,7 @@ static bool closecheck(void) * objects he might be carrying (lest he have some which * could cause trouble, such as the keys). We describe the * flash of light and trundle back. */ - game.prop[BOTTLE] = PUT(BOTTLE, LOC_NE, 1); + game.prop[BOTTLE] = PUT(BOTTLE, LOC_NE, EMPTY_BOTTLE); game.prop[PLANT] = PUT(PLANT, LOC_NE, 0); game.prop[OYSTER] = PUT(OYSTER, LOC_NE, 0); OBJTXT[OYSTER] = 3; @@ -848,9 +848,9 @@ static void lampcheck(void) * here, in which case we replace the batteries and continue. * Second is for other cases of lamp dying. Eve after it goes * out, he can explore outside for a while if desired. */ - if (game.limit <= WARNTIME && HERE(BATTERY) && game.prop[BATTERY] == 0 && HERE(LAMP)) { + if (game.limit <= WARNTIME && HERE(BATTERY) && game.prop[BATTERY] == FRESH_BATTERIES && HERE(LAMP)) { rspeak(REPLACE_BATTERIES); - game.prop[BATTERY] = 1; + game.prop[BATTERY] = DEAD_BATTERIES; if (TOTING(BATTERY)) DROP(BATTERY, game.loc); game.limit += BATTERYLIFE; @@ -865,7 +865,8 @@ static void lampcheck(void) game.lmwarn = true; int spk = GET_BATTERIES; if (game.place[BATTERY] == LOC_NOWHERE)spk = LAMP_DIM; - if (game.prop[BATTERY] == 1)spk = MISSING_BATTERYIES; + if (game.prop[BATTERY] == DEAD_BATTERIES) + spk = MISSING_BATTERIES; rspeak(spk); } }