MikeTaylor / scottkit

Scott Adams adventure toolkit: compile, decompile and play 80s-style adventure games
30 stars 10 forks source link

Terp fails to LOOK after room-swap #42

Open ahope1 opened 3 years ago

ahope1 commented 3 years ago

The compiled version of the following example from the Adventure System manual (page 2-23) works as expected with PerlScott or with ADVENTUR/CMD, but fails when played with the ScottKit interpreter:

start bedroom

occur when flag 1
    clear_flag 1
    swap_room
    goto hintroom
    continue

occur 0%
    look
    pause
    swap_room
    look

room bedroom "bedroom"

room hintroom "*This is the hint room. Hinty hinty."

action sleep:
    set_flag 1
    print "You fall asleep..."
    pause

action score: score
action inventory: inventory
action look: look

verbgroup sleep

After you enter the command sleep, you should be teleported to the "hint room"; the description of the hint room should be displayed on screen briefly; and then you should be teleported back to the bedroom again. But ScottKit fails to display the hint-room description.

ahope1 commented 3 years ago

Here's a screenshot of the compiled code running in ADVENTUR/CMD in a TRS-80 emulator in MAME:

Screenshot 2021-01-15 at 17 13 58
ahope1 commented 2 years ago

See also https://github.com/MikeTaylor/scottkit/issues/3#issuecomment-1052528457