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/
/*
// File     :  /domains/Praxis/court_room.c
// Comment  :  The Court where High Justice is served.
// 94-07-02 :  Pallando @ Nightmare wrote it
*/
#include <std.h>
#include <rooms.h>
#include <council.h>

#define COUNCIL_CHAMBER "/domains/Praxis/council"

inherit ROOM;

object defendant;

void create()
{
    ::create();
    set_properties( ([
	"indoors" : 1,
	"light" : 2,
	"no castle" : 1,
	"no teleport" : 1,
	"no bump" : 1,
	"no attack" : 1,
	"no steal" : 1,
	"no magic" : 1,
    ]) );
    set_short( "the court of high justice" );
// Thank you, whoever added this.  However, if you have time, I have
// a few suggestions:
//   We want the justice system to be intimidating.  Imagine being a
//   short dwarf.  You have been lead up from a dank stone dungeon.
//   you peer up at the dark oak furnishings (the dock has omnious
//   scratches left on by the last victim dragged away for execution)
//   the flickering torches leave frightning looming dark heights to
//   the room, while leaving the dock harshly lit.  The judges bench
//   it tall, imposing, richly ornamented in legal symbols (an iron
//   glove enclosing an iron fist).  UNderneath it is a supply of gin.
//   The place smells slightly of chalk dust used for lawyer's wigs,
//   and the perspiration of bored and jeering juiries.  The stone
//   fllor flagstones boom ominously every time the usher bangs his
//   staff to summon the next witness.  A hanging on the wall, 
//   embroidered by the housewifes union depicts the possible sentances
//   in gory detail.  Occasional screams can be heard from the prison
//   or execution square.
//
//   You could also use interactive set_items to show if the dock and
//   bench are currently occupied.
    set_long(
"The sheer size of this room dazzles you.  The ceiling cannot be viewed\n"+
"from where you stand.  At one end of the room is a huge chair, in front\n"+
"of which is a desk.  Both the chair and the desk are made from the finest\n"+
"wood in the land.  Next to the desk lies a second chair, where witnesses\n"+
"sit.  On the other side of the room are rows of chairs, and an aisle\n"+
"through the center.  Two doors lead the way out of this room, north\n"+
"is the Town Hall, east is the sheriff's office.\n"
    );
    set_exits( ([
	"north" : "/domains/Praxis/town_hall",
	"east"  : "/domains/Praxis/sheriff",
    ]) );
    set_items( ([
	"view" : "A magnificent panorama of all Praxis.",
	"gavel" : "A wooden hammer-like object, used for pounding.",
	"chair" : "Made out of the finest wood.",
	"desk" : "A large desk made out of the finest wood.",
	({ "door", "doors" }) :
	    "Large wooden doors leading out of the room.",
	"ceiling" : "The ceiling extends out of view.",
    "room" : "A very large, spacious room with a "
      "rather formal aura.",
    "office" : "The office of the Sheriff of Praxis.",
    "wood" : "The highest quality wood, made exclusivly "
      "from the trees of the elven forest.",
    ]) );
}

varargs int justicep( mixed arg )
{
    if( !arg ) arg = this_player();
    if( objectp( arg ) ) arg = geteuid( arg );
    return -1 != member_array( arg, JUSTICES) || member_array( arg, POLICECOM );
}

int release_objects( object ob )
{
    return ob != defendant;
}

void init()
{
    add_action( "cmd_law", "law" );
    ::init();
    if( !creatorp( this_player() ) && !justicep( this_player() ) )
	return;
    add_action( "cmd_summon", "summon" );
    add_action( "cmd_verdict", "verdict" );
    add_action( "cmd_sentence", "sentence" );
}

int cmd_law( string title )
{
    return COUNCIL_CHAMBER-> cmd_law( title );
}


int cmd_summon( string arg )
{
    object victim;

    if( !arg )
	return notify_fail( "Syntax: summon <player name>\n" );
    call_other( ROOM_SHERIFF, "sighs_for_deleted_simul_efun_f.o.o.l." );
    if( victim = present( arg, this_object() ) )
    {
	if( victim == defendant )
	    return notify_fail( arg + " is already in the dock.\n" );
    } else if( victim = present( arg, find_object( ROOM_SHERIFF ) ) ) {
	ROOM_SHERIFF-> remove_prisoner( victim );
	victim-> move( this_object() );
    } else notify_fail( "The sheriffs do not have " + arg + ".\n" );
    if( defendant )
	tell_object( defendant, "You trial is suspended.  You may leave.\n" );
    defendant = victim;
    say( defendant-> query_cap_name() + " is summoned to the dock.\n" );
    return 1;
}

int cmd_verdict( string arg )
{
    if( !arg )
	return notify_fail( "Syntax: verdict guilty|innocent|none\n" );
    if( !defendant )
	return notify_fail( "You must summon a defendant first.\n" );
    switch( arg )
    {
    case "innocent":
    case "free":
    case "insufficient evidence":
	say( "VERDICT: the defendant is found to be Not Guilty.\n" );
	defendant-> set_outlaw( 0 );
	defendant = 0;
	break;
    case "guilty":
	say( "VERDICT: the defendant is Guilty.\n" );
	defendant-> set_outlaw( 1 );
	break;
    case "none":
    default:
	say( "VERDICT: no change in the defendant's status\n" );
	defendant = 0;
	break;
    }
    return 1;
}

int cmd_sentence( string arg )
{
    mapping executions;
    object criminal;

    executions = ROOM_SHERIFF-> valid_execution();
    if( !arg || undefinedp( executions[arg] ) )
	return notify_fail(
	    "Syntax: sentence <punishment>\nCurrent options:\n  "+
	    implode( keys( executions ), "\n  " ) + "\n" );
    if( !defendant )
	return notify_fail( "You must summon a defendant first.\n" );
    say( sprintf( 
"%s says: %s, you have been found guilty by due process\n"
"  and now justice must be seen to be done.  It is the will of law that\n"+
"  you shall now be taken from here unto the place of execution,\n"+
"  where you shall suffer the torments of %s until dead.\n",
	this_player()-> query_cap_name(),
	defendant-> query_cap_name(),
	arg ) );

    criminal = defendant;
    defendant = 0;
    ROOM_SHERIFF-> add_prisoner( criminal );
    ROOM_SHERIFF-> execute( criminal, arg );

    return 1;
}


/* EOF */