Open eriktorbjorn opened 4 years ago
The same bug appears in WATERFALL-F
:
(<VERB? WALK-AROUND>
<COND (<T? .IN>
<DO-WALK ,P?EAST>
<RTRUE>)
(<IS? ,CAVE-HOLE ,SEEN>
<DO-WALK ,P?WEST>
<RTRUE>)>
<TELL "There's no obvious way around the "
D ,PRSO ,PERIOD>
<RTRUE>)
If the world is flipped, "WALK AROUND WATERFALL" takes you in the wrong direction.
CAVE-HOLE-F
:
(<OR <ENTERING?>
<VERB? WALK-AROUND CROSS>>
<DO-WALK <COND (<ZERO? .IN> ,P?WEST) (T ,P?EAST)>>
<RTRUE>)
"ENTER HOLE" takes you in the wrong direction when the world is flipped.
Same thing with STREAM-F
:
(<VERB? FOLLOW CLIMB-DOWN>
<DO-WALK <COND (<HERE? SBOG> ,P?SE)
(<HERE? AT-TRELS> ,P?NE)
(T ,P?EAST)>>
<RTRUE>)
(<VERB? CLIMB-UP CLIMB-ON>
<DO-WALK <COND (<HERE? AT-BEND> ,P?SW)
(<HERE? AT-TRELS> ,P?NW)
(T ,P?WEST)>>
<RTRUE>)
CAVE-F
looks like it should have the same bug, but apparently it's not actually used?
<COND (<ZERO? .IN>
<DO-WALK ,P?WEST>
<RTRUE>)>
<ALREADY-IN>
<RTRUE>)
(<EXITING?>
<COND (<ZERO? .IN>
<NOT-IN>
<RTRUE>)>
<DO-WALK ,P?EAST>
<RTRUE>)
I would have expected CAVE
to be local global to ICE-CAVE
and AT-FALLS
, but it's not. So... yay?
COTTAGE-F
has the same bug, so "ENTER COTTAGE" fails from either direction when the world is flipped:
(<ENTERING?>
<COND (<HERE? IN-GARDEN>
<DO-WALK ,P?WEST>
<RTRUE>)
(<HERE? ON-BLUFF>
<DO-WALK ,P?EAST>
<RTRUE>)>
<ALREADY-IN>
<RTRUE>)
HEDGE-F
:
(<VERB? FOLLOW>
<COND (<HERE? DOCKSIDE>
<DO-WALK ,P?WEST>
<RTRUE>)
(<HERE? FCLEARING>
<DO-WALK ,P?EAST>
<RTRUE>)>
<V-WALK-AROUND>
<RTRUE>)
So "FOLLOW HEDGE" fails from either endpoint when the world is flipped.
Same thing with SUMMIT-F
:
(<OR <ENTERING?>
<VERB? CLIMB-ON CLIMB-UP CLIMB-OVER CROSS STAND-ON>>
<COND (<ZERO? .ON>
<DO-WALK <COND (<HERE? IN-MEADOW>
,P?NORTH)
(<HERE? FCLEARING>
,P?WEST)
(T
,P?SW)>>
<RTRUE>)>
<ALREADY-IN ,PRSO T>
<RTRUE>)
Note that there is at least one place where DO-WALK
works as intended, even when the world is flipped. See https://github.com/the-infocom-files/trinity/issues/96 which, while it does describe a bug, is not caused by the above problem at all.
The way flipping is handled, all map connections remain the same but
V-WALK
causes you to walk in the other direction:The problem is when you force the player to walk in a certain direction by calling
DO-WALK
. It's implemented in terms of<PERFORM ,V?WALK ...>
, so the direction ends up being flipped. It's a bit confusing, so consider the example below:Let's say you're standing inside the cottage. The garden is to the east on the unflipped map, and to the west on the flipped map. When you type "WEST",
V-WALK
flips it so that you are actually walking east into the garden. But if you type "ENTER GARDEN", theCOTTAGE-F
routine will call<DO-WALK ,P?EAST>
. This gets flipped to west, so you walk in the opposite direction compared to what you intended to:I'm going to list all the cases I can find where this causes problems here, unless they warrant separate bug reports.