the-infocom-files / starcross

Starcross
5 stars 3 forks source link

"GO <object>" can cause a Frotz warning (because it doesn't set PRSO?) #60

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago

This one is a bit strange. V-WALK has a special case for when P-WALK-DIR was not set:

<ROUTINE V-WALK ("AUX" PT PTS STR OBJ RM)
     <COND (<NOT ,P-WALK-DIR>
        <PERFORM ,V?WALK-TO ,PRSO>
        <RTRUE>)

Which I take to mean that "GO object" will be turned into "GO TO object" if object is not a direction.

But from what I can tell, PRSO isn't set by "GO object" so it re-uses the previous value. Which means that if the previous command was one that sets PRSO to 0, it will cause an trigger an error when V-WALK-TO checks if PRSO is present.

The quickest way I've found to trigger this from the start of the game is:

>STAND
You are on your own feet again.
The alarm bell on the mass detector is ringing stridently.

>INVENTORY
You are empty handed.
The alarm bell on the mass detector is ringing stridently.

>GO BUNK
Warning: @jin called with object 0 (PC = 7b78) (will ignore further occurrences)
You should supply a direction!
The alarm bell on the mass detector is ringing stridently.

The "INVENTORY" command is what sets PRSO to 0.

This bug almost certainly affects other games as well. I think I was able to trigger it in Infidel, at the very least.

eriktorbjorn commented 5 years ago

Another example of PRSO not being updated:

>EXAMINE ARTIFACT
What artifact?

>GO ME
What artifact?