carry(obj, game.loc);
if (obj == BOTTLE && LIQUID() != NO_OBJECT)
game.place[LIQUID()] = CARRIED;
- if (GSTONE(obj) && game.prop[obj] != STATE_GROUND) {
- game.prop[obj] = STATE_GROUND;
+ if (GSTONE(obj) && game.prop[obj] != STATE_FOUND) {
+ game.prop[obj] = STATE_FOUND;
game.prop[CAVITY] = CAVITY_EMPTY;
}
rspeak(OK_MAN);
DESTROY(FOOD);
game.prop[BEAR] = SITTING_BEAR;
game.fixed[AXE] = 0;
- game.prop[AXE] = 0;
+ game.prop[AXE] = AXE_HERE;
spk = BEAR_TAMED;
}
} else if (obj == OGRE) {
char word1[TOKLEN + 1];
packed_to_token(command->wd1, word1);
int wd = (int) get_vocab_id(word1);
- /* FIXME: magic numbers */
if (wd == MOTION_WORD(XYZZY) ||
wd == MOTION_WORD(PLUGH) ||
wd == MOTION_WORD(PLOVER) ||
if (game.prop[BIRD] == BIRD_UNCAGED && game.loc == game.place[STEPS] && game.prop[JADE] < 0) {
drop(JADE, game.loc);
- game.prop[JADE] = 0;
+ game.prop[JADE] = STATE_FOUND;
--game.tally;
rspeak(NECKLACE_FLY);
return GO_CLEAROBJ;
/* Special object-state values - integers > 0 are object-specific */
#define STATE_NOTFOUND -1 // 'Not found" state of treasures */
-#define STATE_GROUND 0 // After discovered, before messed with
+#define STATE_FOUND 0 // After discovered, before messed with
#define STATE_IN_CAVITY 1 // State value common to all gemstones
/* Map a state property value to a negative range, where the object cannot be
if (game.prop[obj] < 0) {
if (game.closed)
continue;
- game.prop[obj] = 0;
+ game.prop[obj] = STATE_FOUND;
if (obj == RUG)
game.prop[RUG] = RUG_DRAGON;
if (obj == CHAIN)
k = 16;
if (game.prop[i] > STATE_NOTFOUND)
score += 2;
- if (game.place[i] == LOC_BUILDING && game.prop[i] == STATE_GROUND)
+ if (game.place[i] == LOC_BUILDING && game.prop[i] == STATE_FOUND)
score += k - 2;
mxscor += k;
}