ds2.9a12/bin/
ds2.9a12/extra/
ds2.9a12/extra/crat/
ds2.9a12/extra/creremote/
ds2.9a12/extra/mingw/
ds2.9a12/extra/wolfpaw/
ds2.9a12/fluffos-2.14-ds13/
ds2.9a12/fluffos-2.14-ds13/Win32/
ds2.9a12/fluffos-2.14-ds13/compat/
ds2.9a12/fluffos-2.14-ds13/compat/simuls/
ds2.9a12/fluffos-2.14-ds13/include/
ds2.9a12/fluffos-2.14-ds13/testsuite/
ds2.9a12/fluffos-2.14-ds13/testsuite/clone/
ds2.9a12/fluffos-2.14-ds13/testsuite/command/
ds2.9a12/fluffos-2.14-ds13/testsuite/data/
ds2.9a12/fluffos-2.14-ds13/testsuite/etc/
ds2.9a12/fluffos-2.14-ds13/testsuite/include/
ds2.9a12/fluffos-2.14-ds13/testsuite/inherit/
ds2.9a12/fluffos-2.14-ds13/testsuite/inherit/master/
ds2.9a12/fluffos-2.14-ds13/testsuite/log/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/compiler/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/efuns/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/operators/
ds2.9a12/fluffos-2.14-ds13/testsuite/u/
ds2.9a12/lib/cmds/admins/
ds2.9a12/lib/cmds/common/
ds2.9a12/lib/cmds/creators/include/
ds2.9a12/lib/daemon/services/
ds2.9a12/lib/daemon/tmp/
ds2.9a12/lib/doc/
ds2.9a12/lib/doc/bguide/
ds2.9a12/lib/doc/efun/all/
ds2.9a12/lib/doc/efun/arrays/
ds2.9a12/lib/doc/efun/buffers/
ds2.9a12/lib/doc/efun/compile/
ds2.9a12/lib/doc/efun/floats/
ds2.9a12/lib/doc/efun/functions/
ds2.9a12/lib/doc/efun/general/
ds2.9a12/lib/doc/efun/mixed/
ds2.9a12/lib/doc/efun/numbers/
ds2.9a12/lib/doc/efun/parsing/
ds2.9a12/lib/doc/hbook/
ds2.9a12/lib/doc/help/classes/
ds2.9a12/lib/doc/help/races/
ds2.9a12/lib/doc/lfun/
ds2.9a12/lib/doc/lfun/all/
ds2.9a12/lib/doc/lfun/lib/abilities/
ds2.9a12/lib/doc/lfun/lib/armor/
ds2.9a12/lib/doc/lfun/lib/bank/
ds2.9a12/lib/doc/lfun/lib/bot/
ds2.9a12/lib/doc/lfun/lib/clay/
ds2.9a12/lib/doc/lfun/lib/clean/
ds2.9a12/lib/doc/lfun/lib/clerk/
ds2.9a12/lib/doc/lfun/lib/client/
ds2.9a12/lib/doc/lfun/lib/combat/
ds2.9a12/lib/doc/lfun/lib/connect/
ds2.9a12/lib/doc/lfun/lib/container/
ds2.9a12/lib/doc/lfun/lib/corpse/
ds2.9a12/lib/doc/lfun/lib/creator/
ds2.9a12/lib/doc/lfun/lib/daemon/
ds2.9a12/lib/doc/lfun/lib/damage/
ds2.9a12/lib/doc/lfun/lib/deterioration/
ds2.9a12/lib/doc/lfun/lib/donate/
ds2.9a12/lib/doc/lfun/lib/door/
ds2.9a12/lib/doc/lfun/lib/equip/
ds2.9a12/lib/doc/lfun/lib/file/
ds2.9a12/lib/doc/lfun/lib/fish/
ds2.9a12/lib/doc/lfun/lib/fishing/
ds2.9a12/lib/doc/lfun/lib/flashlight/
ds2.9a12/lib/doc/lfun/lib/follow/
ds2.9a12/lib/doc/lfun/lib/ftp_client/
ds2.9a12/lib/doc/lfun/lib/ftp_data_connection/
ds2.9a12/lib/doc/lfun/lib/fuel/
ds2.9a12/lib/doc/lfun/lib/furnace/
ds2.9a12/lib/doc/lfun/lib/genetics/
ds2.9a12/lib/doc/lfun/lib/holder/
ds2.9a12/lib/doc/lfun/lib/id/
ds2.9a12/lib/doc/lfun/lib/interactive/
ds2.9a12/lib/doc/lfun/lib/lamp/
ds2.9a12/lib/doc/lfun/lib/leader/
ds2.9a12/lib/doc/lfun/lib/light/
ds2.9a12/lib/doc/lfun/lib/limb/
ds2.9a12/lib/doc/lfun/lib/living/
ds2.9a12/lib/doc/lfun/lib/load/
ds2.9a12/lib/doc/lfun/lib/look/
ds2.9a12/lib/doc/lfun/lib/manipulate/
ds2.9a12/lib/doc/lfun/lib/meal/
ds2.9a12/lib/doc/lfun/lib/messages/
ds2.9a12/lib/doc/lfun/lib/player/
ds2.9a12/lib/doc/lfun/lib/poison/
ds2.9a12/lib/doc/lfun/lib/position/
ds2.9a12/lib/doc/lfun/lib/post_office/
ds2.9a12/lib/doc/lfun/lib/potion/
ds2.9a12/lib/doc/lfun/lib/room/
ds2.9a12/lib/doc/lfun/lib/server/
ds2.9a12/lib/doc/lfun/lib/spell/
ds2.9a12/lib/doc/lfun/lib/torch/
ds2.9a12/lib/doc/lfun/lib/vendor/
ds2.9a12/lib/doc/lfun/lib/virt_sky/
ds2.9a12/lib/doc/lfun/lib/weapon/
ds2.9a12/lib/doc/lfun/lib/worn_storage/
ds2.9a12/lib/doc/lpc/basic/
ds2.9a12/lib/doc/lpc/concepts/
ds2.9a12/lib/doc/lpc/constructs/
ds2.9a12/lib/doc/lpc/etc/
ds2.9a12/lib/doc/lpc/intermediate/
ds2.9a12/lib/doc/lpc/types/
ds2.9a12/lib/doc/misc/
ds2.9a12/lib/doc/old/
ds2.9a12/lib/domains/
ds2.9a12/lib/domains/Praxis/adm/
ds2.9a12/lib/domains/Praxis/attic/
ds2.9a12/lib/domains/Praxis/cemetery/mon/
ds2.9a12/lib/domains/Praxis/data/
ds2.9a12/lib/domains/Praxis/death/
ds2.9a12/lib/domains/Praxis/mountains/
ds2.9a12/lib/domains/Praxis/obj/armour/
ds2.9a12/lib/domains/Praxis/obj/magic/
ds2.9a12/lib/domains/Praxis/obj/weapon/
ds2.9a12/lib/domains/Praxis/orc_valley/
ds2.9a12/lib/domains/Ylsrim/
ds2.9a12/lib/domains/Ylsrim/adm/
ds2.9a12/lib/domains/Ylsrim/armor/
ds2.9a12/lib/domains/Ylsrim/broken/
ds2.9a12/lib/domains/Ylsrim/fish/
ds2.9a12/lib/domains/Ylsrim/meal/
ds2.9a12/lib/domains/Ylsrim/npc/
ds2.9a12/lib/domains/Ylsrim/obj/
ds2.9a12/lib/domains/Ylsrim/virtual/
ds2.9a12/lib/domains/Ylsrim/weapon/
ds2.9a12/lib/domains/campus/adm/
ds2.9a12/lib/domains/campus/etc/
ds2.9a12/lib/domains/campus/meals/
ds2.9a12/lib/domains/campus/save/
ds2.9a12/lib/domains/campus/txt/ai/charles/
ds2.9a12/lib/domains/campus/txt/ai/charles/bak2/
ds2.9a12/lib/domains/campus/txt/ai/charles/bak2/bak1/
ds2.9a12/lib/domains/campus/txt/ai/charly/
ds2.9a12/lib/domains/campus/txt/ai/charly/bak/
ds2.9a12/lib/domains/campus/txt/jenny/
ds2.9a12/lib/domains/cave/doors/
ds2.9a12/lib/domains/cave/etc/
ds2.9a12/lib/domains/cave/meals/
ds2.9a12/lib/domains/cave/weap/
ds2.9a12/lib/domains/default/creator/
ds2.9a12/lib/domains/default/doors/
ds2.9a12/lib/domains/default/etc/
ds2.9a12/lib/domains/default/vehicles/
ds2.9a12/lib/domains/default/virtual/
ds2.9a12/lib/domains/default/weap/
ds2.9a12/lib/domains/town/txt/shame/
ds2.9a12/lib/domains/town/virtual/
ds2.9a12/lib/domains/town/virtual/bottom/
ds2.9a12/lib/domains/town/virtual/space/
ds2.9a12/lib/estates/
ds2.9a12/lib/ftp/
ds2.9a12/lib/lib/comp/
ds2.9a12/lib/lib/daemons/
ds2.9a12/lib/lib/daemons/include/
ds2.9a12/lib/lib/lvs/
ds2.9a12/lib/lib/user/
ds2.9a12/lib/lib/virtual/
ds2.9a12/lib/log/
ds2.9a12/lib/log/adm/
ds2.9a12/lib/log/archive/
ds2.9a12/lib/log/chan/
ds2.9a12/lib/log/errors/
ds2.9a12/lib/log/law/adm/
ds2.9a12/lib/log/law/email/
ds2.9a12/lib/log/law/names/
ds2.9a12/lib/log/law/sites-misc/
ds2.9a12/lib/log/law/sites-register/
ds2.9a12/lib/log/law/sites-tempban/
ds2.9a12/lib/log/law/sites-watch/
ds2.9a12/lib/log/open/
ds2.9a12/lib/log/reports/
ds2.9a12/lib/log/router/
ds2.9a12/lib/log/secure/
ds2.9a12/lib/log/watch/
ds2.9a12/lib/obj/book_source/
ds2.9a12/lib/obj/include/
ds2.9a12/lib/powers/prayers/
ds2.9a12/lib/powers/spells/
ds2.9a12/lib/realms/template/adm/
ds2.9a12/lib/realms/template/area/armor/
ds2.9a12/lib/realms/template/area/npc/
ds2.9a12/lib/realms/template/area/obj/
ds2.9a12/lib/realms/template/area/room/
ds2.9a12/lib/realms/template/area/weap/
ds2.9a12/lib/realms/template/bak/
ds2.9a12/lib/realms/template/cmds/
ds2.9a12/lib/save/kills/o/
ds2.9a12/lib/secure/cfg/classes/
ds2.9a12/lib/secure/cmds/builders/
ds2.9a12/lib/secure/cmds/creators/include/
ds2.9a12/lib/secure/cmds/players/
ds2.9a12/lib/secure/cmds/players/include/
ds2.9a12/lib/secure/daemon/imc2server/
ds2.9a12/lib/secure/daemon/include/
ds2.9a12/lib/secure/lib/
ds2.9a12/lib/secure/lib/include/
ds2.9a12/lib/secure/lib/net/include/
ds2.9a12/lib/secure/lib/std/
ds2.9a12/lib/secure/log/adm/
ds2.9a12/lib/secure/log/bak/
ds2.9a12/lib/secure/log/intermud/
ds2.9a12/lib/secure/log/network/
ds2.9a12/lib/secure/modules/
ds2.9a12/lib/secure/npc/
ds2.9a12/lib/secure/obj/include/
ds2.9a12/lib/secure/room/
ds2.9a12/lib/secure/save/
ds2.9a12/lib/secure/save/backup/
ds2.9a12/lib/secure/save/boards/
ds2.9a12/lib/secure/tmp/
ds2.9a12/lib/secure/upgrades/files/
ds2.9a12/lib/secure/verbs/creators/
ds2.9a12/lib/std/board/
ds2.9a12/lib/std/lib/
ds2.9a12/lib/tmp/
ds2.9a12/lib/verbs/admins/include/
ds2.9a12/lib/verbs/builders/
ds2.9a12/lib/verbs/common/
ds2.9a12/lib/verbs/common/include/
ds2.9a12/lib/verbs/creators/
ds2.9a12/lib/verbs/creators/include/
ds2.9a12/lib/verbs/rooms/
ds2.9a12/lib/verbs/rooms/include/
ds2.9a12/lib/www/client/
ds2.9a12/lib/www/errors/
ds2.9a12/lib/www/images/
ds2.9a12/lib/www/lpmuds/downloads_files/
ds2.9a12/lib/www/lpmuds/intermud_files/
ds2.9a12/lib/www/lpmuds/links_files/
ds2.9a12/win32/
/*
// File     :  /domains/Praxis/court_room.c
// Comment  :  The Court where High Justice is served.
// 94-07-02 :  Pallando @ Nightmare wrote it
*/
#include <lib.h>
#include <rooms.h>
#include <council.h>

#define COUNCIL_CHAMBER "/domains/Praxis/council"

inherit LIB_ROOM;

object defendant;

void create()
{
    ::create();
    SetProperties( ([
        "indoors" : 1,
        "light" : 2,
        "no castle" : 1,
        "no teleport" : 1,
        "no bump" : 1,
        "no attack" : 1,
        "no steal" : 1,
        "no magic" : 1,
      ]) );
    SetShort( "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 SetItems to show if the dock and
    //   bench are currently occupied.
    SetLong(
      "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"
    );
    SetExits( ([
        "north" : "/domains/Praxis/town_hall",
        "east"  : "/domains/Praxis/sheriff",
      ]) );
    SetItems( ([
        "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-> eventMove( 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();
    executions = ([]);
    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 */