// ****************************************************************************
//
// Logic 66: Nursie's Station
//
// ****************************************************************************

#include "defines.txt"
#define nursie o1

if (new_room) {
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(37);

// Check what room the player came from and position them on the
// screen accordingly here, e.g:
if (prev_room_no == 65) {
   position(ego,29,89);
 }

if (prev_room_no == 107) {
   position(ego,116,140);
   }

if (!open_office) {
    animate.obj(nursie);
    load.view(124);
    set.view(nursie, 124);
    position(nursie,80,80);
    draw(nursie);
    }

  timer1_a = 0;

  draw(ego);
  show.pic();
}

if (prev_room_no == 65 &&
    !open_office) {
        print("Nursie: \"Who are YOU?!\"");
        print("VG: \"I'm Voo--\"");
        print("Nursie: \"This is my PRIVATE office!\"");
        print("VG: \"I'm here to free the--\"");
        print("Nursie: \"GET OUT!!!\"");
        ego_dir = 7;
        new.room(65);
        }

if (said("look")) {
  print("This is Nursie's room.");
  print("You see a desk, a shelf, a door, and a vent.");

}

if ((said("look","shelf") ||
     said("look","medicine"))) {
    print("There are quite a few bottles of pills and medicine.  Zoloft, Thorazine, and Dervocet...");
    print("Remember Kids:  Never take medicine that hasn't been prescribed to you by a physician or psychiatrist.");
    }

if (said("look","desk")) {
    print("Ah, this is the Nurse's desk.  It's rather tidy except for the greasy outline of a lunch tray.");
      if ((food_puzzle == 1 ||
           food_puzzle == 2)) {
             print("Sitting within the outline is a greasy food tray.");
             }
    }

if (said("look","thorazine")) {
    if (has("thorazine")) {
        show.obj(thorazine);
        }
    else {
        print("Thorazine is an anti-psychotic.  It is a rather powerful sedative, too.");
        }
    }

if ((said("look","zoloft") ||
     said("look","dervocet") ||
     said("get","zoloft") ||
     said("get","dervocet"))) {
          print("You don't really want these.  They won't help you out, and Mama Hoodoo didn't ask for them, anyway.");
          }

if ((said("look","food") ||
     said("look","tray") ||
     said("look","food","tray"))) {
          if (food_puzzle == 0) {
              if (has("food tray")) {
                  show.obj(food_tray);
                  }
              else {
                  print("You don't have one.");
                  }
              }
          if (food_puzzle == 1) {
              print("Yes, greasy, nasty institutional food.");
              }
          if (food_puzzle == 2) {
              print("Yes, DRUGGED, greasy, nasty institutional food.");
              }
          }

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, 105, 133, 132, 144)) {
      if (food_puzzle == 2) {
         reset(open_office);
       }
    new.room(107);
    }
    else {
       print("What?!  From here?  I imagine you'll just throw yourself across the room, then?");
       }
    }

if (said("get","thorazine")) {
    if (obj.in.box(ego, 40,125,80,136)) {
       if (!has("thorazine")) {
        print("You take the little bottle of thorazine.");
        score+=2;
        get("thorazine");
        }
       else {
          print("Don't be greedy.  Leave some for everyone else.");
          }
    }
    else {
         print("Your arms...  they are too short.");
         }
    }

if ((said("put","food","tray","desk") ||
     said("put","food","desk") ||
     said("put","tray","desk") ||
     said("put","food","tray","on","desk") ||
     said("put","food","on","desk") ||
     said("put","tray","on","desk"))) {
    if (has("food tray")) {
        if (obj.in.box(ego,63,71,118,99)) {
            load.view(food_Tray);
            add.to.pic(food_tray,0,0,85,75,9,9);
            drop("food tray");
            print("Ding!  Dinner is served.");
            food_puzzle=1;
            }
        else {
            print("You don't feel like throwing food across the room.");
            }
    }
    else {
        print("You have no food tray.");
        }
    }

if ((said("put","thorazine","food") ||
    said("put","thorazine","on","food") ||
    said("use","thorazine","food") ||
    said("use","thorazine","on","food"))) {
    if (has("thorazine")) {
      if (obj.in.box(ego,63,71,118,99)) {
        if (food_puzzle == 1) {
            print("Hmmm, you briefly ponder the moral conflicts involved in drugging someone's food.");
            print("But that passes.");
            food_puzzle = 2;
            }
        else {
            if (has("food tray")) {
                print("Good idea, you think, but maybe you should set the tray down first.");
                }
            else {
                 print("You just have no idea, do you?");
                 }
              }
         }
        else {
            print("If only thorazine made your arms longer...");
            }
    }
    else {
        print("No can do.  You don't have the stuff.");
        }
    }

if (food_puzzle == 2) {
    if (timer1_a == 50) {
        print("QUICK!!!  You hear someone outside!!!");
        }
    if (timer1_a == 150) {
        print("Nursie came in and devoured you, leaving nothing behind.");
        death_type = 1;
        }
    else {
        timer1_a++;
        }
    }


if (ego_touching_signal_line) {
    if (open_office &&
        food_puzzle < 4) {
           print("Eek!  Not that way!  Nursie's out THAT WAY!");
           ego_dir = 3;
           }
    else {
       new.room(65);
       }
    }


return();