the-infocom-files / spellbreaker

Spellbreaker
3 stars 2 forks source link

CELL-DOOR-F does not check if the door is already open #17

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK
Dungeon Cell
This is a luxurious cell, obviously for the imprisonment of a highborn or
powerful person. Its rich hangings and heavily ornamented furniture speak of a
prisoner whose comfort is important even during imprisonment. A massive oak
cabinet dominates one wall. The massive cabinet is closed.
The cell door is closed.

>REZROV CELL DOOR
The door bursts outward in an explosion of power! Immediately, you hear the
shouts of guards and the rattle of weapons.

>REZROV CELL DOOR
The door bursts outward in an explosion of power! Immediately, you hear the
shouts of guards and the rattle of weapons.

That's because CELL-DOOR-F doesn't check if the door is already open:

           (<VERB? REZROV>
        <COND (<HELD? ,MAGIC-CUBE>
               <FCLEAR ,CELL-DOOR ,LOCKED>
               <FSET ,CELL-DOOR ,OPENBIT>
               <QUEUE I-PRISON-GUARDS 2>
               <TELL
"The door bursts outward in an explosion of power! Immediately, you hear
the shouts of guards and the rattle of weapons." CR>)
eriktorbjorn commented 4 years ago

Also:

>REZROV DOOR
The door bursts outward in an explosion of power! Immediately, you hear the
shouts of guards and the rattle of weapons.

>OPEN DOOR
The door is locked.
Many nasty guards arrive and immediately (for their own protection, of course)
run you through with their swords.

As you leave, your consciousness is wrenched as though your memories were being
torn apart. You feel that you are being devoured by monsters and pulled
screaming beneath the water simultaneously, again and again. Finally, you
succumb.

   ****  You have died  ****

That's because when it handles the OPEN action, it also doesn't check if the door already is open:

     <COND (<VERB? OPEN>
        <TELL "The door is locked." CR>)