// ****************************************************************************
//
// Logic 56: Crazy Clyde's Room
//
// ****************************************************************************

#include "defines.txt"

if (new_room) {
  universe=54;
  load.pic(universe);
  draw.pic(universe);
  discard.pic(universe);
  set.horizon(37);

  if (prev_room_no==59) {
   position(ego,74,120);
   ego_dir=0;
   }

 if (prev_room_no == 107) {
    position(ego,75,56);
    }

 if (!inmate4) {
  animate.obj(o1);
  load.view(116);
  load.view(120);
  set.view(o1,116);
  position(o1,70,80);
  draw(o1);
  }
  draw(ego);
  show.pic();

  load.sound(35);
  sound(35, sound_flag);
}

if (said("look")) {
  print("You are in another padded room.");
  if (!inmate4) {
      print("Yet another grinning madman is here.");
      }
}

if (said("look","wall"))
     {
          print("It is covered with some soft padding.  The padding is stained with age, cold sweat, and hospital food.  There is a vent attached to the wall.");
          }

if (said("look","floor")) {
    print("It is covered with some soft padding.  The padding is stained with age, cold sweat, and hospital food.");
    }

if (said("look","ceiling")) {
    print("Wow, even the ceilings are padded.  What kind of people are committed here?");
    }

if (said("look","vent")) {
    print("There's a stale draft blowing from the vent.  The screws are loose.");
    }

if (said("attack","vent")) {
    print("The cover just slips off.  There's no need to break it.");
    }

if ((said("take","vent") ||
     said("remove","vent"))) {
    print("Three of the screws are loose, but the fourth is still in place.  Moreover, it's a left-handed womple drive, which is impossible to get on Voodoo Island.");
    print("You can probably just open it and climb through.");
    }

if ((said("enter","vent") ||
     said("use","vent") ||
     said("climb","vent") ||
     said("open","vent") ||
     said("get","vent"))) {
    if (obj.in.box(ego, 67, 56, 88, 66)) {
        new.room(107);
        }
    else {
        print("What?!  Are you going to hurl yourself across the room?");
        }
    }



if (said("talk","man")) {
    if (!inmate4) {
        print("Inmate: \"Hi, what's your name?\"");
        print("VG: \"Voodoo Girl, what's your's?\"");
        print("Inmate: \"I'm Clyde, but Nursie calls me Crazy Clyde.\"");
        print("VG: \"That's not very nice.\"");
        print("Inmate: \"Now that you mention it...  it's not, is it?\"");
        }
    else {
        print("Any longer in here, and you'll be a resident, won't you?");
        }
    }

if (said("look","straitjacket")) {
    if (!inmate4) {
       print("This one seems simple enough.  There's just a lock on it.");
    }
    else {
       print("Crazy...");
       print("Crazy for feeling so lonely.");
       }
  }

if ((said("unlock","straitjacket") ||
     said("use","key","rol"))) {
   if (!inmate4) {
    distance(ego, o1, range);
    if (range <= 10) {
      if (has("jacket key")) {
        print("Inmate: \"Well, thanks, now I can go cause some trouble for you.\"");
        set.view(o1,120);
        move.obj(o1,74,120,1,done_flag);
        set(inmate4);
        escaped++;
        }
      else {
       print("Inmate: \"Darnit, there's a key for this thing somewhere...  I had stolen it, but I lost it when I was getting my medication...\"");
       }
      }
    else {
       print("It's okay to get close to him.  He won't bite...  at least you don't think so.");
       }
   }
   else {
       print("Crazy...");
       print("Crazy for feeling so lonely...");
       }
   }

if (done_flag) {
    reset(done_flag);
    erase(o1);
    }

if (ego_touching_signal_line) { //ego at the door
    new.room(59);
    }

if (sound_flag){
    sound(35, sound_flag);
    }
    

call(205);
return();