inherit "players/cashimor/inherit/hostile";
#include "/players/cashimor/include/float.h"
#include "/players/cashimor/include/extinguish.h" // changed moonchild no ;'s

void reset(int arg)
{
  object *inv;
  int i, sz;

  inv = all_inventory(this_object());

  if ( ( sz = sizeof(inv)) > 6)
  {
    for (i=0;i<sz;i++)
    {
      if (!living(inv[i]))                  
      {
       tell_room(this_object(),
       inv[i]->short()+" disappears in the sandy bottom.\n");
       destruct(inv[i]);
     }
   }
  }
  if(!arg) {
    timer=20;
    damage=0;
    survivor="allows_breathing";
    envname="water";
    saymsg="seems to be unable to breathe.";
    wrtmsg = "Bulp..";
  }
  float_down();
  ::reset(); /* Galadriel 121293: needed for clone_list */
}

init() {
  ::init();
  if(!nodanger) extinguish();
  add_action("take_breath","take");
}

take_breath(str) {
object air;
  if(!str) {
    notify_fail("Take what?\n");
    return 0;
  }
  if((str!="breath")&&(str!="breath of air")) {
    notify_fail("Take what?\n");
    return 0;
  }
  if(present("breath_of_air",this_player())) {
    write("You already have your lungs full!\n");
    return 1;
  }
  if(!nodanger) {
    write("That would be very stupid!\n");
    return 1;
  }
  air=clone_object("players/cashimor/objects/breath");
  transfer(air,this_player());
  write("You take a big breath of air.\n");
  say(this_player()->query_name()+" takes a big breath of air.\n");
  return 1;
}
