the-infocom-files/hitchhiker

"GET UNDRESSED" can take off the gown, even if you're not Arthur

Opened this issue · 0 comments

The game implements "GET DRESSED" and "GET UNDRESSED", but the latter is buggy:

<ROUTINE V-GET-UNDRESSED ()
	 <COND (<NOT ,PRSO>
		<SETG PRSO ,ROOMS>)>
	 <COND (<PRSO? ,ROOMS>
		<COND (<FSET? ,GOWN ,WORNBIT>
		       <PERFORM ,V?TAKE-OFF ,GOWN>
		       <RTRUE>)
		      (<EQUAL? ,IDENTITY-FLAG ,ARTHUR>
		       <TELL "You're not wearing anything!" CR>)
		      (T
		       <TELL ,ARRESTED CR>)>)
	       (T
		<V-TELL-TIME>)>>

Comparing PRSO to ROOMS is, as far as I understand, a bit of a hack. The command is defined as

<SYNTAX TAKE UNDRES OBJECT (FIND RLANDBIT) = V-GET-UNDRESSED>

It's not really expecting an object, but the parser puts in the ROOMS object if it's left out.

Anyway, the way this is written means that as long as Arthur is wearing the gown, the gown will be removed no matter who you are:

>WHO AM I
You are Ford Prefect.

>INVENTORY
You have:
  a satchel

>EXAMINE GOWN
You can't see any gown here!

>GET UNDRESSED
Okay, you're no longer wearing your gown.

So it needs to check that you really are Arthur before taking off the gown.