X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=actions.c;h=658d95d1789fe6df51ab990128d0cf807d790c63;hb=fe378b9e136bfe93b5166ef36f03cad976d643b2;hp=936e4d80978d9aeebfc135a6576e2be9c109d7f2;hpb=0a1f5dbb43aacb696f9219a03b96376c06f7122e;p=open-adventure.git diff --git a/actions.c b/actions.c index 936e4d8..658d95d 100644 --- a/actions.c +++ b/actions.c @@ -1,9 +1,9 @@ /* * Actions for the dungeon-running code. * - * Copyright (c) 1977, 2005 by Will Crowther and Don Woods - * Copyright (c) 2017 by Eric S. Raymond - * SPDX-License-Identifier: BSD-2-clause + * SPDX-FileCopyrightText: 1977, 2005 by Will Crowther and Don Woods + * SPDX-FileCopyrightText 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-Clause */ #include @@ -194,6 +194,7 @@ static phase_codes_t bigwords(vocab_t id) { int foobar = abs(game.foobar); + /* Only FEE can start a magic-word sequence. */ if ((foobar == WORD_EMPTY) && (id == FIE || id == FOE || id == FOO || id == FUM)) { rspeak(NOTHING_HAPPENS); return GO_CLEAROBJ; @@ -202,10 +203,9 @@ static phase_codes_t bigwords(vocab_t id) if ((foobar == WORD_EMPTY && id == FEE) || (foobar == FEE && id == FIE) || (foobar == FIE && id == FOE) || - (foobar == FOE && id == FOO) || - (foobar == FOE && id == FUM)) { + (foobar == FOE && id == FOO)) { game.foobar = id; - if ((id != FOO) && (id != FUM)) { + if (id != FOO) { rspeak(OK_MAN); return GO_CLEAROBJ; } @@ -214,8 +214,6 @@ static phase_codes_t bigwords(vocab_t id) (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. */ @@ -232,8 +230,11 @@ static phase_codes_t bigwords(vocab_t id) return GO_CLEAROBJ; } } else { -fum: - rspeak(START_OVER); + /* Magic-word sequebce was started but is incorrect */ + if (settings.oldstyle || game.seenbigwords) + rspeak(START_OVER); + else + rspeak(WELL_POINTLESS); game.foobar = WORD_EMPTY; return GO_CLEAROBJ; }