From: let@minnow.cis.ufl.edu (Luis E. Torres)
Newsgroups: rec.arts.int-fiction
Subject: ALAN Standard verbs file
Date: 12 Jan 93 19:15:40 GMT
Organization: Univ. of Florida CIS Dept.

I have written a generic standard definitions file for ALAN. It has been
only lightly tested, but at least provides an initial framework on which
to write adventures. Please send me any bug reports, comments or suggestions.

Luis E. Torres
let@cis.ufl.edu

-------------------------------FILE FOLLOWS--------------------------------

--
--
-- Standard Definitions for ALAN
-- *****************************
--
-- (C) 1992 Luis E. Torres, let@cis.ufl.edu
--
-- This is a more or less "standard" set of verb definitions for the ALAN
-- Adventure Language. Most of them are dummies, and have no function other
-- than to print "You can't do that" (whatever 'that' is), or "Nothing
-- happens." These definitions are not of much use by themselves. There are
-- two ways to use these definitions:
--  
-- 1) You can easily override them in the object definitions, and leave the
-- default definitions as they are. This is good when you have only one or two
-- objects which need the verb. For example,
--
--	OBJECT bread AT bakery
--		DESCRIPTION "There's some bread on the counter."
--		
--		VERB eat DOES ONLY
--			"When you eat the bread, you find something inside.
--			 It's a silver bullet!"
--			LOCATE silver_bullet AT bakery.
--		END VERB.
--	END OBJECT.
--
-- 2) You can enhance the standard definitions by adding attributes to the
-- LOCATION, ACTOR and OBJECT attribute lists. This is useful when you have
-- many objects with a particular characteristic. For example,
--
--	OBJECT ATTRIBUTES 
--		takeable.
--		NOT openable.
--		NOT closable.
--		closed.
--		NOT edible.
--
--		.
--		.
--		.
--
--	VERB eat DOES
--		CHECK obj IN inventory
--			ELSE "You don't have that object."
--		AND obj IS edible
--			ELSE "You can't eat that!"
--		DOES
--			"You eat the $o."
--	END VERB.
--
--		.
--		.
--		.
--
--	OBJECT bread AT bakery
--		DESCRIPTION "There's some bread on the counter."
--		edible.
--	END OBJECT.
--
--
-- All this, of course, depends on how you are writing your adventure.
--
-- I hope this file helps all the people who are interested in ALAN. Please
-- send me your comments and suggestions and errors found to
-- let@cis.ufl.edu. Thanks! 
--
--						Luis E. Torres
--						let@cis.ufl.edu
--
-- ---------------------------------------------------------------------------


--
-- PART 1: OPTIONS
-- ***************

-- We will implement a "brief-like" environment, a-la infocom (that's what
-- the visits 255 is for).

OPTIONS
	visits 255.

-- Some locations can have a locked door leading somewhere. This flag
-- should take care of that (the verbs that use Locked_Door have not been
-- coded, as I probably plan to override the unlock function in the
-- appropiate locations).

LOCATION ATTRIBUTES
	NOT Locked_Door.

-- An object can be takeable, openable (not by default), closable (not by
-- default), and is usually closed. It can also be lockable, edible,
-- drinkable, or switchable (turned on or off).

OBJECT ATTRIBUTES
	takeable.
	NOT openable.
	NOT closable.
	closed.
	NOT lockable.
	locked.
	NOT edible.
	NOT drinkable.
	NOT switchable.
	on.

-- All Actors are assumed to be human (or at least intelligent). Actors are
-- initially defined as male. In case you plan to use pronouns 'he', 
-- 'she' or 'it', this flag would be useful for printing the appropiate
-- pronoun.
-- The ProperName flag should be set if the actor has a proper name (i.e.
-- Bill). This would keep the program from printing "The Bill hears you",
-- instead of "Bill hears you", for example. Again, this has not been coded.

ACTOR ATTRIBUTES
	Male.
	ProperName.
	
-- I have modified the standard inventory header. modify it to suit your taste.

CONTAINER inventory
HEADER "You are carrying a "
ELSE "You are carrying nothing."
END CONTAINER.
	

-----------------------------------
-- PART 2: SYNONYMS
-- ****************


SYNONYMS
--	Synonyms for commands:
-----------------------------
	north = n.
	south = s.
	east  = e.
	west  = w.
	up    = u.
	down  = d.
	northeast = ne.
	southeast = se.
	northwest = nw.
	southwest = sw.
	leave = 'exit'.
	q = 'quit'.
	i = 'inventory'.
	shout, yell = scream.
	l = 'look'.
	h = help.
	get = take.
	shut = close.
	'check', inspect = examine.
	dump, cast = throw.
	kill, fight, hit = attack.
	place = put.
	touch = push.
	fire = shoot.

-- 	Synonyms for objects go here:
------------------------------------


------------------------------------
-- PART 3: SYNTAX.
-- ***************

SYNTAX
	'quit' = 'quit'.

	take_inventory = 'inventory'.

	scream = scream.

	'wait' = 'wait'.

	'look' = 'look'.

	'save' = 'save'.

	'restore' = 'restore'.

	help = help.

	drop = drop (obj) *.

	take = take (obj) *
		WHERE obj ISA OBJECT
			ELSE "You can't take people with you!"

	open = open (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't open people."

	close = close (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't close people."

	examine = examine (obj)
		WHERE obj ISA OBJECT OR ACTOR
			ELSE "You can't examine that."

	read = read (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't read people."

	ask = ask (act)
		WHERE act ISA ACTOR
			ELSE "You know, things don't talk. People do."

	ask_about = ask (act) about (obj)
		WHERE act ISA ACTOR
			ELSE "You know, things don't talk. People do."

	talk = 'talk' 'to' (act)
		WHERE act ISA ACTOR
			ELSE "You know, things don't talk. People do."

	talk_about = 'talk to' (act) about (obj)
		WHERE act ISA ACTOR
			ELSE "You know, things don't talk. People do."

	tell = tell (act)
		WHERE act ISA ACTOR
			ELSE "You know, things don't talk. People do."

	tell_about = tell (act) about (obj)
		WHERE act ISA ACTOR
			ELSE "You know, things don't talk. People do."

      throw = throw (obj) *
		WHERE obj ISA OBJECT
			ELSE "You can't throw people."

      throw_at = throw (obj1) 'at' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't throw people."
		AND obj2 ISA OBJECT OR ACTOR
			ELSE "You can't throw anything at that."

      throw_to = throw (obj1) 'to' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't throw people."
		AND obj2 ISA OBJECT OR ACTOR
			ELSE "You can't throw anything at that."

      throw_in = throw (obj1) 'in' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't throw people."
	        AND obj2 ISA CONTAINER
		      ELSE "You can't throw anything in the $2."

        attack = attack (act)
		WHERE act ISA ACTOR
			ELSE "You should not attack defenseless objects."

        attack_with = attack (act) 'with' (obj)
		WHERE act ISA ACTOR
			ELSE "You should not attack defenseless objects."

        open_with = open (obj1) 'with' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't open that."
		AND obj2 ISA OBJECT
			ELSE "You can't close anything with that."

        close_with = close (obj1) 'with' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't close that."
		AND obj2 ISA OBJECT
			ELSE "You can't close anything with that."

        lock = lock (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't lock that."

        unlock = unlock (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't lock that."

        eat = eat (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't eat that."

        drink = drink (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't drink that."

        put = put (obj) *
		WHERE obj ISA OBJECT
			ELSE "You can't put that anywhere."


        put_in = put (obj1) 'in' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't put that."
                AND obj2 ISA CONTAINER
                      ELSE "You can't put anything in the $2."

        put_with = put (obj1) 'with' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't put that."
                AND obj2 ISA OBJECT
                      ELSE "You can't put anything with the $2."

        put_near = put (obj1) near (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't put that."
                AND obj2 ISA OBJECT
                      ELSE "You can't put anything near the $2."

        put_behind = put (obj1) behind (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't put that."
                AND obj2 ISA OBJECT
                      ELSE "You can't put anything behind the $2."

        put_on = put (obj1) 'on' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't put that."
                AND obj2 ISA OBJECT
                      ELSE "You can't put anything on the $2."

        put_under = put (obj1) under (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't put that."
                AND obj2 ISA OBJECT
                      ELSE "You can't put anything under the $2."

        push = push (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't push that."

        push_with = push (obj1) 'with' (obj2)
		WHERE obj1 ISA OBJECT
			ELSE "You can't push that."
		AND obj2 ISA OBJECT
			ELSE "You cant use a $2 to push anything."

        turn_on = 'turn on' (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't turn that on."

        turn_off = 'turn off' (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't turn that off."

        pull = pull (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't pull that."

        play = play (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't play that."

        play2 = play 'with' (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't play with that."

        light = light (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't light that."

        extinguish = extinguish (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't extinguish that."

        extinguish2 = put out (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't put that out."

        shoot = shoot (obj)
		WHERE obj ISA OBJECT OR ACTOR
			ELSE "You can't turn that off."

        shoot_at = shoot (obj) 'at' (act)
		WHERE obj ISA OBJECT
			ELSE "You can't turn that off."
		AND act ISA OBJECT OR ACTOR
			ELSE "You can't shoot that."

        shoot_with = shoot (act) 'with' (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't turn that off."
		AND  act ISA OBJECT OR ACTOR
			ELSE "You can't shoot that."

        wear = wear (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't wear that."

        put_on2 = 'put' 'on' (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't put that on."

        'remove' = 'remove' (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't remove that."

        take_off = 'take' 'off' (obj)
		WHERE obj ISA OBJECT
			ELSE "You can't take that off."

------------------------------------------------

-- PART 4: VERBS.
-- **************

-- One word verbs.
--


VERB 'quit' DOES
	QUIT.
END VERB.

--

VERB take_inventory DOES
	LIST inventory.
END VERB.

--

VERB scream DOES
	"There's no point in screaming."
END VERB.

--

VERB 'wait' DOES
	"Time passes..."
END VERB.

--

VERB 'look' DOES
	LOOK.
END VERB.

--

VERB 'save' DOES
	"Saving..."
	SAVE.
	"Done."
END VERB.

--

VERB 'restore' DOES
	"Restoring..."
	RESTORE.
	"Done.$n"
	LOOK.
END VERB.

--

VERB help DOES
	"Sorry, but you're on your own."
END VERB.


--
-- Two or more word verbs.
--

-- 'throw' and 'put' equal 'drop' as a default.
VERB drop, throw, put
	CHECK obj IN inventory
		ELSE "You haven't got that."
	DOES
		LOCATE obj HERE.
		"Dropped."
END VERB.

--

VERB take
	CHECK obj IS takeable
		ELSE "You can't take that!"
	AND obj NOT IN inventory
		ELSE "You've already got that." 
	DOES
		LOCATE obj IN inventory.
		"Taken."
END VERB.

--

VERB open
	CHECK obj IS openable
		ELSE "You can't open that!"
	AND obj IS closed
		ELSE "It's already open."
	DOES
		MAKE obj NOT closed.
		"The $o is now open."
END VERB.

--

VERB close
	CHECK obj IS closable
		ELSE "You can't close that."
	AND obj IS NOT closed
		ELSE "It is not open."
	DOES
		MAKE obj closed.
		"The $o is now closed."
END VERB.

--

VERB examine DOES
	"There's nothing special about the $o."
END VERB.

--

VERB read DOES
	"There's nothing to read here."
END VERB.

--

VERB ask DOES
	IF act IS NOT ProperName THEN
		"The $o ignores your question."
	ELSE
		"$o ignores your question."
	END IF.
END VERB.

--

VERB ask_about DOES
	IF act IS NOT ProperName THEN
		"The $1 ignores your question."
	ELSE
		"$1 ignores your question."
	END IF.
END VERB.

--

VERB tell DOES
	IF act IS NOT ProperName THEN
		"The $o is not impressed."
	ELSE
		"$o is not impressed."
	END IF.
END VERB.

--

VERB tell_about DOES
	IF act IS NOT ProperName THEN
		"The $1 is not impressed."
	ELSE
		"$1 is not impressed."
	END IF.
END VERB. 

--

VERB talk DOES
	IF act IS NOT ProperName THEN
		"The $o does not seem to want to talk."
	ELSE
		"$o does not seem to want to talk."
	END IF.
END VERB.

--

VERB talk_about DOES
	IF act IS NOT ProperName THEN
		"The $1 does not seem to want to talk."
	ELSE
		"$1 does not seem to want to talk."
	END IF.
END VERB.

--

VERB throw_at, throw_to 
      CHECK obj1 IN inventory
	      ELSE "You haven't got that!"
      AND obj2 HERE AND obj2 NOT IN inventory
	      ELSE "I don't see any $2 here."
      DOES
	      "The $1 bounces harmlessly off the $2.$n"
	      LOCATE obj1 HERE.
	      "Dropped."
END VERB.

--

VERB throw_in, put_in
      CHECK obj1 IN inventory
	      ELSE "You haven't got that!"
      AND obj2 HERE AND obj2 NOT IN inventory
	      ELSE "I don't see any $2 here."
      AND obj1 <> obj2
	      ELSE "Now, that would be a good trick!"
      DOES
	      LOCATE obj1 IN obj2.
	      "Done."
END VERB.

--

VERB attack
	CHECK act HERE
		ELSE "I don't see that person here."
	DOES
		"No unwarranted violence, please. Remember Welch Creek."
END VERB.

--

VERB attack_with
	CHECK act HERE
		ELSE "I don't see that person here."
	AND obj IN inventory
		ELSE "You don't have that object to attack with."
	DOES
		"No unwarranted violence, please. Remember Welch Creek."
END VERB.

--

VERB open_with
	CHECK obj1 HERE
		ELSE "I don't see any $1 to open."
	AND obj2 IN inventory
		ELSE "You don't have the $2."
	DOES
		"You can't open the $1 with the $2."
END VERB.

--

VERB close_with
	CHECK obj1 HERE
		ELSE "I don't see any $1 to close."
	AND obj2 IN inventory
		ELSE "You don't have the $2."
	DOES
		"You can't close the $1 with the $2."
END VERB.

--

VERB lock
	CHECK obj IS lockable
		ELSE "You can't lock that!"
	AND obj HERE
		ELSE "I don't see what you want me to lock."
	AND obj IS NOT locked
		ELSE "It's already locked."
	DOES
		MAKE obj locked.
		"The $o is now locked."
END VERB.

--

VERB unlock
	CHECK obj IS lockable
		ELSE "You can't unlock that!"
	AND obj HERE
		ELSE "I don't see what you want me to unlock."
	AND obj IS locked
		ELSE "It's already unlocked."
	DOES
		MAKE obj NOT locked.
		"The $o is now unlocked."
END VERB.

--
-- Right now the player can eat or drink objects defined with the edible
-- and drinkable flags; however, there is still not much point in that, as
-- eating or drinking an object just makes it disappear from the inventory.
-- More code is required to make these actions meaningful.

VERB eat
	CHECK obj IS edible
		ELSE "That is not eatable."
	AND obj HERE
		ELSE "I don't see what you want me to eat."
	DOES
		LOCATE obj IN Limbo.
		"You eat the $o. Yum, you needed that!"
END VERB.

--

VERB drink
	CHECK obj IS drinkable
		ELSE "That is not drinkable."
	AND obj HERE
		ELSE "I don't see what you want me to drink."
	DOES
		LOCATE obj IN Limbo.
		"You drink the $o. Yum, you needed that!"
END VERB.

--

VERB put_with, put_near, put_behind, put_on, put_under 
      CHECK obj1 IN inventory
	      ELSE "You haven't got that!"
      AND obj2 HERE AND obj2 NOT IN inventory
	      ELSE "I don't see any $2 here."
      DOES
	      "Naaah. I'd rather put it on the floor.$n"
	      LOCATE obj1 HERE.
	      "Dropped."
END VERB.

--

VERB push
	CHECK obj HERE
		ELSE "I don't see what you want me to push."
	DOES
		"You can't push it."
END VERB.

--

VERB push_with
	CHECK obj1 HERE
		ELSE "I don't see what you want me to push."
	AND obj2 HERE
		ELSE "You don't have any $2."
	DOES
		"Your action has no noticeable effect."
END VERB.

--

VERB turn_on
	CHECK obj IS switchable
		ELSE "You can't turn that on."
	AND obj HERE
		ELSE "I don't see what you want me to turn on."
	AND obj IS NOT on
		ELSE "It's already on."
	DOES
		MAKE obj on.
		"Ok, the $o is now on."
END VERB.

--

VERB turn_off
	CHECK obj IS switchable
		ELSE "You can't turn that off."
	AND obj IS on
		ELSE "It's already off."
	AND obj HERE
		ELSE "I don't see what you want me to turn off."
	DOES
		MAKE obj NOT on.
		"Ok, the $o is now off."
END VERB.

--

VERB pull
	CHECK obj HERE
		ELSE "I don't see what you want me to pull here."
	DOES
		"You can't pull that."
END VERB.

--

VERB play, play2
	CHECK obj HERE
		ELSE "I don't see what you want me to play here."
	DOES
		"You can't play that."
END VERB.

--

VERB light
	CHECK obj HERE
		ELSE "I don't see the object you want me to light."
	DOES
		"You can't light that object."
END VERB.

--

VERB extinguish, extinguish2
	CHECK obj HERE
		ELSE "I don't see the object you want me to extinguish."
	DOES
		"You can't extinguish that object."
END VERB.

--

VERB shoot
	CHECK obj HERE
		ELSE "I don't see what you want me to shoot."
	DOES
		"'Violence is the last refuge of the incompetent' (TM)."
END VERB.

--

VERB shoot_at
	CHECK obj IN inventory
		ELSE "you don't have that object."
	AND act HERE
		ELSE "I don't see what you want me to shoot."
	DOES
		"More violence?! Don't you remember Welch Creek?!"
END VERB.

--

VERB shoot_with
	CHECK obj IN inventory
		ELSE "you don't have that object."
	AND act HERE
		ELSE "I don't see what you want me to shoot."
	DOES
		"More violence?! Don't you remember Welch Creek?!"
END VERB.

--

VERB wear, put_on2
	CHECK obj IN inventory
		ELSE "You don't have that object."
	DOES
		"You can't put that on."
END VERB.

--

VERB remove, take_off
	CHECK obj IN inventory
		ELSE "You don't have that object."
	DOES
		"You can't remove that."
END VERB.

-----------------------------------------------
-- End of File.
---------------