// ****************************************************************************
//
// Logic 68: The Somewhat moist Steps of Doom
//
// ****************************************************************************

#include "defines.txt"

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 == 71) {
   position(ego,40,160);
 }
  load.view(0);
  load.view(3);

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


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

if (said("look")) {
  print("This cave has an exit to the left and a set of stairs leading into the water.");
}

if (said("look","wall")) {
    print("These walls are carved from the living rock of the earth.");
    }

if (said("look","water")) {
    print("The water looks cool and relatively still.");
    }

if (said("look","stairs")) {
    print("A small set of stairs has been carved from the rock, leading into the water.");
    }

if ((said("jump") ||
     said("jump","water"))) {
          print("No diving from poolside");
          }

if ((said("get","water") ||
     said("drink","water"))) {
          print("You're already weighed down by all of your inventory, you don't need to fill your belly with cold water before trying to swim.");
          }

if ((said("climb","stairs") ||
     said("climb","anyword","stairs"))) {
          print("Although they are slippery, it is enough to use your directional arrows to walk up and down them.");
          }


if (ego_on_water) {
    set.view(ego,3);
    set(always_animate_ego);
    }
    else {
    set.view(ego,0);
    reset(always_animate_ego);
    }

if (said("swim")) {
    if (ego_on_water) {
        print("You dive into the murky depths below.");
        timer1_a=25; //breath
        timer1_b=40;
        new.room(71);

        }
    else {
        print("No diving from poolside!");
        }
    }

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

return();