#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"); }