the-infocom-files / cutthroats

Cutthroats
3 stars 3 forks source link

Custom message for breaking the lighthouse lock isn't shown #7

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

The lighthouse lock is a pseudo object in WINDING-ROAD-1. The LIGHTHOUSE-LOCK-PSEUDO routine is supposed to handle you trying to break the lock:

           (<VERB? MUNG>
        <TELL 
"You find that the door and lock withstand your attempts." CR>
        <RTRUE>)

But it doesn't work:

>BREAK LOCK WITH AIR TANK
Trying to destroy the lock doesn't work.

This is because PRE-MUNG handles it. There are exceptions:

     <COND (<PRSO? ,NOT-HERE-OBJECT ,ME ,WINNER ,ADVENTURER ,GLOBAL-BANK
               ,MIRROR>
        <RFALSE>)
           (<AND ,PRSI <FSET? ,PRSI ,WEAPONBIT>>
        <RFALSE>)
           (<AND <NOT <FSET? ,PRSO ,VICBIT>>
             <NOT <PRSO? ,SQUID>>>
        <HACK-HACK "Trying to destroy">
        <RTRUE>)>

But there's no exception for PSEUDO-OBJECT, and I don't think you can find any object with WEAPONBIT at this point in the game. (Unless you can somehow try to break it with The Weasel's knife?)

I thought it wasn't feasible to add one, but then I found that the game actually compares PRSO to PSEUDO-OBJECT in a couple of different places. I guess we could add something like:

    (<AND <PRSO? ,PSEUDO-OBJECT>
          <==? ,HERE ,WINDING-ROAD-1>>
     <RTRUE>)
eriktorbjorn commented 4 years ago

Similarly, there's a custom message in LOCKED-DOOR-F that I can't trigger:

           (<VERB? MUNG>
        <TELL "The door and lock withstand your attempts." CR>)
eriktorbjorn commented 4 years ago

There's another one in GLOBAL-ROOM-F:

           (<VERB? MUNG ATTACK>
        <TELL "It's sturdier than you give it credit for." CR>
        <RTRUE>)

The MUNG action never gets here. The ATTACK action does, though:

>DESTROY ROOM WITH TANK
Trying to destroy the room has no effect.

>ATTACK ROOM WITH TANK
It's sturdier than you give it credit for.
eriktorbjorn commented 4 years ago

There is also one in BUNKS-F:

           (<VERB? MUNG>
        <TELL
"Some pieces fall away, but the structure holds together." CR>)>>

Tough in this particular case you can find a way to trigger it because there is a sword further down in the wreck, and that does have WEAPONBIT.

(I just realized that this will also allow you to "DESTROY ROOM WITH SWORD", but it still seems odd that destroying and attacking produce different results when you attack with a non-weapon.)

eriktorbjorn commented 4 years ago

Also one in GLASS-CASE-F:

           (<AND <VERB? MUNG>
             <PRSO? ,GLASS-CASE>>
        <TELL "That wouldn't be too smart." CR>)>>