the-infocom-files / zork2

Zork II: The Wizard of Frobozz
8 stars 4 forks source link

The dragon is described as blocking the way to the north, even when he's not #77

Open eriktorbjorn opened 3 years ago

eriktorbjorn commented 3 years ago

If you get the dragon to follow you, and then look, you'll see something like this:

>LOOK
Cool Room
The room is cool and damp. The air is misty. A twisty path from the southeast
splits here toward a wide northerly stone bridge, and a narrow westerly tunnel.
It is from the latter that the mist and chill seem to originate.
A huge red dragon is lying here, blocking the entrance to a tunnel leading
north. Smoke curls from his nostrils and out between his teeth.
The dragon continues to watch you carefully.

>NORTH
Stone Bridge
This is the middle of a ruined but still impressive stone bridge spanning a deep
chasm. Water flows far beneath. A paved path leads north into a large open
space. To the south, the path leads into a misty tunnel.
Your sword is glowing with a faint blue glow.

So obviously, he wasn't blocking the way to the north after all.

The DRAGON object has both an LDESC and an FDESC property:

<OBJECT DRAGON
    (IN DRAGON-ROOM)
    (SYNONYM DRAGON SMAUG WORM)
    (ADJECTIVE RED HUGE)
    (DESC "huge red dragon")
    (LDESC
"A huge red dragon is lying on the rocks here, watching.")
    (FDESC
"A huge red dragon is lying here, blocking the entrance to a tunnel
leading north. Smoke curls from his nostrils and out between his
teeth.")
    (FLAGS ACTORBIT)
    (ACTION DRAGON-FCN)>

So it seems likely that the FDESC should only be shown when the dragon is in his room, and the LDESC should be shown everywhere else.

It may be best to give the dragon a DESCFCN, something like this:

<OBJECT DRAGON
    (IN DRAGON-ROOM)
    (SYNONYM DRAGON SMAUG WORM)
    (ADJECTIVE RED HUGE)
    (DESC "huge red dragon")
    (FLAGS ACTORBIT)
    (ACTION DRAGON-FCN)
    (DESCFCN DRAGON-DESC)>

<ROUTINE DRAGON-DESC ()
    <COND (<IN? ,DRAGON ,DRAGON-ROOM>
           <TELL
"A huge red dragon is lying here, blocking the entrance to a tunnel
leading north. Smoke curls from his nostrils and out between his
teeth.">)
          (T
           <TELL
"A huge red dragon is lying on the rocks, watching.">)>
    <CRLF>>

(At this point in time, there doesn't seem to have been a standard for how to name description routines. Some objects use the action routine and check the input parameter. I think this is clearer, but it's still just an example. I named it based on STONE-DESC in Zork III.)