nightmare3_fluffos_v2/
nightmare3_fluffos_v2/bin/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/ChangeLog.old/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/Win32/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/compat/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/compat/simuls/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/include/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/clone/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/command/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/data/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/etc/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/include/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/inherit/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/inherit/master/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/log/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/compiler/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/efuns/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/operators/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/u/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/tmp/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/windows/
nightmare3_fluffos_v2/lib/cmds/ambassador/
nightmare3_fluffos_v2/lib/cmds/database/
nightmare3_fluffos_v2/lib/cmds/hm/
nightmare3_fluffos_v2/lib/cmds/soul/
nightmare3_fluffos_v2/lib/daemon/cfg/
nightmare3_fluffos_v2/lib/daemon/cfg/mon_races/
nightmare3_fluffos_v2/lib/daemon/cfg/races/
nightmare3_fluffos_v2/lib/daemon/include/
nightmare3_fluffos_v2/lib/daemon/save/
nightmare3_fluffos_v2/lib/daemon/services/
nightmare3_fluffos_v2/lib/daemon/soul/
nightmare3_fluffos_v2/lib/doc/
nightmare3_fluffos_v2/lib/doc/TestPlans/
nightmare3_fluffos_v2/lib/doc/approval/
nightmare3_fluffos_v2/lib/doc/approval/QC/
nightmare3_fluffos_v2/lib/doc/approval/balance/
nightmare3_fluffos_v2/lib/doc/build/
nightmare3_fluffos_v2/lib/doc/build/armours/
nightmare3_fluffos_v2/lib/doc/build/economy/
nightmare3_fluffos_v2/lib/doc/build/etc/
nightmare3_fluffos_v2/lib/doc/build/monster/
nightmare3_fluffos_v2/lib/doc/build/room/
nightmare3_fluffos_v2/lib/doc/build/virtual/
nightmare3_fluffos_v2/lib/doc/build/weapon/
nightmare3_fluffos_v2/lib/doc/classes/
nightmare3_fluffos_v2/lib/doc/efun/
nightmare3_fluffos_v2/lib/doc/etc/
nightmare3_fluffos_v2/lib/doc/help/creator/
nightmare3_fluffos_v2/lib/doc/help/hm/
nightmare3_fluffos_v2/lib/doc/law/
nightmare3_fluffos_v2/lib/doc/lpc/basic/
nightmare3_fluffos_v2/lib/doc/lpc/data_types/
nightmare3_fluffos_v2/lib/doc/lpc/etc/
nightmare3_fluffos_v2/lib/doc/lpc/intermediate/
nightmare3_fluffos_v2/lib/doc/lpc/types/
nightmare3_fluffos_v2/lib/doc/mudlib/
nightmare3_fluffos_v2/lib/doc/mudlib/features/
nightmare3_fluffos_v2/lib/domains/Examples/etc/
nightmare3_fluffos_v2/lib/domains/Examples/room/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/exaA/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/exaB/
nightmare3_fluffos_v2/lib/domains/Examples/weapon/
nightmare3_fluffos_v2/lib/domains/Praxis/
nightmare3_fluffos_v2/lib/domains/Praxis/adm/
nightmare3_fluffos_v2/lib/domains/Praxis/attic/
nightmare3_fluffos_v2/lib/domains/Praxis/cemetary/
nightmare3_fluffos_v2/lib/domains/Praxis/cemetary/mon/
nightmare3_fluffos_v2/lib/domains/Praxis/data/
nightmare3_fluffos_v2/lib/domains/Praxis/death/
nightmare3_fluffos_v2/lib/domains/Praxis/mountains/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/armour/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/magic/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/weapon/
nightmare3_fluffos_v2/lib/domains/Praxis/orc_valley/
nightmare3_fluffos_v2/lib/domains/Praxis/quests/
nightmare3_fluffos_v2/lib/domains/Praxis/standardOld/
nightmare3_fluffos_v2/lib/include/
nightmare3_fluffos_v2/lib/log/
nightmare3_fluffos_v2/lib/log/errors/
nightmare3_fluffos_v2/lib/log/reports/
nightmare3_fluffos_v2/lib/log/watch/
nightmare3_fluffos_v2/lib/news/
nightmare3_fluffos_v2/lib/secure/cfg/
nightmare3_fluffos_v2/lib/secure/cmds/ambassador/
nightmare3_fluffos_v2/lib/secure/cmds/mortal/
nightmare3_fluffos_v2/lib/secure/save/users/d/
nightmare3_fluffos_v2/lib/secure/std/
nightmare3_fluffos_v2/lib/std/hm/
nightmare3_fluffos_v2/lib/std/living/
nightmare3_fluffos_v2/lib/std/room/
nightmare3_fluffos_v2/lib/std/user/
nightmare3_fluffos_v2/lib/std/virtual/
nightmare3_fluffos_v2/lib/www/
nightmare3_fluffos_v2/lib/www/errors/
nightmare3_fluffos_v2/lib/www/gateways/
nightmare3_fluffos_v2/win32/
#include <std.h>

inherit ROOM;

object *begging;

void init() {
    ::init();
    add_action("confess", "confess");
    add_action("pray", "pray");
}

void create() {
    ::create();
    set_listen_string("default", "You hear the faint sounds of "
		      "chanting from up the stairs.");
    set_listen_string("upstairs", "You hear the chanting of monks.");
    set_listen_string("chants", "We serve an old man in a dry season"
      "\nA lighthouse keeper in the desert sun\n"
      "Dreamers of sleepers and white treason\n"
      "We dream of rain and the history of the gun\n");
    begging = ({});
    set_short( "Praxis monastary");
    set_long(
        "You are in the ornate monastary of Praxis.\n"
        "In this huge open monastary run by Praxis monks, the wretched "
        "murders come to confess, and the dead come to pray for resurrection. "
        "A small stairway to the east leads to the monastary attic and "
	"basement. The Praxis Chapel where monks marry people is north. "
        "Boc La Road is outside the monastary to the south. ");
    set_exits( 
	      (["south" : "/domains/Praxis/e_boc_la1",
		"east" : "/domains/Praxis/stairs",
		"north" : "/domains/Praxis/chapel"]) );
    set_property("light", 2);
    set_property("indoors", 1);
    set_items(
        (["monastery" : "The home of the Nightmare monks.", 
	  "chamber" : "People come here to pray for resurrection "
	    "when they die.", 
	  "stairway" : "A small spiral set of stairs leading to "
	    "the attic and cellar.", 
	  "road" : "Boc La Road."]) );
    set_property("no attack", 1);
    set_property("no steal", 1);
    set_property("no castle", 1);
}

int pray() {
    if(!this_player()->query_ghost()) {
	notify_fail("The living do not need to pray for revival.\n");
	return 0;
    }
    this_player()->revive();
    this_player()->set_hp(10);
    this_player()->set_heart_beat(1);
    this_player()->set_heal_rate(2);
    return 1;
}

int confess(string str) {
    object *inv;
    int i, ok;
    string res;

    if(str != "murder") {
        notify_fail("Confess what?\n");
        return 0;
    }
    ok = 0;
    if(sscanf((string)this_player()->getenv("TITLE"), "%s murderer $N%*s", res)
      != 1) {
        notify_fail("You are no murderer.\n");
        return 0;
    }
    i = sizeof(inv = all_inventory(this_object()));
    while(i--) if((string)inv[i]->query_class() == "monk") ok = 1;
    if(!ok) {
        write("There is no one here to whom you may confess.");
        return 1;
    }
    message("my_action", "You beg the monks for forgiveness for "
	    "your murder of a "+lower_case(res)+".", this_player());
    message("my_action", ("You pray that forgiveness does not mean "
			  "death."), this_player());
    say(this_player()->query_cap_name()+" begs for "+
	this_player()->query_possessive()+" murder of a "+
	lower_case(str)+".");
    begging += ({ this_player() });
    call_out("forgive", 60, this_player());
    return 1;
}

object *query_forgiven() { return begging; }

void forgive(object ob) {
    string tmp;

    if(member_array(ob, begging) == -1) return;
    begging -= ({ ob });
    tmp = (string)call_other("/domains/Praxis/"+(string)ob->query_class()+"_hall",
      "get_new_title", ob);
    message("info", "You are now forgiven.", ob);
    ob->setenv("TITLE", tmp);
    ob->add_mp(-500);
    ob->add_hp(100- ((int)ob->query_skill("faith")));
}