}
state_change(DRAGON, DRAGON_DEAD);
game.prop[RUG] = RUG_FLOOR;
- /* FIXME: Arithmetic on location values */
- int k = (objects[DRAGON].plac + objects[DRAGON].fixd) / 2;
+ /* Hardcoding LOC_SECRET5 as the dragon's death location is ugly.
+ * The way it was computed before was wirse; it depended on the
+ * two dragon locations being LOC_SECRET4 and LOC_SECRET6 and
+ * LOC_SECRET5 being right between them.
+ */
move(DRAGON + NOBJECTS, -1);
move(RUG + NOBJECTS, 0);
- move(DRAGON, k);
- move(RUG, k);
- drop(BLOOD, k);
+ move(DRAGON, LOC_SECRET5);
+ move(RUG, LOC_SECRET5);
+ drop(BLOOD, LOC_SECRET5);
for (obj = 1; obj <= NOBJECTS; obj++) {
if (game.place[obj] == objects[DRAGON].plac ||
game.place[obj] == objects[DRAGON].fixd)
- move(obj, k);
+ move(obj, LOC_SECRET5);
}
- game.loc = k;
+ game.loc = LOC_SECRET5;
return GO_MOVE;
}
rspeak(ROCKY_TROLL);
break;
default:
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
}
return GO_CLEAROBJ;
}
game.fixed[VASE] = IS_FIXED;
return GO_CLEAROBJ;
}
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return (GO_CLEAROBJ);
}
if (TOTING(ROD2) && obj == ROD && !TOTING(ROD))
obj = ROD2;
if (!TOTING(obj)) {
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
if (obj == BIRD && HERE(SNAKE)) {
spk = RUG_SETTLES;
rspeak(spk);
if (spk != RUG_WIGGLES) {
- /* FIXME: Arithmetic on state numbers */
int k = (game.prop[RUG] == RUG_HOVER) ? RUG_FLOOR : RUG_HOVER;
game.prop[RUG] = k;
if (k == RUG_HOVER)
return GO_CLEAROBJ;
}
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
rspeak(LOST_APPETITE);
return GO_CLEAROBJ;
}
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
return GO_CLEAROBJ;
}
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
game.dflag += 2;
rspeak(REALLY_MAD);
} else
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
break;
case BEAR:
if (game.prop[BEAR] == BEAR_DEAD) {
rspeak(NOTHING_EDIBLE);
break;
}
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
break;
case OGRE:
if (HERE(FOOD))
rspeak(OGRE_FULL);
else
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
break;
default:
rspeak(AM_GAME);
return GO_CLEAROBJ;
}
if (obj != NO_OBJECT && obj != BOTTLE) {
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
if (obj == NO_OBJECT && !HERE(BOTTLE))
}
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
}
if (obj != RUG) {
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
if (game.prop[RUG] != RUG_HOVER) {
}
game.oldlc2 = game.oldloc;
game.oldloc = game.loc;
- /* FIXME: Arithmetic on location values */
- game.newloc = game.place[RUG] + game.fixed[RUG] - game.loc;
if (game.prop[SAPPH] == STATE_NOTFOUND) {
+ game.newloc = game.place[SAPPH];
rspeak(RUG_GOES);
} else {
+ game.newloc = LOC_CLIFF;
rspeak(RUG_RETURNS);
}
return GO_TERMINATE;
return GO_CLEAROBJ;
} else {
if (obj != LAMP) {
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
if (game.limit < 0) {
rspeak(CANNOT_UNLOCK);
break;
default:
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
}
return GO_CLEAROBJ;
if (obj == NO_OBJECT)
return GO_UNKNOWN;
if (!TOTING(obj)) {
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
}
game.clshnt = yes(arbitrary_messages[CLUE_QUERY], arbitrary_messages[WAYOUT_CLUE], arbitrary_messages[OK_MAN]);
} else if (objects[command.obj].texts[0] == NULL ||
game.prop[command.obj] < 0) {
- rspeak(actions[command.verb].message);
+ speak(actions[command.verb].message);
} else
pspeak(command.obj, study, game.prop[command.obj], true);
return GO_CLEAROBJ;
static int reservoir(void)
/* Z'ZZZ (word gets recomputed at startup; different each game). */
{
- /* FIXME: Arithmetic on state numbers */
- if (!AT(RESER) && game.loc != game.fixed[RESER] - 1) {
+ if (!AT(RESER) && game.loc != LOC_RESBOTTOM) {
rspeak(NOTHING_HAPPENS);
return GO_CLEAROBJ;
} else {
} else if (obj != LAMP) {
rspeak(PECULIAR_NOTHING);
} else {
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
}
return GO_CLEAROBJ;
}
* troll. Treasures special for troll. */
{
if (!TOTING(command->obj)) {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
if (objects[command->obj].is_treasure && AT(TROLL)) {
{
if (obj != DWARF ||
!game.closed) {
- rspeak(actions[verb].message);
+ speak(actions[verb].message);
return GO_CLEAROBJ;
} else {
rspeak(PROD_DWARF);
(!HERE(BIRD) &&
(game.closng ||
!AT(FISSURE)))) {
- rspeak(((!TOTING(obj)) && (obj != ROD ||
+ speak(((!TOTING(obj)) && (obj != ROD ||
!TOTING(ROD2))) ?
- ARENT_CARRYING :
+ arbitrary_messages[ARENT_CARRYING] :
actions[verb].message);
return GO_CLEAROBJ;
}
case TAME:
return GO_UNKNOWN;
case GO: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case ATTACK:
case WAVE:
return wave(command->verb, command->obj);
case TAME: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case GO: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case ATTACK:
case THROW:
return throw (command);
case QUIT: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case FIND:
blast();
return GO_CLEAROBJ;
case SCORE: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case FEE:
case FOE:
case FOO:
case FUM: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case BRIEF: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case READ:
case WAKE:
return wake(command->verb, command->obj);
case SAVE: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case RESUME: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case FLY:
return fly(command->verb, command->obj);
case LISTEN: {
- rspeak(actions[command->verb].message);
+ speak(actions[command->verb].message);
return GO_CLEAROBJ;
}
case PART: