// ****************************************************************************
//
// Logic 88: Coastal Hounfour
//
// ****************************************************************************

#include "defines.txt"
#define houngan o1
#define priestess1 o2
#define priestess2 o3

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 == 5) {
//   position(ego,12,140);
// }

  position(ego,72,139);

  animate.obj(houngan);
  load.view(110);
  set.view(houngan,110);
  position(houngan, 72, 103);
  draw(houngan);

  animate.obj(priestess1);
  animate.obj(priestess2);
  load.view(106);
  set.view(priestess1,106);
  set.view(priestess2,106);
  position(priestess1,48,87);
  position(priestess2,104,87);
  set.loop(priestess1,2);
  set.loop(priestess2,2);
  draw(priestess1);
  draw(priestess2);

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

  index = 0;

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


    if ((said("look") ||
         said("look","hounfour"))) {
              print("You are in the village hounfour.  In the center is a post, called a poto mitain.  Ve-ve's, intricate patterns used to invoke the different loa, voodoo gods, are drawn in white powder on the floor.  Coastal Village's main houngan is here to advise.");
              }

if (said("look","post")) {
    print("The poto mitain is the center of the hounfour temple.");
    }

if ((said("look","ground") ||
     said("look","ve ve"))) {
          print("It looks like a veve for Erzuli.");
          }

if ((said("look","woman") ||
     said("look","mambo"))) {
         print("These are mambo, Voodoo priestesses.");
         }


    if ((said("talk") ||
         said("talk","man") ||
         said("talk","houngan"))) {
              if (!has("voodoo doll") &&
                  !has("mangy doll") &&
                  twinkie) {
              print("Houngan: \"Oh!  I seem to have lost my precious Voodoo doll in the caverns while I was looking for some blue mushroom!\"");
              set(doll_flag);
               }
              else {
                  if (!has("dream brew")) {
                      print("Houngan: \"Dream brew?  I believe you need some sleep moss to make one of those.\"");
                      }
                  else {
                    if (index == 3) {
                      index = 0;
                      }
                    if (index == 0) {
                      print("Houngan: \"That Mama Hoodoo is really strange.\"");
                      print("Houngan: \"And she doesn't use any mojos I've ever heard of...\"");
                      print("Houngan: \"In fact, I've never seen her do voodoo.\"");
                      print("VG: \"Who do?\"");
                      print("Houngan: \"Hoodoo.\"");
                      }
                    if (index == 1) {
                      print("VG: \"You seem to be holding some kind of ceremony.\"");
                      print("Houngan: \"An old woman has recently passed away.  We are holding this ceremony in honor of her, and to aid her gros-bon-ange in the afterlife.\"");
                      print("VG: \"Her gross bone what?\"");
                      print("Houngan: \"Roughly speaking, her soul.  Gros-bon-ange means \'great good angel\'.\"");
                      }
                    if (index == 2) {
                      print("VG: \"So, doing the Voodoo, huh?\"");
                      print("Houngan: \"Hahaha...  you are too irreverant for your own good, little girl.\"");
                      print("VG: \"Aw, I'm just teasing.\"");
                      print("Houngan: \"Yes, but Voodoo can be very powerful.  The loa may mount you, someday, and that is a powerful thing.\"");
                      print("VG: \"Mounted?  Like they'll fill me with sawdust and put me on the wall?\"");
                      print("Houngan: \"No, I mean that a loa may put itself in your body and ride you as if you were its horse.\"");
                      print("VG: \"Eep!\"");
                      }
                    index++;
                    }
                }
              }

    if (said("talk","woman")) {
        print("Leave them be!  They're dancing.  Song and dance are very important to Voodoo.");
        }

    if ((said("look","man") ||
         said("look","houngan"))) {
              print("He's a rather kindly-looking man.  Nothing at all like Mama Hoodoo.");
              }

    if ((said("give","doll") ||
         said("give","doll","man") ||
         said("give","doll","houngan"))) {
              if (has("voodoo doll")) {
                  if (has("lollipop")) {
                      print("Houngan: \"That's all right.  I told you that you could keep the doll.\"");
                      }
                      else {
                          print("Houngan: \"You found the doll?  Oh, I just went ahead and made another one.  But thank you!\"");
                          print("Houngan: \"Here, take this lollipop as a reward.\"");
                          score+=3;
                          get("lollipop");
                          }
                       }
                     else {
                         print("No, remember you don't have one.");
                         }
                       }



if (ego_touching_signal_line) {
    new.room(29);
    }

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

return();