/
lib/banish/
lib/d/coronos/
lib/d/coronos/w/alena/
lib/d/coronos/w/angel/
lib/d/coronos/w/angel/caves/
lib/d/coronos/w/angel/caves/monst/
lib/d/coronos/w/angel/city/chambers/
lib/d/coronos/w/angel/city/monst/
lib/d/coronos/w/angel/city/obj/
lib/d/coronos/w/angel/city/streets/
lib/d/coronos/w/angel/farms/plains/
lib/d/coronos/w/angel/monst/
lib/d/tempus/
lib/d/tempus/w/angel/
lib/d/tempus/w/kingbill/
lib/d/tempus/w/mirak/
lib/d/tempus/w/mirak/monst/
lib/d/tempus/w/mirak/obj/
lib/d/tempus/w/relgar/planes/baat/
lib/d/tempus/w/sarak/
lib/d/tempus/w/serepion/mon/
lib/d/tempus/w/valrejn/
lib/doc/
lib/doc/domains/
lib/doc/efun/
lib/include/fn_specs/
lib/info/
lib/inherit/base/
lib/log/
lib/log/mailbox/
lib/log/main/
lib/news/
lib/obj/party/
lib/objects/componen/
lib/open/
lib/open/party/
lib/open/paste/
lib/open/spells/
lib/open/valrejn/
lib/players/
lib/players/alena/
lib/players/alena/obj/
lib/players/alena/open/
lib/players/alena/private/
lib/players/angel/
lib/players/angel/obj/
lib/players/ash/
lib/players/biggs/
lib/players/biggs/food/
lib/players/biggs/gobkeep/
lib/players/biggs/mnstr/
lib/players/biggs/town/caves/
lib/players/biggs/town/tower/
lib/players/biggs/wpns/
lib/players/calris/
lib/players/deathurg/
lib/players/deathurg/open/
lib/players/deathurg/private/thief/
lib/players/dogberry/
lib/players/dogberry/library/
lib/players/dogberry/open/
lib/players/epsilon/
lib/players/epsilon/private/
lib/players/farewell/
lib/players/hippo/
lib/players/hippo/open/
lib/players/hippo/tools/
lib/players/jimpa/
lib/players/josh/
lib/players/josh/room/
lib/players/josh/room/mage/dungeon/
lib/players/josh/room/mage/dungeon/obj/
lib/players/josh/wep/
lib/players/kingbill/
lib/players/metatron/
lib/players/miette/
lib/players/mirak/
lib/players/mirak/open/
lib/players/parsilan/
lib/players/relgar/
lib/players/relgar/private/
lib/players/sarak/
lib/players/sarak/bugs/
lib/players/sarak/feelings/
lib/players/sarak/magical/
lib/players/sarak/minotaur/island/
lib/players/sarak/open/
lib/players/sarak/private/
lib/players/serepion/
lib/players/serepion/open/
lib/players/serepion/private/
lib/players/spike/
lib/players/spike/open/
lib/players/spike/private/
lib/players/spike/seaworld/
lib/players/valrejn/
lib/players/valrejn/open/
lib/players/valrejn/private/
lib/players/virus/
lib/players/wrath/
lib/players/wrath/arm/
lib/players/wrath/mon/
lib/players/wrath/room/
lib/players/wrath/room/entry/
lib/players/wrath/room/zolgath/
lib/players/wrath/weap/
lib/players/zil/
lib/room/
lib/room/city/arena/
lib/room/city/creator/
lib/room/city/garden/monst/
lib/room/city/library/
lib/room/city/library/open/books/
lib/room/city/shop/
lib/room/death/
lib/room/death/open/
lib/room/island/
lib/room/keeps/
lib/room/registry/
lib/room/ships/crew/
lib/room/ships/open/
lib/room/ships/open/types/bounty/
lib/room/ships/open/types/nebula/
lib/room/ships/open/types/phoenix/
lib/secure/udp_cmd_/
lib/skills/
lib/skills/fighter/
lib/skills/psionici/
lib/skills/thief/
lib/usr/
lib/usr/creators/
lib/usr/no_banis/
lib/usr/players/
#include <mudlib.h>
#include <ansi.h>
inherit ROOM;

static object elf;
void make_items(status arg);

void reset(status arg) {
  reset_doors(arg);
  load_door(({
     "file",   "room/city/pub/pub",        
     "direction", "east door",
     "key id", "city key",
     "long",
          "A large wooden door with a peep hole in the center.\n"+
          "Above the door hangs a sign which reads: "+
          BOLD+BLINK+"Skandle's Downfall"+OFF+"\n",
  }));
  if(!find_living("earothas") || !elf) {
    elf = clone_object(MONSTER);
    elf -> set_name("earothas");
    elf -> set_short("Lieutenant Earothas of the city guard");
    elf -> set_long(
       "The lieutenant is a strong, sturdy elf of about 22 human years, \n"+
       "with the muscle many warriors would be jealous of. He is here   \n"+
       "to make sure that no one gets into any trouble.\n");
    elf -> set_al(1000); /* what a nice guy */
    elf -> set_race("elf");
    elf -> set_wander(75, 120);
    elf -> add_spell_immunity("charm");
    elf -> add_spell_immunity("fire");
    elf -> set_gender(1);
    elf -> load_chat(10, ({ "Earothas says: Move along quietly then.\n",
       "Earothas asks: What are you doing here, fair stranger?\n",
       "Earothas polishes his longsword.\n",
       "Earothas polishes his breastplate.\n",
       "Earothas watches your movements closely.\n",
       "Earothas says: Make no trouble while you stay in Tempus.\n",
       "Earothas says: Hello fair traveller.\n",
    }));
    elf -> load_a_chat(8,({
       "Earothas exclaims: Foul beast!\n",
       "Earothas frowns.\n",
       "Earothas you dare make me an enemy!\n",
       "Earothas says: You shall die, pittiful beast.\n",
       "Earothas defends against your blow.\n",
       "Earothas deflects your blow.\n",
       "Earothas parries your attack.\n",
    }));
    elf -> add_class("mage");
    elf -> add_class("fighter");
    elf -> load_spells(20,({ 
       "fire shield", "burning hands", "comet", "chill touch", 
       "ice storm", "stoneskin", "chain lightning", "death spell",
       "hold person", "pws", "pwk", "meteor swarm",
    }));
    elf -> set_level(30);
    elf -> set_hp(2500);
    elf -> add_money(100 + random(500));
    elf -> set_magic_resist(25 + random(50));
    elf -> set_heart_ob(this_object());
    move_object(elf, this_object());
  }
  make_items(arg);
  if(arg) return;
  set_short("Market Street");
  set_long(
     "\tMarket Street\n"+
     "Fine grey cobblestones line the way up and down the long \n"+
     "busy market street; a place where all kinds of business  \n"+
     "takes place.  The wall of the city gardens opens at its  \n"+
     "east gate here, and the city inn stands to the east.     \n");

  set_night_desc(
     "The light from the inn shines down on the grey cobblestones \n"+
     "highlighting their excelent workmanship.\n");
  set_day_desc(
     "The street is still a little messy from last nights drinking.\n");
 
  set_night_items(({
     "light",
          "A light from one of the inn's windows",
     "window",
          "There is a woman at the window, peering out into the street",
     "woman",
          "She is very beautiful",
  }));
  set_day_items(({
     "mess",
          "A few bottles lie on the street, waiting to be cleaned up",
  }));
  set_items(({
     "cobblestone#cobblestones",
          "The cobblestones are excelently chiseled, possibly from \n"+
          "the dwarvish mines to the far north",
     "wall",
          "The walls to the city gardens are to the west",
     "inn",
          "Skandles Downfall; the city inn",
  }));
  set_weather(1,1,0);
  set_exits(({
     "room/city/market3",        "north",
     "room/city/market5",        "south",
     "room/city/garden/e_gate",  "west",
  }));
}


void monster_heart_beat() {
  int i;
  object *bandit;
  string tmp1, tmp2;

  if(!sscanf(file_name(environment(find_living("earothas"))),
    "%sroom/city%s", tmp1, tmp2)) {
    tell_room(environment(find_living("earothas")),
	"Earothas begins chanting in an ancient language...\n"+
	"Earothas vanishes with a pop!\n");
    move_object(find_living("earothas"), this_object());
    tell_room(environment(find_living("earothas")),
	"Earothas appears in a puff of smoke!\n");
  }


  bandit = all_inventory(environment(elf));
  for(i=0; i<sizeof(bandit); i++) { /* this will be a little NPC combat fun */
    if(bandit[i]->id("orc") && 
       living(bandit[i])    &&
       bandit[i]->query_class("thief") &&  /* snicker */
       bandit[i]->query_level() > 5) {
      if(!bandit[i]->add_secondary_attacker(elf))
        bandit[i]->hit_player(10);
      if(!random(5))
        tell_room(environment(elf),
          "Earothas exclaims: Putrid orc!\n"); /* he hates orcs */
    }

    if(bandit[i])
    if(bandit[i] -> query_alignment() < -50) {
    if(!random(4))
        tell_room(environment(elf), "Earothas exclaims: Evil scum!\n");
      if(bandit[i]->query_level() > 5)
        bandit[i] -> hit_player(random(5)); /* ouch! */
    }

    if(bandit[i]) /* just in case it is now dead or something */
    if(bandit[i] ->id("corpse")) {
      tell_room(environment(elf), "Earothas takes the corpse.\n");
      move_object(bandit[i], elf);
    }
  }
}

void make_items(status arg) {
  object obj, obj2;
  
  if(arg) return;
  if(!present("sword"), find_living("earothas"))
    move_object(clone_object("room/city/obj/lsword"),find_living("earothas"));
  if(!present("platemail"), find_living("earothas"))
    move_object(clone_object("room/city/obj/plate"),find_living("earothas"));
  if(!present("shield"),find_living("earothas")) {
    obj = clone_object(ARMOUR);
    obj -> set_name("shield");
    obj -> set_type("shield");
    obj -> set_ac(2); /* because he is so tough */
    obj -> set_weight(2);
    obj -> set_value(600);
    obj -> set_short("A silver shield");
    obj -> set_long(
               "This shield bears elvish designs across its middle.\n"+
               "The crest on the front is the design of the Tempus \n"+
               "city guards.");
    move_object(obj,elf);
  }

  find_living("earothas")->init_command("wear platemail");
  find_living("earothas")->init_command("wear shield");
  find_living("earothas")->init_command("wield sword");

  elf -> set_wc(30);
  elf -> set_ac(20);
}