/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
#include "library.h"
inherit "/obj/monster";

object  ob;

void    setup()
{
    set_name( "death" );
    set_short( "death" );
    set_long( "The grim reaper, the big bad dude. You know "
	      + "who he is...\n" );
}

void    person_died( string name )
{
    ob = find_living( name );
    if( !ob )
    {
	return;
    }
    ob->add_property( "dead", 1 );
    ob->add_property( "noregen", 1 );
    tell_object( ob, "Oh no, you are dead.\n I wonder what happens now?\n" );
    call_out( "death1", 5 );
}

void    death1()
{
    this_object()->move( environment( ob ) );
    tell_object( ob, "Death appears beside you, giving you an awful fright.\n" );
    tell_object( ob, "Death says : My my, you don't look to healthy..\n" );
    say( "You shudder with fright as you feel ... something "
	 + "enter the room.\n", ob );
    call_out( "death2", 4 );
}

void    death2()
{
    tell_object( ob, "Death says : Now let me see, should I give you "
		 + "another chance....\n" );
    if( ob->query_max_deaths() > ob->query_deaths() )
	call_out( "death3", 4 );
    else
	call_out( "fatal1", 4 );
}

void    death3()
{
    tell_object( ob, "Death says : Oh, I suppose so then.\n" );
    call_out( "death4", 2 );
}

void    death4()
{
    tell_object( ob, "Death sets your spirit free, then departs.\n" );
    say( "You exhale in relief as the spirits depart.\n", ob );
    ob->remove_property( "noregen" );
/*
   ob->move_to_start();
 */
    this_object()->dest_me();
}

void    fatal1()
{
    tell_object( ob, "Death says : No, I have let you off once to often...\n" );
    call_out( "fatal2", 2 );
}

void    fatal2()
{
    LIBRARY->complete_death( this_player()->query_name() );
    say( "You shudder as you hear the dreadful sound of "
	 + "a soul being ripped apart.\n", ob );
    tell_object( ob, "You know with a deadly certainty that "
		 + "you have met your end.\n" );
    this_object()->dest_me();
}

int     can_see( object player )
{
    if( player->query_property( "dead" ) )
	return 1;
    if( this_player()->query_creator() )
	return 1;
    return 0;
}

string short( int dark )
{
    if( can_see( this_player() ) )
    {
	return ::short( dark );
    }
    return 0;
}

string long( string str, int dark )
{
    if( can_see( this_player() ) )
    {
	return ::long( str, dark );
    }
    return "You do not think that death is here.\n";
}