-- everything is a location, an object or a timer --
This document describes the verbs that come with the XVAN Library.
Verbs can be seen as actions that are initiated by the person playing the story. Examples are: take, drop, go, examine, … Actions can be made more specific by adding nouns, adjectives, prepositions, etc:
> put the garlic into the bag
In XVAN, actions are defined as verbs.
XVAN has no verbs hard coded in the interpreter because it wants to
offer story authors the flexibility to define their own versions of
verbs.
In order to get a head start, there is the XVAN Library. The Library has
– among other things – a set of verbs that are used in most Interactive
Fiction works. The verbs are available as ‘normal’ XVAN code, so they
can easily be changed or removed and redefined when necessary. By
$inserting the library in the story file, the predefined verbs will be
available in the story.
Verbs may also have logic built in. E.g. the verb might check if an item to be dropped is actually held by the player and if not print a message that the item cannot be dropped because it is not held by the player.
The logic that is built into the verbs is intended to serve as sort of a default message to be executed when no code for the specific action is defined with the objects and locations. E.g. “turn book” will print something like “There’s no use in turning the book”. If “turn book” should trigger a chain of events specific for the story, than it should be coded with the book object.
In this way, the verbs from the Library
can be used in pretty much any story.
Verbs like “open”, “close”, “lock” and “unlock” are worked out quite
extensively because these actions are likely to be the same in most
stories.
Some of the verbs use XVAN artifacts like flags, attributes or triggers.
E.g. “take” uses flag f_takeable to determine whether an item can be
picked up.
Finally, verbs may contain instructions for the interpreter to solve
ambiguity issues when it maps user input to object.
E.g. when the command is “drop cube” and the player is carrying a red
cube and there’s a green cube on the floor, it is very likely that the
red cube is meant. The verb’s ambiguity code will tell the interpreter
to map the command to the red cube and not ask which cube is meant.
The verbs in the Library are described in terms of
syntax, pre and post checks (prologue and epilogue), flags, attributes,
triggers and ambiguity priorities.
At the end of the document, in the annex, a template for defining your own verbs is listed.
To quickly jump to a verb, you may use use the hyperlinks below.
Ask someone about something.
Syntax |
Normal behavior |
“ask<subject1>about <subject2>” |
Will print a message that subject2 is just an ordinary subject
2. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_alive |
Determine whether subject1 is something that is alive. |
Priority |
Conditions |
1 (subject1) |
Subjects that are alive. |
2 (subject1) |
All other subjects. |
Break a subject.
Syntax |
Normal behavior |
“break” |
Will prompt what must be broken. |
“break <subject1>” “break <subject1> with<subject2>” |
Will print a message that breaking subject1 isn’t particularly
helpful. |
Check |
Action |
Is actor alive? |
If not, abort. |
Does actor hold subject2? |
If not, try to take subject2 and continue if succeeds. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_takeable |
Determine whether subject1 can be taken if it is not held by the
actor. |
Priority |
Conditions |
1 (subject2) |
Subjects that are held by the actor. |
2 (subject2) |
All other subjects. |
Close an item.
Syntax |
Normal behavior |
“close” |
Will prompt what must be closed. |
“close subject” |
Will close the subject. |
Check |
Action |
Is actor alive? |
If not, abort. |
Is subject openable? |
If not, abort. |
Is subject closed? |
If yes, abort. |
Check |
Action |
Is it dark ? |
If yes, print message about darkness. |
Artifact |
Purpose |
f_openable |
Determine whether the subject can be opened and closed. |
f_open |
Determine whether the subject is already closed. |
f_opaque |
After closing, the subject is set to opaque. |
f_lit |
Check if the surroundings are still lit after closing the
subject. |
Priority |
Conditions |
1 |
Subjects that are open. |
2 |
All other subjects in scope. |
Crying.
Syntax |
Normal behavior |
Everything, only has a default |
Prints a message that the actor is not a crybaby. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Drop an item.
Syntax |
Normal behavior |
b |
Will prompt what must be dropped. |
“drop <subject1>” |
Will drop subject1. |
“drop <subject1><in><subject2> |
Will print default message that subject1 cannot be dropped in
subject2.
Note: <in> may be any preposition. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
Is it dark ? |
If yes, print message about darkness. |
Artifact |
Purpose |
f_bypass |
Is cleared after dropping, so the dropped subject will not be
exempt from visibility checks any longer. |
r_is |
Attribute that holds the correct conjugation of to be for the
current actor. |
f_container |
To determine if <subject2> is a container |
Priority |
Conditions |
1 (subject1) |
Subjects that are held by the actor. |
2 (subject1) |
All other subjects in scope. |
1 (subject 2) |
Subjects that are a container. |
Examine an item.
Syntax |
Normal behavior |
“examine” |
Will prompt what must be examined. |
“examine <subject>” |
Will examine the subject. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
d_exa |
Description that holds the description for examining the subject |
Priority |
Conditions |
-- |
|
Pick up an item.
Syntax |
Normal behavior |
“get” |
Will prompt what must be taken. |
“get <subject1>” |
Will dropsubject1. |
“get<subject1><from><subject2> |
Will print default message that subject1 cannot be taken from
subject2.
Note: <from> may be any preposition. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_bypass |
Is set after taking, so the dropped subject will be exempt from
visibility checks from now on. |
f_takeable |
Determine whether the subject can be taken. |
r_is |
Attribute that holds the correct conjugation of to be for the
current actor. |
Priority |
Conditions |
1 (subject1) |
Subjects that can be picked up and are not held by the actor. |
1 (subject1) |
Subjects that can be picked up and are held by subject2 |
2 (subject1) |
Subjects that can be picked up. |
3 (subject1) |
All other subjects. |
1 (subject2) |
Subjects that own subject1. |
Give a subject to another subject.
Syntax |
Normal behavior |
“give <subject1> to <subject2>” |
Will print a message that the gift is refused (for living
subject2) or that there’s no use giving subject1 to subject2. |
Check |
Action |
Is actor alive? |
If not, abort. |
Does actor have subject? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_alive |
Determine whether subject1 is alive. |
Priority |
Conditions |
1 (subject2) |
Subjects that are alive. |
2 (subject2) |
All other subjects. |
Move through the game world.
Syntax |
Normal behavior |
"<direction>" |
Move the player object from the current location to the location
that is to the direction. |
“go <direction>” |
Move the player object from the current location to the location
that is to the direction. |
"go to <direction> |
Move the player object from the current location to the location
that is to the direction. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Hang a subject on/in/behind another subject.
Syntax |
Normal behavior |
“hang <subject1><on><subject2>” |
Will print a message subject1 cannot be hung on subject2.
Note: <on> may be any preposition. |
Check |
Action |
Is actor alive? |
If not, abort. |
Does actor hold subject2? |
If not, try to take subject2 and continue if succeeds. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Switch between displaying verb syntax suggestions. Suggestions are
displayed when the player enters a sentence the interpreter does not
understand.
Syntax |
Normal behavior |
“help” |
If verb help is on, turn it off. If verb help is off, turn it
on. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
o_player.f_verb_help |
Determine whether verb help is on. |
Priority |
Conditions |
-- |
|
List the player’s possessions.
Syntax |
Normal behavior |
“inventory” |
List the player’s possessions. |
Check |
Action |
Is the actor the player? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
r_preposition |
Attribute that holds an item’s preposition in case the item is
contained in another object that the player holds. |
Priority |
Conditions |
-- |
|
Kill a subject.
Syntax |
Normal behavior |
“kill” |
Will prompt what must be killed. |
“kill <subject1> with <subject2>” |
Will print a message that killing is not the answer. In case the
actor is subject1, it will say that’s it won’t commit suicide. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_alive |
Determine whether subject1 is alive. |
Priority |
Conditions |
1 (subject1) |
Subjects that are alive. |
2 (subject1) |
All other subjects. |
Knock on an item.
Syntax |
Normal behavior |
“knock” |
Will prompt what must be knocked on. |
“knock <subject>” “knock on <subject> |
Will print a message that there is no answer. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Jumping or moving.
Syntax |
Normal behavior |
“jump” |
Prints “Wheee”. |
”jump
<direction>” |
Same as “go <direction>. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Listening.
Syntax |
Normal behavior |
“listen” |
Will print a message that there's only environment sounds. |
“listen to <subject>”
|
Will print a message that there is no sound from the subject. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Lock an item.
Syntax |
Normal behavior |
“lock” |
Will prompt what must be locked. |
“lock <subject1>” |
Will lock the subject provided the actor has the correct key. |
“lock <subject1> with <subject2> |
Will lock subject1 using subject2 as the key. |
Check |
Action |
Is actor alive? |
If not, abort. |
Is subject1 lockable? |
If not, abort. |
Is subject1 locked? |
If yes, abort? |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_lockable |
Determine whether subject1 is something that can be locked |
f_locked |
Determine whether subject1 is already locked. |
r_is |
Attribute that holds the correct conjugation of to be for the
current actor. |
r_do |
Attribute that holds the correct conjugation of to do for the
current actor. |
r_key |
Attribute that holds the key to unlock subject1. Must be set in
the object code. Default value is %none. |
Priority |
Conditions |
1 (subject1) |
Subjects that are lockable and locked. |
2 (subject1) |
Subjects that are lockable. |
3 (subject1) |
All other subjects. |
--
Describe the surroundings.
Syntax |
Normal behavior |
“look” |
Call the entrance() function for the current location. |
“look at <subject>” |
Will examine the subject. |
“look <in><subject> |
Will print default message that there is nothing special in the
subject.
Note: <in> may be any preposition. |
Check |
Action |
Is actor alive? |
If not, abort. |
Is it dark ? |
If yes, print message about darkness and abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
d_exa |
Description that holds the description for examining the subject |
f_seenbefore |
Flag that denotes that the location was visited before. Is set
to 0 by the verb to ensure that the long room description is
printed by the entrance(). |
r_preposition |
Attribute that holds the preposition in case the actor is
contained in another object. |
Priority |
Conditions |
-- |
|
Move a subject.
Syntax |
Normal behavior |
“move” |
Will prompt what must be moved. |
“move<subject1>” |
Will prompt in which direction subject1 must be moved. |
“move <subject1> to <direction>” “move <subject1><direction>” |
Will print a message that it doesn’t make sense to move subject1
to that direction.
Note: <in> may be any preposition. |
“move <subject1><in><subject2>” |
Will print a message that moving subject1 in subject2
accomplishes nothing.
Note: <in> may be any preposition. |
Check |
Action |
Is actor alive? |
If not, abort. |
Is subject1 fixed in place? |
If yes, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_fixed |
Determine whether the subject is fixed in place. |
Priority |
Conditions |
1 (subject1) |
Subjects that are not fixed in place. |
2 (subject1) |
All other subjects. |
Open an item.
Syntax |
Normal behavior |
“open” |
Will prompt what must be opened. |
“open subject” |
Will open the subject. In case any visible items are in the
subject, a list of these items will be printed. |
Check |
Action |
Is actor alive? |
If not, abort. |
Is subject openable? |
If not, abort. |
Is subject locked? |
If yes, abort. |
Is subject open? |
If yes, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_openable |
Determine whether the subject can be opened and closed. |
f_open |
Determine whether the subject is already closed. |
f_opaque |
After opening, the subject is no longer opaque. |
f_any |
Used to count the number of items that are contained in the
subject. |
r_nr_to_reveal |
Number of items contained in the subject. Used to print the list
of items. |
f_first |
Used to determine when to print the starting text of the item
list. |
t_reveal |
Trigger that prints the list of items in the subject. |
Priority |
Conditions |
1 |
Subjects that are openable, not open and not locked. |
2 |
Subjects that are openable and not locked. |
3 |
Subjects that are openable |
4 |
All other subjects. |
--
Poke (in) an item.
Syntax |
Normal behavior |
“poke” |
Will prompt what must be poked |
“poke <subject>” “poke in <subject> |
Will print that there is nothing in the subject. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Put an item in/on/behind/ another item.
Syntax |
Normal behavior |
“put” |
Will prompt what must be put. |
“put <subject1>” |
Will ask where to put subject1. |
“put <subject1><in><subject2> |
Will print default message that subject1 cannot be put in
subject2.
Note: <in> may be any preposition. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
Is it dark ? |
If yes, print message about darkness. |
Artifact |
Purpose |
f_bypass |
Is cleared after dropping, so the dropped subject will not be
exempt from visibility checks any longer. |
f_takeable |
If subject1 is not held, can it be taken? |
f_container |
Is subject2 a container can something be put in it?) |
f_supporter |
Is subject2 a supporter (can something be put on it?) |
r_is |
Attribute that holds the correct conjugation of to be for the
current actor. |
f_container |
To determine if <subject2> is a container |
Priority |
Conditions |
1 (subject1) |
Subjects that are held by the actor. |
2 (subject1) |
All other subjects in scope. |
1 (subject2) |
Subjects that are a container. |
1 (subject2) |
Subjects that are a supporter. |
1 (subject2) |
Subjects that are not held by the actor. |
2 (subject2) |
All other subjects in scope. |
Quit and exit the game.
Syntax |
Normal behavior |
“quit” |
Will ask the player is he is sure and if yes, quit the game. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Read an item.
Syntax |
Normal behavior |
“read” |
Will prompt what must be read. |
"read subject" |
Will print that no text is printed on the subject. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Reading must be handled by the subject itself.
Restart the game.
Syntax |
Normal behavior |
“restart” |
Will ask the player is he is sure and if yes, restart the game. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Restore earlier saved progress.
Syntax |
Normal behavior |
“restore” |
Restore the progress that was saved earlier. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Save progress.
Syntax |
Normal behavior |
“save” |
Save the current state of the story. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
o_player.f_may_save |
Check whether saving is allowed. |
Priority |
Conditions |
-- |
|
Adressing someone.
Syntax |
Normal behavior |
Everything, only has a default. |
Prints a message to use “ask” or “tell” to speak to someone.. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Print the current score.
Syntax |
Normal behavior |
“score” |
Print the player’s score and the maximum score. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
o_player.r_score |
The player’s current score. |
o_player.r_max_score |
The maximum score for this game. |
Priority |
Conditions |
-- |
|
Singing.
Syntax |
Normal behavior |
Everything, only has a default |
Prints a message that the actor is not in the mood for singing. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Sit on things.
Syntax |
Normal behavior |
“sit <on> <subject>” |
Move the player to <subject> with preposition ‘on’.
Note: <on> may be any preposition |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Smelling.
Syntax |
Normal behavior |
“smell” |
Will print a message that you smell nothing special. |
“smell <subject>”
|
Will print a message that it smells just like a subject. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Tell someone about something.
Syntax |
Normal behavior |
“tell <subject1>about <subject2>” |
Will print a message saying thanks for sharing. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_alive |
Determine whether subject1 is something that is alive. |
Priority |
Conditions |
1 (subject1) |
Subjects that are alive. |
2 (subject1) |
All other subjects. |
Get user input from a file. This command is intended for regression
testing.
Syntax |
Normal behavior |
“testmode” |
Reads user input from a file. The file must be named
"testinput.txt". |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Throw a subject.
Syntax |
Normal behavior |
“throw <subject1> |
Drops subject1. |
“throw <subject1> to <direction>” “throw <subject1><direction>” |
Will print a message that the subject bounces to the wall and
falls on the floor. |
“throw <subject1><at><subject2>” |
Will print a message that throwing subject1 at subject2
accomplishes nothing.
Note: <at> may be any preposition. |
Check |
Action |
Is actor alive? |
If not, abort. |
Does actor hold subject1? |
If not, try to take subject1 and continue if succeeds. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_takeable |
Determine whether subject1 can be taken if it is not held by the
actor. |
Priority |
Conditions |
1 (subject1) |
Subjects that are held by the actor. |
2 (subject1) |
Subjects that are not held but can be picked up. |
3 (subject1) |
All other subjects. |
Tie a subject to another subject.
Syntax |
Normal behavior |
“tie” |
Will prompt what must be tied. |
“tie <subject1> |
Will prompt to what subject1 must be tied to. |
“tie <subject1> to <subject2>” |
Will print a message that subject1 cannot be tied to subject 2. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Touching things.
Syntax |
Normal behavior |
“touch” |
Will prompt what must be touched. |
“touch <subject> |
Prints that it just feels like a <subject>. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Copy story input and output to a file.
Syntax |
Normal behavior |
“transcript” |
Will copy user input and story output to file transcript.txt. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Turn a subject.
Syntax |
Normal behavior |
“turn” |
Will prompt what must be turned. |
“turn <subject> |
Will print that turning the subject accomplishes nothing. |
“turn <subject><direction>” “turn <subject> to <direction>” |
Will print a message that it doesn’t make sense turning the
subject to the direction. |
“turn on <subject>” “turn <subject> on” |
Will print a message that the subject cannot be turned on. |
“turn off <subject>” “turn <subject> off” |
Will print a message that the subject cannot be turned off. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_fixed |
Determine whether the subject is fixed in place. |
Priority |
Conditions |
-- |
|
Unlock an item.
Syntax |
Normal behavior |
“unlock” |
Will prompt what must be unlocked. |
“unlock <subject1>” |
Will unlock the subject provided the actor has the correct key. |
“unlock <subject1> with <subject2> |
Will unlock subject1 using subject2 as the key. |
Check |
Action |
Is actor alive? |
If not, abort. |
Is subject1 lockable? |
If not, abort. |
Is subject locked? |
If yes, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_locked |
Determine whether subject1 is already locked. |
r_is |
Attribute that holds the correct conjugation of to be for the
current actor. |
r_do |
Attribute that holds the correct conjugation of to do for the
current actor. |
r_key |
Attribute that holds the key to unlock subject1. Must be set in
the object code. Default value is is %none. |
Priority |
Conditions |
1 (subject1) |
Subjects that are locked. |
2 (subject1) |
All other subjects. |
--
untie a subject from another subject.
Syntax |
Normal behavior |
“untie” |
Will prompt what must be untied. |
“untie <subject1> |
Will prompt what subject1 must be untitied from. |
“untie <subject1> from <subject2>” |
Will print a message that subject1 cannot be untied from subject
2. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Drop a subject.
Syntax |
Normal behavior |
“unuse <subject>” |
Drop the subject. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Depending on the state of the game, perform a certain action on a
subject.
Syntax |
Normal behavior |
“use <subject1>” |
Perform an action on subject1. See remarks for possible actions. |
“use <subject1> with <subject2> |
Perform an action with subject1 and subject 2. See remarks for
possible actions. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
f_alive |
Determine whether a subject is alive. |
f_examined |
Determine whether a subject has been examined before. |
f_locked |
Determine whether a subject is locked. |
f_key |
Determine whether a subject is a key. |
f_container |
Determine whether a subject can contain other subjects. |
The
verb ‘use’ was added for IFI-XVAN. When an object text hyperlink is
clicked or an icon is dropped on an object hyperlink, the GUI sends a
‘use’ command to the back-end (see also the IFI-XVAN documentation).
Otherwise the command “get subject1” will be executed.
if
both subjects are alive, the command “ask subject2 about subject1”is
executed.
If
only subject2 is alive, the command “give subject1 to subject2” is
executed.
If
subject2 is locked and subject12 is a key, the command “unlock subject2
with subject1” is executed.
If
subject2 is a container, the command “put subject1 in subject2” is
executed.
Else,
the command “put subject1 on subject2” is executed.
Switch between always printing full room descriptions and only printing
the full description at first entrance.
Syntax |
Normal behavior |
“verbose” |
If verbose is on, turn it off. If verbose is off, turn it on. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
o_player.f_verbose |
Determine whether verbose mode is on or off. |
Priority |
Conditions |
-- |
|
Wait for one or more turns.
Syntax |
Normal behavior |
“wait” |
Wait 1 turns |
“wait <number>” |
Wait the number of turns. |
Check |
Action |
-- |
|
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
Wear an item.
Syntax |
Normal behavior |
“wear” |
Will prompt what must be worn. |
"wear subject" |
Will print that the subject is now worn. |
Check |
Action |
Is actor alive? |
If not, abort. |
Is subject wearable? |
If not, abort. |
Is subject worn? |
If yes, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
f_wearable |
Determine whether the subject can be worn. |
f_worn |
Determine whether the subject is already worn. |
Priority |
Conditions |
1 |
Subjects that are wearable and not worn. |
2 |
Subjects that are wearable and worn. |
3 |
All other subjects. |
--
Courtesy to Colossal Cave adventure.
Syntax |
Normal behavior |
Everything, only has a default |
Prints a message that this is not Colossal Cave. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Purpose:
Yelling.
Syntax |
Normal behavior |
Everything, only has a default |
Prints “Aaaargh”. |
Check |
Action |
Is actor alive? |
If not, abort. |
Check |
Action |
-- |
|
Artifact |
Purpose |
-- |
|
Priority |
Conditions |
-- |
|
--
Use this template to define additional verbs. Text starting with ‘#’ are
comments.
The simplest form of a verb is $VERB name ENDVERB.
$VERB name
SYNONYM
name2
PROLOGUE
<actions to be performed before anything else for this verb is done>
EPILOGUE
<actions
to be performed after everything for this verb has been done>
“user command to respond to”
<…code…>
“user command to respond to”
<…code…>
DEFAULT
<code
to execute wen nothing else fired>
ENDVERB
.