
#include "defines.txt"

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

  show.pic();

  if(v1==15) {
   position(ego,83,33);
   draw(ego);
  }

  animate.obj(o1);
  load.view(21);
  set.view(o1,21);
  set.loop(o1,0);
  set.cel(o1,0);
  position(o1,75,70);
  ignore.objs(o1);
  stop.cycling(o1);
  draw(o1);

}


if (said("look")) {
  print("This is another section of the rock formation floating in this strange parallel universe.");
  print("A weird, flat, altar-like rock is present here, as well as a little puddle of something-or-other.");
}

if ((said("look","altar") ||
     said("look","altar","altar"))) {
  print("It's big and hard with a flat top.");
  if(isset(f33)) {
    print("Some litter lout seems to have placed a skull on top.");
  }
}

if ((said("get","altar") ||
     said("get","altar","altar"))) {
  print("What, this enormous rock here that probably weighs a ton? That rock?");
}

if ((said("use","skull","altar") ||
     said("put","skull","altar") ||
     said("put","skull","altar","altar") ||
     said("use","skull","altar","altar"))) {
  if(has("Skull")) {
     if(posn(ego,75,64,91,69)) {
        set(f32);
        set.cel(o1,1);
        print("You place the skull on the flat surface, pausing only to do your Hamlet impression one last time.");
        drop("Skull");
       }
      else {
       print("Stand behind the large rock.");
      }
      }
    else {
     print("Which skull? Your own one? You're not sure you'd survive the process.");
    }
}

if ((said("use","rock","skull") ||
     said("use","skull","rock") ||
     said("crush","skull","rock") ||
     said("skull","skull","rock") ||
     said("crush","skull") ||
     said("skull","skull"))) {
      if(isset(f32)) {
        if(has("Rock")) {
          if(posn(ego,75,64,91,69)) {
            set.cel(o1,0);
            set.loop(o1,1);
            erase(ego);
            v255=2;
            cycle.time(o1,v255);
            end.of.loop(o1,f16);
          }
          else {
           print("Come a little closer!");
          }
          }
        else {
         print("What are you going to crush it with? Your bare hands are not the most powerful of tools.");
        }
        }
      else {
       print("Put your skull somewhere first.");
      }
}

if(isset(f16)) {
   reset(f16);
   reset(f32);
   set.loop(o1,0);
   set.cel(o1,0);
   draw(ego);
   drop("Rock");
   get("Skull powder");
   print("You pummel the poor, defenseless skull into a fine powder and pack it into your pocket.");
   print("Hey, no-one ever said magic was no fun.");
}

if ((said("look","puddle") ||
     said("look","blood") ||
     said("look","puddle","blood"))) {
  print("It looks like a puddle of some alien's bodily fluid.");
}

if ((said("get","puddle") ||
     said("get","blood") ||
     said("use","metal","blood") ||
     said("use","blood","metal") ||
     said("put","blood","metal") ||
     said("put","puddle","metal") ||
     said("use","metal","puddle") ||
     said("use","puddle","metal") ||
     said("put","puddle","blood","metal") ||
     said("use","metal","puddle","blood") ||
     said("use","puddle","blood","metal") ||
     said("get","puddle","blood"))) {
  if(has("Metal shard")) {
     if(posn(ego,110,75,126,88)) {
        drop("Metal shard");
        get("Bloody shard");
        print("You scrape up some of the blood onto your metal shard.");
      }
      else {
       print("Come a little closer!");
      }
     }
     else {
     print("You're not keen on getting that stuff on your hands.");
    }
}

if(said("look","skull")) {
  if(isset(f33)) {
     print("The skull sits innocently on the altar, wondering what Fate has in store.");
   }
  else {
    reset(input_parsed);
  }
}

if(said("get","skull")) {
  if(isset(f33)) {
     print("You did put it there for a reason, believe it or not.");
   }
  else {
    reset(input_parsed);
  }
}

if (said("look","sky")) {
  print("Hey, that cloud looks like a dog poo.");
}

if(isset(f3)) {
  erase(ego);
  death_type=2;
}

if(v2==1) {
  new.room(15);
}

return();
