/
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 "arena.h"
inherit "/std/room";

setup()
{
   set_short("The arena lobby");
   set_long("You are in a great hall. A wide gate to the "
      +"north leads into the arena, while a smaller, less "
      +"impressive door leads south back onto Main Street.\n");
   add_item( ({"arena", "gate", "north"}),
      "The arena lies behind the gate to the north. Magical forces "
      +"prevent more than one person entering the arena at once.\n");
   set_light(100);
   add_exit("north", "arena", "gate");
   modify_exit("north", ({"function", "do_enter"}) );
   add_exit("south", HOMECITY+"mainstreet7", "door");
   add_exit("up", "hall", "corridor");
}

int do_enter()
{
   if(query_property("occupied"))
      {
      notify_fail("Sorry, the arena is currently occupied by "
            +query_property("occupied")
         + ".\n");
      return 0;
   }
   if ((int)this_player()->query_property("arena") == sizeof(NAMES))
      {
notify_fail("As you pass though the door, the memories of your victory "
+"here flood through you. The smell of the blood, the roar of the "
+"crowd. However, you do not linger long, as there "
+"may be new challengers waiting to have their chance "
+"for glory.\n");
      return 0;
   }
   add_property("occupied", this_player()->query_cap_name());
   call_other(PATH+"arena", "welcome");
   if(!this_player()->query_property("arena"))
      write("You haven't defeated any of the champions yet.\n");
   else
      write("The last champion you managed to defeat was "+
capitalize(NAMES[(int)this_player()->query_property("arena")-1])
      + ".\n");
   return 1;
}

void do_remove()
{
   this_object()->remove_property("occupied");
}