// ****************************************************************************
//
// Logic 12: Cave Entrance
//
// ****************************************************************************

#include "defines.txt"

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



 if (prev_room_no == 13) {
   position(ego,93,80);
 }

  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);

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

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

if (said("look")) {
  print("On the north cliff face is the entrance to the Incredibly Twisty Maze-Like Cave.");
  print("To the west is the river crossing, and to the south is a trail.");
}

if (said("look","cliff")) {
    print("You've begun to notice a preponderance of cliffs in this game.");
    }

if (said("look","cave")) {
    print("An incredibly twisty draft blows out from the Incredibly Twisty Maze-Like Cave.");
    print("You'd better get some paper and pencil to make a map if you go in there.");
    }

if (said("look","rock")) {
    print("Yes...  rock.");
    }

if (ego_edge_code == left_edge) {  // ego touching left edge
  new.room(10);
}

if (ego_touching_signal_line) {
    index=35;
    call(14);
    new.room(13);
    }

if (ego_edge_code == bottom_edge) {    // ego touching bottom edge of screen
  new.room(16);
}



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

return();