/
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 "path.h"
#include "library.h"
inherit "/std/object";

setup()
{
   set_name("towel");
   set_short("towel");
   add_adjective("beach");
   add_adjective("large");
   set_long("A large beach-towel, suitable for sunbathing on.\n");
   set_weight(20);
   set_value(200);
}

void init()
{
add_action("do_sunbathe", "sunbathe", 1);
   ::init();
}

do_sunbathe()
{
   if (!environment(this_player())->query_property("beach"))
      {
      notify_fail("Thsi isn't a beach. You can't sunbathe here!\n");
      return 0;
   }
   if ("/obj/handlers/weather"->cloud_index(environment(this_player())) >50)
      {
      notify_fail("It is too dull to sunbathe right now.\n");
      return 0;
   }
   if ("/obj/handlers/weather"->cold_index(environment(this_player())) > 0)
      {
      notify_fail("It is too cold to sunbathe right now.\n");
      return 0;
   }
   write("You strip off, spread the towel on the sand, and lie on it.\n");
   say(this_player()->query_cap_name() +
      " strips off, lays a large towel on the gound, and lies on it.\n");
   call_out("do_sizzle1", 5);
   return 1;
}

do_sizzle1()
{
   write("The sun beats down on you.\n");
   call_out("do_sizzle2", 5);
}

do_sizzle2()
{
   write("You feel your skin tanning nicely.\n");
   call_out("do_sizzle3", 5);
}

do_sizzle3()
{
if(LIBRARY->query_quest_done( this_player()->query_name(), "sunbathing") )
{
   write("Ouch, seems as if you have spent to much time sunbathing! "
+"Your skin is now peeling and flaking painfully.\n");
  this_player()->adjust_hp(-random(100));
  return;
}
   write("Congratulations, you now have a nice sun-tan!\n");
   this_player()->add_property( "tanned", 1 );
   LIBRARY->set_quest(this_player()->query_name(), "sunbathing");
this_player()->adjust_xp(5000);
}