static int wave(token_t verb, token_t obj)
/* Wave. No effect unless waving rod at fissure or at bird. */
{
- int spk = actions[verb].message;
- if ((!TOTING(obj)) && (obj != ROD || !TOTING(ROD2)))
- spk = ARENT_CARRYING;
+ if ((!TOTING(obj)) && (obj != ROD || !TOTING(ROD2))) {
+ rspeak(ARENT_CARRYING);
+ return GO_CLEAROBJ;
+ }
if (obj != ROD ||
!TOTING(obj) ||
(!HERE(BIRD) && (game.closng || !AT(FISSURE)))) {
- rspeak(spk);
+ rspeak(actions[verb].message);
return GO_CLEAROBJ;
}
- /* 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) {
+ if (game.prop[BIRD] == BIRD_UNCAGED && game.loc == game.place[STEPS] && game.prop[JADE] < 0) {
drop(JADE, game.loc);
game.prop[JADE] = 0;
--game.tally;
- spk = NECKLACE_FLY;
- rspeak(spk);
+ rspeak(NECKLACE_FLY);
return GO_CLEAROBJ;
} else {
if (game.closed) {
- rspeak(spk);
+ rspeak(actions[verb].message);
return GO_DWARFWAKE;
}
if (game.closng || !AT(FISSURE)) {
- rspeak(spk);
+ rspeak(actions[verb].message);
return GO_CLEAROBJ;
}
- if (HERE(BIRD))
- rspeak(spk);
+ if (HERE(BIRD)) {
+ switch (game.prop[BIRD]) {
+ case BIRD_UNCAGED:
+ case BIRD_FOREST_UNCAGED:
+ rspeak(FREE_FLY);
+ break;
+ case BIRD_CAGED:
+ rspeak(CAGE_FLY);
+ break;
+ }
+ }
+ /* FIXME: Arithemetic on property values */
game.prop[FISSURE] = 1 - game.prop[FISSURE];
pspeak(FISSURE, look, 2 - game.prop[FISSURE], true);
return GO_CLEAROBJ;
* unless verb is "say", which snarfs arbitrary second word.
*/
{
- token_t spk = actions[command->verb].message;
-
if (command->part == unknown) {
/* Analyse an object word. See if the thing is here, whether
* we've got a verb yet, and so on. Object must be here
/* FALL THROUGH */;
} else if (command->obj == KNIFE && game.knfloc == game.loc) {
game.knfloc = -1;
- spk = KNIVES_VANISH;
- rspeak(spk);
+ rspeak(KNIVES_VANISH);
return GO_CLEAROBJ;
} else if (command->obj == ROD && HERE(ROD2)) {
command->obj = ROD2;
case TAME:
return GO_UNKNOWN;
case GO: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case ATTACK:
case WAVE:
return wave(command->verb, command->obj);
case TAME: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case GO: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case ATTACK:
case THROW:
return throw (command);
case QUIT: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case FIND:
blast();
return GO_CLEAROBJ;
case SCORE: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case GIANTWORDS: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case BRIEF: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case READ:
case WAKE:
return wake(command->verb, command->obj);
case SAVE: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case RESUME: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case FLY:
return fly(command->verb, command->obj);
case LISTEN: {
- rspeak(spk);
+ rspeak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case PART: