//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//  Logic 201:  Swimming and drowning
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#include "defines.txt"

display(20,5,m1);


if ((said("look","fish") ||
     said("look","shark"))) {
          print("Crikey!  Through the clear water you see the thrashing forms of pale, blue sharks.  There is little food here in the deeps, and you can be sure that a tid bit like you would be a welcome snack.");
          }

if (said("swim")) {
    print("You're already swimming...  just use the directional keys to move yourself about.");
    }

if ((said("get","air") ||
     said("get","breath") ||
     said("breathe"))) {
          print("To get a breath, look for somewhere you can swim up to an air pocket and push up.");
          }


if (ego_on_water) {
  if (timer1_a>0) {    //running out of air
    timer1_a--;
    }
    else {
       timer1_a=25;
       timer1_b--;
       }

  if (timer1_b == 0 ) {
      print("You run out of air...  Your lungs take in one last breath, filling your chest with icy cold water...  This looks like the end.");
      new.room(204);
      }
}

if (ego_touching_signal_line) {
    if (timer1_a<25) { //recovering breath
        timer1_a++;
        }
    if (timer1_b<40) {
        timer1_b++;
        }
    }

return();

#message 1 "AIR: %v97 "