- if ((game.foobar == WORD_EMPTY && id == ACTION_WORD(FEE)) ||
- (game.foobar == ACTION_WORD(FEE) && id == ACTION_WORD(FIE)) ||
- (game.foobar == ACTION_WORD(FIE) && id == ACTION_WORD(FOE)) ||
- (game.foobar == ACTION_WORD(FOE) && id == ACTION_WORD(FOO)) ||
- (game.foobar == ACTION_WORD(FOE) && id == ACTION_WORD(FUM)))
- {
- game.foobar = id;
- if ((id != ACTION_WORD(FOO)) && (id != ACTION_WORD(FUM))) {
- rspeak(OK_MAN);
- return GO_CLEAROBJ;
- }
- game.foobar = WORD_EMPTY;
- if (game.place[EGGS] == objects[EGGS].plac ||
- (TOTING(EGGS) && game.loc == objects[EGGS].plac)) {
- rspeak(NOTHING_HAPPENS);
- return GO_CLEAROBJ;
- } 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] == TROLL_UNPAID)
- game.prop[TROLL] = TROLL_PAIDONCE;
- int k = EGGS_DONE;
- if (HERE(EGGS))
- k = EGGS_VANISHED;
- if (game.loc == objects[EGGS].plac)
- k = EGGS_HERE;
- move(EGGS, objects[EGGS].plac);
- pspeak(EGGS, look, k, true);
- return GO_CLEAROBJ;
- }
- }
- else
- {
- if (game.loc == LOC_GIANTROOM) {
- rspeak(START_OVER);
- } else {
- /* This is new begavior in Open Adventure - sounds better when
- * player isn't in the Giant Room. */
- rspeak(WELL_POINTLESS);
- }
- game.foobar = WORD_EMPTY;
- return GO_CLEAROBJ;
+ int foobar = abs(game.foobar);
+
+ if ((foobar == WORD_EMPTY && id == FEE) ||
+ (foobar == FEE && id == FIE) ||
+ (foobar == FIE && id == FOE) ||
+ (foobar == FOE && id == FOO) ||
+ (foobar == FOE && id == FUM)) {
+ game.foobar = id;
+ if ((id != FOO) && (id != FUM)) {
+ rspeak(OK_MAN);
+ return GO_CLEAROBJ;
+ }
+ game.foobar = WORD_EMPTY;
+ if (game.place[EGGS] == objects[EGGS].plac ||
+ (TOTING(EGGS) && game.loc == objects[EGGS].plac)) {
+ rspeak(NOTHING_HAPPENS);
+ return GO_CLEAROBJ;
+ } else if (id == FUM) {
+ goto fum;
+ } 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] == TROLL_UNPAID)
+ game.prop[TROLL] = TROLL_PAIDONCE;
+ if (HERE(EGGS))
+ pspeak(EGGS, look, true, EGGS_VANISHED);
+ else if (game.loc == objects[EGGS].plac)
+ pspeak(EGGS, look, true, EGGS_HERE);
+ else
+ pspeak(EGGS, look, true, EGGS_DONE);
+ move(EGGS, objects[EGGS].plac);
+
+ return GO_CLEAROBJ;
+ }
+ } else {
+fum:
+ if (game.loc == LOC_GIANTROOM || settings.oldstyle) {
+ rspeak(START_OVER);
+ } else {
+ /* This is new behavior in Open Adventure - sounds better when
+ * player isn't in the Giant Room. */
+ rspeak(NOTHING_HAPPENS);
+ }
+ game.foobar = WORD_EMPTY;
+ return GO_CLEAROBJ;