cave.c - example for course 04

[previous example] [course04] [Table of contents] [next example]
/* Filename      : cave.c
 * Description   : a haunted cave (noisy)
 *
 * written       : 01-10-1996 - Gunner
 * last modified : 01-10-1996 - Gunner
 * HTML-Version  : 01-02-2000 - Ghorwin
 */

#include <mudlib.h>
inherit I_ROOM;                 // inherit "/std/room.c"

create()
{
    ::create();
    set_short("Inside a cave");
    set_long("You are standing inside a small cave cut out into the "
        "mountain. There's not much here, except for the skeleton "
        "laying on the ground right in front of you.\n");

    add_item(({"skeleton","bone","bones","heap","heap of bones"}),
        "The bones are laying in a heap on the ground. Wonder "
        "who they belong to?\n");

    add_item(({"mountain","base","mountainbase","base of mountain",
        "steep mountain"}),
        "You're standing inside the mountain. Go outside if you "
        "want to get a better look at the mountain.\n");

    add_item(({"peak","peaks","mountainpeak","mountainpeaks"}),
        "They're up there somewhere...\n");

    add_item(({"sky","cloud","gray cloud","clouds","gray clouds"}),
        "They're probably still up there.\n");

    add_item("heaven","Is it up there? Or are there just a bunch of "
        "UFOs flying around up there?\n");

    add_item(({"wall","mountainwall","rough wall","rough mountainwall"}),
        "The wall is roughly cut in here. The mountain must be "
        "made out of granite.\n");

    add_item("granite","Yep. It's probably granite.\n");

    add_item(({"ground","hard ground","unforgiving ground"}),
        "There are some bones laying on the ground.\n");

    add_item("sun","It's not hiding in here, that's for sure.\n");

    add_room_modifier("noise",20,({
        "You think you hear a distant scream.\n",
        "A soft voice whispers to you: 'Avenge me.'\n",
        "The cave seems to grow smaller.\n",
        "The ground shakes slightly.\n",
        "'Avenge me. Avenge me.' someone whispers.\n"}));

    add_neg(({"take","get","move"}),({"skeleton","bone","bones",
        "heap","heap of bones"}),
        "Let's leave the bones alone, shall we? Let's try to "
        "keep our minds on the living...\n");
  
    add_property(({"indoors","no_pet"}));

    add_exit("./mbase","out");      // Only one way out of here

    replace_program(I_ROOM);
}