}
state_change(DRAGON, DRAGON_DEAD);
game.prop[RUG] = RUG_FLOOR;
- /* FIXME: Arithmentic on location values */
+ /* FIXME: Arithmetic on location values */
int k = (objects[DRAGON].plac + objects[DRAGON].fixd) / 2;
move(DRAGON + NOBJECTS, -1);
move(RUG + NOBJECTS, 0);
* crossing. */
if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == TROLL_UNPAID)
game.prop[TROLL] = TROLL_PAIDONCE;
- k = 2;
+ k = EGGS_DONE;
if (HERE(EGGS))
- k = 1;
+ k = EGGS_VANISHED;
if (game.loc == objects[EGGS].plac)
- k = 0;
+ k = EGGS_HERE;
move(EGGS, objects[EGGS].plac);
pspeak(EGGS, look, k);
return GO_CLEAROBJ;
static int vbreak(token_t verb, token_t obj)
/* Break. Only works for mirror in repository and, of course, the vase. */
{
- int spk = actions[verb].message;
- if (obj == MIRROR)
- spk = TOO_FAR;
- if (obj == VASE && game.prop[VASE] == 0) {
- if (TOTING(VASE))
- drop(VASE, game.loc);
- game.prop[VASE] = 2;
- game.fixed[VASE] = -1;
- spk = BREAK_VASE;
- } else {
- if (obj == MIRROR && game.closed) {
+ if (obj == MIRROR) {
+ if (game.closed) {
rspeak(BREAK_MIRROR);
return GO_DWARFWAKE;
+ } else {
+ rspeak(TOO_FAR);
+ return GO_CLEAROBJ;
}
}
- rspeak(spk);
- return GO_CLEAROBJ;
+ if (obj == VASE && game.prop[VASE] == VASE_WHOLE) {
+ if (TOTING(VASE))
+ drop(VASE, game.loc);
+ state_change(VASE, VASE_BROKEN);
+ game.fixed[VASE] = -1;
+ return GO_CLEAROBJ;
+ }
+ rspeak(actions[verb].message);
+ return (GO_CLEAROBJ);
}
static int brief(void)
move(TROLL2, objects[TROLL].plac);
move(TROLL2 + NOBJECTS, objects[TROLL].fixd);
juggle(CHASM);
- game.prop[TROLL] = 2;
+ game.prop[TROLL] = TROLL_GONE;
} else if (obj != VASE || game.loc == objects[PILLOW].plac) {
rspeak(OK_MAN);
} else {
- game.prop[VASE] = 2;
+ game.prop[VASE] = VASE_BROKEN;
if (AT(PILLOW))
- game.prop[VASE] = 0;
+ game.prop[VASE] = VASE_WHOLE;
pspeak(VASE, look, game.prop[VASE] + 1);
- if (game.prop[VASE] != 0)
+ if (game.prop[VASE] != VASE_WHOLE)
game.fixed[VASE] = -1;
}
}
return GO_CLEAROBJ;
}
rspeak(SHATTER_VASE);
- game.prop[VASE] = 2;
+ game.prop[VASE] = VASE_BROKEN;
game.fixed[VASE] = -1;
return (discard(verb, obj, true));
} else if (obj == URN) {
game.prop[PLANT2] = game.prop[PLANT];
return GO_MOVE;
} else {
- game.prop[DOOR] = 0;
- if (obj == OIL)
- game.prop[DOOR] = 1;
- spk = RUSTED_HINGES + game.prop[DOOR];
- rspeak(spk);
+ state_change(DOOR, (obj == OIL) ? DOOR_UNRUSTED: DOOR_RUSTED);
return GO_CLEAROBJ;
}
}
rspeak(spk);
return GO_CLEAROBJ;
}
- /* FIXME: Arithemetic on proprty values */
+ /* FIXME: Arithemetic on property values */
if (HERE(BIRD))
spk = FREE_FLY + MOD(game.prop[BIRD], 2);
if (spk == FREE_FLY && game.loc == game.place[STEPS] && game.prop[JADE] < 0) {