} else {
/* Bring back troll if we steal the eggs back from him before
* crossing. */
- if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == 0)
- game.prop[TROLL] = 1;
+ if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == TROLL_UNPAID)
+ game.prop[TROLL] = TROLL_PAIDONCE;
k = 2;
if (HERE(EGGS))
k = 1;
spk = CHAIN_UNLOCKED;
if (game.prop[BEAR] == UNTAMED_BEAR)
spk = BEAR_BLOCKS;
- if (game.prop[CHAIN] == 0)
+ if (game.prop[CHAIN] == CHAIN_HEAP)
spk = ALREADY_UNLOCKED;
if (spk != CHAIN_UNLOCKED) {
rspeak(spk);
return GO_CLEAROBJ;
}
- game.prop[CHAIN] = 0;
- game.fixed[CHAIN] = 0;
+ game.prop[CHAIN] = CHAIN_HEAP;
+ game.fixed[CHAIN] = CHAIN_HEAP;
if (game.prop[BEAR] != BEAR_DEAD)
game.prop[BEAR] = CONTENTED_BEAR;
/* FIXME: Arithmetic on state numbers */
game.fixed[BEAR] = 2 - game.prop[BEAR];
} else {
spk = CHAIN_LOCKED;
- if (game.prop[CHAIN] != 0)
+ if (game.prop[CHAIN] != CHAIN_HEAP)
spk = ALREADY_LOCKED;
if (game.loc != objects[CHAIN].plac)
spk = NO_LOCKSITE;
rspeak(spk);
return GO_CLEAROBJ;
}
- game.prop[CHAIN] = 2;
+ game.prop[CHAIN] = CHAIN_FIXED;
if (TOTING(CHAIN))
drop(CHAIN, game.loc);
game.fixed[CHAIN] = -1;
immovable: true
treasure: true
descriptions:
- - 'There is a golden chain lying in a heap on the floor!'
- - 'The bear is locked to the wall with a golden chain!'
- - 'There is a golden chain locked to the wall!'
+ - [CHAIN_HEAP, 'There is a golden chain lying in a heap on the floor!']
+ - [CHAINING_BEAR, 'The bear is locked to the wall with a golden chain!']
+ - [CHAIN_FIXED, 'There is a golden chain locked to the wall!']
- RUBY:
words: ['ruby']
inventory: 'Giant ruby'
juggle(CHASM);
if (game.prop[BEAR] != BEAR_DEAD)
DESTROY(BEAR);
- game.prop[CHAIN] = 0;
- game.fixed[CHAIN] = 0;
+ game.prop[CHAIN] = CHAIN_HEAP;
+ game.fixed[CHAIN] = CHAIN_HEAP;
game.prop[AXE] = 0;
game.fixed[AXE] = 0;
rspeak(CAVE_CLOSING);
/* Print out descriptions of objects at this location. If
* not closing and property value is negative, tally off
* another treasure. Rug is special case; once seen, its
- * game.prop is 1 (dragon on it) till dragon is killed.
- * Similarly for chain; game.prop is initially 1 (locked to
+ * game.prop is RUG_DRAGON (dragon on it) till dragon is killed.
+ * Similarly for chain; game.prop is initially CHAINING_BEAR (locked to
* bear). These hacks are because game.prop=0 is needed to
* get full score. */
{
if (game.closed)
continue;
game.prop[obj] = 0;
- if (obj == RUG || obj == CHAIN)
- game.prop[obj] = 1;
+ if (obj == RUG)
+ game.prop[RUG] = RUG_DRAGON;
+ if (obj == CHAIN)
+ game.prop[CHAIN] = CHAINING_BEAR;
--game.tally;
/* Note: There used to be a test here to see whether the
* player had blown it so badly that he could never ever see