icculus / mojozork

A simple Z-Machine implementation in a single C file. Now with online multiplayer! :)
https://www.patreon.com/posts/54997062
zlib License
121 stars 10 forks source link

Parser is confused... #10

Closed icculus closed 3 years ago

icculus commented 3 years ago

The parser gets confused in multizork now, even with one player. Example run below.

This works correctly in mojozork.

ZORK I: The Great Underground Empire
Copyright (c) 1981, 1982, 1983 Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Revision 88 / Serial number 840726

West of House
You are standing in an open field west of a white house, with a boarded front door.
There is a small mailbox here.

>w
Forest
This is a forest, with trees in all directions. To the east, there appears to be sunlight.

>e
Forest Path
This is a path winding through a dimly lit forest. The path heads north-south here. One particularly large tree with some low branches stands at the edge of the path.

>w
Forest

>e
Forest Path

>w
Forest

>e
Forest Path

>up
Up a Tree
You are about 10 feet above the ground nestled among some large branches. The nearest branch above you is above your reach.
Beside you on the branch is a small bird's nest.
In the bird's nest is a large egg encrusted with precious jewels, apparently scavenged by a childless songbird. The egg is covered with fine gold inlay, and ornamented in lapis lazuli and mother-of-pearl. Unlike most eggs, this one is hinged and closed with a delicate looking clasp. The egg appears extremely fragile.

>take egg
Taken.

>down
There was no verb in that sentence!
icculus commented 3 years ago

Even simpler:

ZORK I: The Great Underground Empire
Copyright (c) 1981, 1982, 1983 Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Revision 88 / Serial number 840726

West of House
You are standing in an open field west of a white house, with a boarded front door.
There is a small mailbox here.

>down
You can't go that way.

>w
You used the word "w" in a way that I don't understand.