Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V-OVERBOARD oddities #50

Open
eriktorbjorn opened this issue Aug 19, 2019 · 0 comments
Open

V-OVERBOARD oddities #50

eriktorbjorn opened this issue Aug 19, 2019 · 0 comments

Comments

@eriktorbjorn
Copy link

eriktorbjorn commented Aug 19, 2019

This is in zork-substrate, but it's a Zork I-specific part of it.

The V-OVERBOARD routine deals with throwing objects overboard:

<ROUTINE V-OVERBOARD ("AUX" LOCN)
	 <COND %<COND (<==? ,ZORK-NUMBER 1>
		       '(<EQUAL? ,PRSI ,TEETH>
			 <COND (<FSET? <SET LOCN <LOC ,WINNER>> ,VEHBIT>
				<MOVE ,PRSO <LOC .LOCN>>
				<TELL "Ahoy -- " D ,PRSO " overboard!" CR>)
			       (T
				<TELL "You're not in anything!" CR>)>))
		      (T '(<NULL-F> T))>
	       (<FSET? <LOC ,WINNER> ,VEHBIT>
		<PERFORM ,V?THROW ,PRSO>
		<RTRUE>)
	       (T
		<TELL "Huh?" CR>)>>

Leaving aside the unusual implementation - the TEETH object has the synonym "OVERBOARD" - it allows you to throw just about anything overboard, e.g. your hands. It should probably call IDROP (see for instance V-THROW) to ensure that the object can be let go of.

Another odd thing is that objects thrown overboard don't sink. For reference, see RIVER-FUNCTION for an example of where objects do sink in water. (Though I haven't tested that routine yet.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant