summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3971a61)
C patch by Torbjörn Andersson.
= Open Adventure project news =
= Open Adventure project news =
+Repository head::
+ Commands in magic-word sequence now interrupt it, as in original.
+
1.14: 2023-03-09::
Added -a option for BBS door systems.
-o reverts to the old message on some failed magic words.
1.14: 2023-03-09::
Added -a option for BBS door systems.
-o reverts to the old message on some failed magic words.
* word we've got. Last word zips the eggs back to the giant room (unless
* already there). */
{
* word we've got. Last word zips the eggs back to the giant room (unless
* already there). */
{
- if ((game.foobar == WORD_EMPTY && id == FEE) ||
- (game.foobar == FEE && id == FIE) ||
- (game.foobar == FIE && id == FOE) ||
- (game.foobar == FOE && id == FOO) ||
- (game.foobar == FOE && id == FUM)) {
+ 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);
game.foobar = id;
if ((id != FOO) && (id != FUM)) {
rspeak(OK_MAN);
if (!get_command_input(&command))
return false;
if (!get_command_input(&command))
return false;
+ /* Every input, check "foobar" flag. If zero, nothing's going
+ * on. If pos, make neg. If neg, he skipped a word, so make it
+ * zero.
+ */
+ game.foobar = (game.foobar > WORD_EMPTY) ? -game.foobar : WORD_EMPTY;
+
++game.turns;
preprocess_command(&command);
}
++game.turns;
preprocess_command(&command);
}
You scored 311 out of a possible 430, using 291 turns.
You scored 311 out of a possible 430, using 291 turns.
## Test interpersing commands amidst magic words
## Test interpersing commands amidst magic words
-# Check for "Done" or "Nothing happens." in game output.
+# Check for "Nothing happens." in game output indicatung sequence interrupt.