the-infocom-files / ballyhoo

Ballyhoo
5 stars 4 forks source link

V-SAVE-SOMETHING doesn't check who you are trying to help #26

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

You can "HELP COMRADE THUMB" at the start of the game, to let him drink from the fountain:

>LOOK
Connection
This area of matted-down crabgrass lies between the vaulted big top entrance to
the north and the enticements of the midway to the east, where a sagging banner
hangs crookedly above a turnstile. There is a drinking fountain near the side
wall of the tent. You can enter the night to the west and south.

The little general gets up on his tiptoes in front of the drinking fountain.

>HELP COMRADE THUMB
Once elevated, Comrade Thumb slurps his fill of water. He then plops down, gives
you a quick salute, and waddles off into the darkness.

However, V-SAVE-SOMETHING doesn't actually check who you are trying to help. Only that Comrade Thumb is there, and he's trying to get a drink:

     <COND (<AND <RUNNING? ,I-BOOST>
             <IN? ,THUMB ,HERE>>
        <PERFORM ,V?RAISE ,THUMB>
        <RTRUE>)

So it will accept a lot of nonsense commands, e.g.:

>HELP THE FUTURE
Once elevated, Comrade Thumb slurps his fill of water. He then plops down, gives
you a quick salute, and waddles off into the darkness.

It should probably check <PRSO? ,THUMB> as well.

eriktorbjorn commented 4 years ago

Actually the code should probably be in THUMB-F, but that kind of refactoring seems a bit out of scope for this project.