/
lib/banish/
lib/d/
lib/doc/
lib/doc/domains/
lib/doc/efun/
lib/doc/examples/
lib/doc/examples/armour/
lib/doc/examples/contain/
lib/doc/examples/food/
lib/doc/examples/magic/
lib/doc/examples/monster/
lib/doc/examples/room/
lib/doc/examples/weapons/
lib/function/
lib/include/
lib/include/fn_specs/
lib/include/skills/
lib/info/
lib/inherit/base/
lib/log/
lib/manuals/312/
lib/news/
lib/obj/party/
lib/objects/components/
lib/open/
lib/open/library/
lib/open/party/
lib/players/
lib/players/zilanthius/
lib/room/
lib/room/city/arena/
lib/room/city/creator/
lib/room/city/garden/monst/
lib/room/city/obj/
lib/room/city/shop/
lib/room/death/
lib/room/registry/
lib/secure/
lib/secure/UDP_CMD_DIR/
lib/skills/
lib/skills/fighter/
lib/skills/thief/
lib/usr/
lib/usr/creators/
lib/usr/players/
#include <mudlib.h>
#define NAME (string)this_player()->query_name()

inherit ROOM;
status magpie();
void monster_died();

void reset(status arg) {
  if(arg) return;

  set_short("the city garden");
  set_long(
     "The cobblestone pathway winds its way through the bushland \n"+
     "garden past some spider orchids growing on the bark of a  \n"+
     "few mountain ash trees. Some black and white birds perch  \n"+
     "high on a branch above you, watching your movements.\n");

  set_day_desc(
     "The sunlight beams down on you from on high, peeking through the \n"+
     "white fluffy clouds.\n");
  set_night_desc(
     "The moon stares down at you as dark sinister clouds pass by.\n");

  set_listen("Mapgies caw noisily.\n");
  set_smell("There is the strong smell of eucalyptus here.\n");

  set_items(({
     "branches#branch#above",
          "There seems to be a nest in one of the branches",
     "nest",
          "This must be what the magpies are protecting. Surely \n"+
          "they would attack anyone who attempted to take it",
     "bird#birds",
          "The birds are australian magpies. Beware, for   \n"+
          "they may swoop down and attack you at any moment",
     "path#cobblestone path#cobblestones#cobblestone",
          "A well travelled cobblestone path",
     "tree#gum tree#ghost-gum#gum",
          "This tree's trunk is a light grey, almost white colour. Atop \n"+
          "the tree is some movement amid the leaves",
     "ash#mountain ash",
          "A tall grey eucalypt; one of the largest "+
          "types of trees in the world",
     "orchid#spider orchid",
          "A long black-orange flower sways in the breeze that blows \n"+
          "through the leaves of the trees. The orchid seems to be   \n"+
          "growing on the trees themselves",
  }));
  set_day_items(({
     "sunlight#sun#light",
          "Do you want to go blind?",
     "cloud#clouds",
          "They are white and fluffy. One reminds you of an echidna",
  }));

  set_night_items(({
     "moon",
          "You can see the man in the moon. He \n"+
          "appears to be grinning an evil grin at you",
     "cloud#clouds",
          "They look dark and sinister...and very spooky",
  }));
  set_exits(({
     "room/city/garden/garden7", "north",
     "room/city/garden/garden1", "south",
     "room/city/garden/garden5", "east",
  }));
  set_weather(1,4,0);
}

void init() {
  ::init();
  if(!random(10) && !present("magpie")) call_out("magpie", 1);
}

void magpie() {
  object obj;

  say("A mapgie swoops down from the tree top and attacks "+NAME+".\n",
     this_player());
  tell_object(this_player(), 
     "A magpie swoops down from the tree tops and attacks you.\n");
  obj = clone_object(MONSTER);
  obj -> set_name("magpie");
  obj -> set_race("bird");
  obj -> set_short("An angry magpie");
  obj -> set_long(
          "The mapgie is a black and white bird, as large as a crow, \n"+
          "with a sharp black beak and a mean attitude. It is here   \n"+
          "protecting its young from passers by.\n");
  obj -> load_a_chat(10,({ "Magpie caws loudly.\n",
           "Magpie swoops around.\n",
           "Magpie dives toward you.\n",
           "Mapgie hisses at you.\n",
           "Mapgie caws angrily.\n",
           "Magpie flaps it wings.\n",
         }));
  obj -> set_level(2);
  obj -> set_ac(3);
  obj -> set_wc(6);
  obj -> set_hp(60);
  obj -> set_gender(2);
  obj -> set_attack_msg(({
          "buffets",          "softly, with her wings",
          "pecks",            "lightly, with her beak",
          "pecks",            "with her beak",
          "rakes",            "with her claws",
          "buffets",          "menacingly with her wings",
          "smashes",          "with her beak",
          "crunches",         "with her beak",
  }));
  obj -> set_dead_ob(this_object());
  move_object(obj, this_object());
  obj -> add_secondary_attacker(this_player());
}

void monster_died() {
  object egg;

  tell_room(this_object(),
     "As the magpie dies, her egg falls from the nest above...\n");

  egg = clone_object(FOOD);
  egg -> set_name("egg");
  egg -> set_short("A magpie egg");
  egg -> set_long(
          "The egg is white with spotts and speckles.\n"+
          "I wouldn't eat it if I were you.\n");
  egg -> set_room_msg(
          "@@query_name:$this_player()$@@ eates the mapgies egg.\n"+
          "@@query_name:$this_player()$@@ turns a sickly shade of green.\n");
  egg -> set_consumer_msg(
          "I warned you...you start to feel very ill.\n"+
          "That'll teach you for eating live magpie young.\n"); /* eewww! */
  egg -> set_strength(2);
  move_object(egg, this_object());
}