// ****************************************************************************
//
// Logic 2: First room   Outside Voodoo Girl's Hut
//
// ****************************************************************************

#include "defines.txt"

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



  // The next 6 lines need only be in the first room of the game
  if ((prev_room_no == 1 ||    // just come from intro screen
      prev_room_no == 0)) {    // or just started game
    position(ego,62,109);
    status.line.on();
    accept.input();
    set(intro);
    program.control();
  }

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

  animate.obj(o1);
  load.view(15);
  set.view(o1,15);
  ignore.objs(o1);
  position (o1, 70,109);
  wander(o1);
  draw(o1);

  animate.obj(o2);
  load.view(15);
  set.view(o2,15);
  ignore.objs(o2);
  position (o2, 80,80);
  wander(o2);
  draw(o2);

  draw(ego);
  show.pic();

  load.sound(13);
  sound(13,sound_flag);
  reset(done_flag);
  }

if (said("look")) {
  print("Outside Voodoo Girl's hut is a clearing.  The forest wraps around.  A moss covered rock sits in the sunlight.");
}

if (said("look","hut")) {
  print("You remember when you built this hut...");
  print("That is to say you remember when you turned a carpenter into a zombie and forced him to build this hut.");
  }

if (said("look","rock")) {
   print("Some sort of moss is growing on the shady, damp side of this rock.");
   }

if (said("look","forest")) {
   print("Your humble home is surrounded by gorgeous mahogany trees.");
   }

if (said("look","moss")) {
  if (!has("sleep moss")){
     print("This is a rare form of moss called sleep moss.");
     }
  else {
     show.obj(sleep_moss_); //sleep moss
     }
  }

if (said("take","rock")) {
    print("Oh, no.  It's way too heavy.");
    }

if (said("take","moss")){
    if(obj.in.box(ego, 80, 50, 130, 75)) {
    if (sleep_moss<3){
       print("You take the sleep moss and store it in your inhumanly baggy raver pants.");
       sleep_moss+=1; //sleep moss
       }
    else {
       print("You already have some.  Let the poor moss recuperate from your savage harvest.");
       }
   }
 else {
    print("Your arms are too short.");
    }
   }
if (said("look","north")) {
    print("To the north is Mama Houngan's hut.");
    }

if ((said("look","east") ||
     said("look","west") ||
     said("look","south"))) {
     print("You see mostly just mahogany trees.");
     }


if (timer1_a<50 &&
    intro) {
    timer1_a++;
    }

if (timer1_a==50 &&
    intro) {
    reset(intro);
    animate.obj(o3);
    load.view(4);
    load.view(9);
    set.view(o3,4);
    position(o3,96,109);
    universe=2;
    cycle.time(o3,universe);
    draw(o3);
//  end.of.loop(o3,done_flag);
    timer1_a=0;
    set(done_flag);
    }

if (done_flag) {
    if (timer1_b<150) {
        timer1_b++;
        }
    if (timer1_b==50) {
    set.view(o3,9);
    force.update(o3);
    }
    if (timer1_b==100) {
    print.at(m11,15,5,30);
    print.at("VG: \"With what?\"",15,5,30);
    print.at("Mama: \"I'm in the delicate last stages of a new recipe, and I can't leave it alone.\"",15,5,30);
    print.at("VG: \"So what do you need from me?\"",15,5,30);
    print.at("Mama: \"Well, I need some blowfish venom...\"",15,5,30);
    print.at("VG: \"Okay.\"",15,5,30);
    print.at("Mama: \"...  some yellow grave mold...\"",15,5,30);
    print.at("VG: \"No problem.\"",15,5,30);
    print.at("Mama: \"...  A coconut, an eye of newt, some Thorazine... \"",15,5,30);
    print.at("VG: \"Aaaaugh!  What else?!\"",15,5,30);
    print.at("Mama: \"Oh yeah, and the mythical Golden Cauldron, said to be located in the Land of Dreams.\"",15,5,30);
    print.at("VG: \"All those things just MANAGED to slip your mind, huh?\"",15,5,30);
    print.at("Mama: \"I just got excited about my new recipe.  Now be a good girl and get me my supplies or I'll have your head shrunk.\"",15,5,30);
    print.at("VG: \"I'm on it.\"",15,5,30);
    player.control();
    }
    if (timer1_b==101) {
    set.view(o3,4);
    force.update(o3);
    }
    if (timer1_b==150) {
    erase(o3);
    reset(done_flag);
    }
}

if (ego_edge_code == horizon_edge) {  // ego touching horizon
  new.room(3);
}

if (ego_touching_signal_line) {    // ego in Voodoo Girl's door
  new.room(5);
}

if (sound_flag) {

    sound(13,sound_flag);

    }


return();

#message 11 "Mama: \"Voodoo Girl!  I hate to admit it, but I need your help!\""