// ****************************************************************************
//
// Logic 5: Inside Voodoo Girl's Hut
//
// ****************************************************************************

#include "defines.txt"

if (new_room) {

      load.pic(room_no);
      draw.pic(room_no);
      discard.pic(room_no);
      if (prev_room_no == 2) {
      position(ego,71,162);
      move.obj(ego,71,140,2,more_done_flag);
      }

      cycle_delay=1;

       if ((prev_room_no == 204 ||
            prev_room_no == 64)) {
      position(ego,80,100);
      ego_dir=0;
      }

      draw(ego);
      show.pic();


  if (cauldron_on_stove){
    animate.obj(o1);
    load.view(cauldron);
    set.view(o1,cauldron);
    position(o1, 48,86);
    draw(o1);
    }

  load.sound(15);
  sound(15, sound_flag);

  reset(done_flag);
}



if (said("look")) {
  print("This is your apartment, kitchen, and top secret hoodoo lab.");
  print("The stove's on the left.  Next to it is the bookcase, beside the TV, and your bed on the far right.");
  if (!cauldron_on_stove){
     print("It looks as if troublesome spirits have stolen your cauldron!");
     }
  }



    if((said("read") ||
        said("read","book") ||
        said("look","book") ||
        said("look","bookcase")))
       {
     move.obj(ego,66,85,2,another_done_flag);
    }

    if(another_done_flag){
        //Cookbook
       reset(another_done_flag);
       print("A Beginner's Guide to Witchcraft, Hoodoo, and Rootworking:");
       print("by Loa Legba, PhD.");
       if (!has("cauldron") &&
           !cauldron_on_stove) {
          print("STEP ONE:  Get an iron cauldron.");
          }
       if (!has("sleep moss") && !has("poison")){
          print("STEP TWO:  Gather your ingredients from the plants and fungi that grow around you.");
          }
       if (!cauldron_on_stove){
          print("STEP THREE:  Go home and put the cauldron on your stove.");
          }
       else{
          print("LASTLY:  Go to the stove and type \"make potion\" to go to the potion-making screen.");
          print("Select the ingredient(s) you want to use to make your potion.  Then select the MAKE button.");
          }
       }

if (said("look","stove")) {
         print("It's a General Eclectic Bake-O-Matic.");
         if (!cauldron_on_stove) {
             print("Hey!  Where's your cauldron?!  You can't make any potions without your cauldron.");
             }
         }

if (said("look","bed")) {

         print("So soft...");
         print("So warm...");
         print("Too bad you can't sleep right now.");

     }

if (said("look","under","bed")) {
 if (golden_caul == 7) {
         print("HEY!  It's the final piece of the Golden Cauldron!");
         print("You knock off some dust bunnies and wipe off some unidentified viscous substance.");
         score++;
         golden_caul++;
         }
     else {
         print("Omigosh!!!  Years worth of accreted dust bunnies, ramen noodles, and assorted garbage have established their own primitive ecosystem down here!");
         }
     }

if ((said("use","bed") ||
     said("sleep","on","bed") ||
     said("sleep","bed") ||
     said("sleep"))) {
         print("As tempting as a good nap may be, you have better work to do.");
         }

if ((said("use","cauldron") ||
     said("use","cauldron","anyword","stove") ||
     said("put","cauldron","anyword","stove") ||
     said("use","stove"))) {
      if (cauldron_on_stove) {
         move.obj(ego,60,111,2,done_flag);

         }
       else {
         if (has("cauldron")) {
          move.obj(ego,60,111,2,really_done_flag);

          }
         else {
           print("You can't use it, because you don't have a cauldron.");
           }
     }
}

if ((said("make","potion") ||
     said("cook","potion") ||
     said("cook"))) {
     if (cauldron_on_stove) {
         move.obj(ego,60,111,2,done_flag);
          }
         else {
           print("You can't use it, because you don't have a cauldron.");
           }
      }

if (really_done_flag) {
          drop("cauldron");
          set(cauldron_on_stove);
          reset(really_done_flag);
          new.room(5);
          }

  if (done_flag) {
            reset(done_flag);
            new.room(31);
            }

if ((said("watch","tv") ||
     said("look","tv")  ||
     said("use","tv") ||
     said("turn","on","tv"))) {
     move.obj(ego,81,85,2,yet_another_done_flag);
     }

if (yet_another_done_flag) {
    reset(yet_another_done_flag);
    new.room(32);
    }

if ((said("drink","dream brew") ||
     said("use","dream brew"))) {
    if (has("dream brew")) {
        move.obj(ego,84,101,1,penultimate_done_flag);
        }
    else {
        print("You haven't made one yet.");
        }
    }

if (penultimate_done_flag) {
        print("You take a tiny sip of the brew and fall asleep.");
        reset(penultimate_done_flag);
        new.room(204);
    }

if ((said("put","mangy doll","on","stove") || //Still trying to kill Twinkie-Dinkie
     said("use","stove","on","mangy doll") ||
     said("put","doll","on","stove") ||
     said("use","stove","on","doll"))) {
          print("According to the statutes governing children's merchandise, Twinkie Dinkie is class A flame retardant.");
          }

if ((said("drink","golden dream brew") ||
     said("use","golden dream brew"))) {
   if (has("golden brew")) {
    print("The instant you taste the bitter brew, you are shot straight out of your body.");
    new.room(86);
    }
   else {
      print("You lack a golden brew.");
      }
    }

if (said("open","stove")) {
    print("The last time you saw the inside of your stove was the Great Frozen Pizza Fire of '99.  Enough tears have been shed, already.");
    }

if (ego_edge_code == bottom_edge) {
    new.room(2);
    }

return();