lima-1.0b5/
lima-1.0b5/driver/
lima-1.0b5/driver/ChangeLog.old/
lima-1.0b5/driver/Win32/
lima-1.0b5/driver/compat/
lima-1.0b5/driver/include/
lima-1.0b5/driver/testsuite/
lima-1.0b5/driver/testsuite/clone/
lima-1.0b5/driver/testsuite/command/
lima-1.0b5/driver/testsuite/data/
lima-1.0b5/driver/testsuite/etc/
lima-1.0b5/driver/testsuite/include/
lima-1.0b5/driver/testsuite/inherit/
lima-1.0b5/driver/testsuite/inherit/master/
lima-1.0b5/driver/testsuite/log/
lima-1.0b5/driver/testsuite/single/
lima-1.0b5/driver/testsuite/single/tests/compiler/
lima-1.0b5/driver/testsuite/single/tests/efuns/
lima-1.0b5/driver/testsuite/single/tests/operators/
lima-1.0b5/driver/testsuite/u/
lima-1.0b5/driver/tmp/
lima-1.0b5/etc/
lima-1.0b5/lib/WWW/help/
lima-1.0b5/lib/cmds/
lima-1.0b5/lib/cmds/create/
lima-1.0b5/lib/cmds/player/attic/
lima-1.0b5/lib/contrib/bboard/
lima-1.0b5/lib/contrib/boards/
lima-1.0b5/lib/contrib/marriage/
lima-1.0b5/lib/contrib/roommaker/
lima-1.0b5/lib/contrib/transient_effect/
lima-1.0b5/lib/daemons/channel/
lima-1.0b5/lib/daemons/imud/
lima-1.0b5/lib/data/
lima-1.0b5/lib/data/config/
lima-1.0b5/lib/data/links/
lima-1.0b5/lib/data/news/
lima-1.0b5/lib/data/players/
lima-1.0b5/lib/data/secure/
lima-1.0b5/lib/domains/
lima-1.0b5/lib/domains/std/2.4.5/maze1/
lima-1.0b5/lib/domains/std/2.4.5/npc/
lima-1.0b5/lib/domains/std/2.4.5/post_dir/
lima-1.0b5/lib/domains/std/2.4.5/sub/
lima-1.0b5/lib/domains/std/camera/
lima-1.0b5/lib/domains/std/config/
lima-1.0b5/lib/domains/std/cult/
lima-1.0b5/lib/domains/std/effects/
lima-1.0b5/lib/domains/std/misc/
lima-1.0b5/lib/domains/std/monsters/
lima-1.0b5/lib/domains/std/recorder/
lima-1.0b5/lib/domains/std/rooms/
lima-1.0b5/lib/domains/std/rooms/beach/
lima-1.0b5/lib/domains/std/rooms/labyrinth/
lima-1.0b5/lib/domains/std/school/
lima-1.0b5/lib/domains/std/school/O/
lima-1.0b5/lib/domains/std/spells/
lima-1.0b5/lib/domains/std/spells/stock-mage/
lima-1.0b5/lib/domains/std/spells/stock-priest/
lima-1.0b5/lib/help/
lima-1.0b5/lib/help/admin/
lima-1.0b5/lib/help/hints/General_Questions/
lima-1.0b5/lib/help/hints/Pirate_Quest/
lima-1.0b5/lib/help/player/
lima-1.0b5/lib/help/player/bin/
lima-1.0b5/lib/help/player/quests/
lima-1.0b5/lib/help/wizard/
lima-1.0b5/lib/help/wizard/coding/guilds/
lima-1.0b5/lib/help/wizard/coding/rooms/
lima-1.0b5/lib/help/wizard/lib/daemons/
lima-1.0b5/lib/help/wizard/lib/lfun/
lima-1.0b5/lib/help/wizard/lib/std/
lima-1.0b5/lib/help/wizard/mudos_doc/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/interactive/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/parsing/
lima-1.0b5/lib/help/wizard/mudos_doc/concepts/
lima-1.0b5/lib/help/wizard/mudos_doc/driver/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/arrays/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/buffers/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/compile/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/filesystem/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/floats/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/functions/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/general/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/mappings/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/mixed/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/numbers/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/parsing/
lima-1.0b5/lib/help/wizard/mudos_doc/lpc/constructs/
lima-1.0b5/lib/help/wizard/mudos_doc/lpc/types/
lima-1.0b5/lib/include/driver/
lima-1.0b5/lib/log/
lima-1.0b5/lib/obj/admtool/
lima-1.0b5/lib/obj/admtool/internal/
lima-1.0b5/lib/obj/admtool/mudinfo/
lima-1.0b5/lib/obj/admtool/secure/
lima-1.0b5/lib/obj/secure/
lima-1.0b5/lib/obj/secure/cmd/
lima-1.0b5/lib/obj/secure/mailers/
lima-1.0b5/lib/obj/secure/shell/
lima-1.0b5/lib/obj/secure/shell/classes/
lima-1.0b5/lib/obj/tasktool/
lima-1.0b5/lib/obj/tasktool/internal/
lima-1.0b5/lib/open/
lima-1.0b5/lib/secure/
lima-1.0b5/lib/secure/cgi/
lima-1.0b5/lib/secure/modules/
lima-1.0b5/lib/secure/simul_efun/
lima-1.0b5/lib/std/adversary/
lima-1.0b5/lib/std/adversary/advancement/
lima-1.0b5/lib/std/adversary/armor/
lima-1.0b5/lib/std/adversary/blows/
lima-1.0b5/lib/std/adversary/death/
lima-1.0b5/lib/std/adversary/formula/
lima-1.0b5/lib/std/adversary/health/
lima-1.0b5/lib/std/adversary/pulse/
lima-1.0b5/lib/std/adversary/wield/
lima-1.0b5/lib/std/classes/event_info/
lima-1.0b5/lib/std/container/
lima-1.0b5/lib/std/living/
lima-1.0b5/lib/std/modules/contrib/
lima-1.0b5/lib/std/patterns/
lima-1.0b5/lib/std/race/
lima-1.0b5/lib/std/race/restricted/
lima-1.0b5/lib/std/room/
lima-1.0b5/lib/tmp/
lima-1.0b5/lib/trans/
lima-1.0b5/lib/trans/admincmds/
lima-1.0b5/lib/trans/obj/
lima-1.0b5/lib/wiz/
This is an introduction to verbs in Lima.

There's more extensive technical details in "help parser".

Details of the implementation of verbs have changed many times,
and will no doubt change again, so don't be surprised if there are small
differences between what is written here and what actually happens
in your mud.

Verbs should generally be used instead of commands for "in character" ("IC")
actions, ie actions which the character should have access to, rather than 
the player - eg "look" (IC) should be a verb, while "help" should not.
Lima does not support add_actions.

Reasons for this - 
verbs have a central "condition checking" (is the character dead ? etc),
other checking for whether the action is possible is well-supported
multiple syntaxes can easily be defined for each verb
aliases can be defined for each syntax within each verb
sensible default error messages, easily tailored as required

Basics
======
Verbs are defined in individual files within /cmds/verbs/

They inherit VERB_OB

The syntaxes (rules) and aliases allowed for the verb are defined using the 
add_rules() function within create()

Each rule for the verb has a corresponding do_ function.

Optional can_ function for each syntax - if it doesn't evaluate to 1,
the action is prevented, using default error message if 0 is returned, 
whilst returning a string causes that to be used as the error message.

Verbs using any OBJ rule (ie the rule involves an object) require a
direct_ function, similar to the optional can_ function

Verbs involving a second object require a similar indirect_ function
for that second object.

Details
=======

Flags are used to signify which of the following checks are to be applied
in the verb :
NEED_TO_SEE
NEED_TO_BE_ALIVE
NEED_TO_THINK
TRY_TO_ACQUIRE
The first three are self-explanatory, and are included by default.
TRY_TO_ACQUIRE is excluded by default, and adding it signifies that the verb
requires the object to be in the player's possession, and will try to acquire
it first.

Use add_flag() and clear_flag() to add/remove these condition checks,
and include verbs.h which is where they are defined.

Most objects will inherit /std/obj/vsupport.c, which contains various 
default verb support functions (generally direct_).

When evaluating direct_ and indirect_ functions, any such functions in 
either the verb or the object concerned will be checked, followed by the
generic "direct_verb_rule()" and indirect_verb_rule() functions.

A default version of direct_verb_rule() is included in /std/obj/vsupport.c,
normally returning 1 for containers (rooms) and exits (provided the object 
passes the default checks, such as being visible).

Similarly a default version of indirect_verb_rule() was included in CONTAINER
(/std/container.c), allowing moving things to/from containers by default
(put, get etc) - this has now been moved to /std/container/vsupport.c and
replaced by specific indirect_ functions for the appropriate verbs.

Default implementations for various rules are included in VERB_OB.
For example, the implementation of the OBJ rule calls do_verb() in the object,
after having made various checks.

Problems
========
Use the "parse" command (in front of the normal verb syntax) to see the 
results of can/direct/indirect checks, and hence which rule(if any) is
used.

In order for the parse command to function, the driver should be compiled
in debug mode - ie "./build.MudOS debug"

SIMPLE EXAMPLE
==============
A verb for kicking things

inherit VEB_OB;

void do_kick_obj(object ob)
{
  ob->do_kick();
}

void create()
{
  add_rules( ({ "OBJ" }) ({ }) );
}

In any object which can successfully be kicked :
have a direct_kick_obj() function returning 1
have a do_kick() function which implements the effects of kicking it

eg a ball to kick:
inherit OBJ;

void setup()
{
  set_id("ball");
  set_long("It's a ball, sitting waiting to be kicked....");
}

mixed dirct_kick_obj() { return 1; }

void do_kick()
{
  this_body()->simple_action("$N $vkick $o.", this_object();
// ADD SOME CODE TO MOVE IT TO A NEW ROOM
// AND MESSAGE ON ENTERING THE ROOM
}

It's usually worth abstracting such code into a module, so that similar
items can inherit the module, instead of cut/pasting the support code.