
#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,152,140);
   draw(ego);
  }

  v255=16;

  if(obj.in.room("Skull",v255)) {
  animate.obj(o2);
  load.view(19);
  set.view(o2,19);
  set.loop(o2,0);
  set.cel(o2,1);
  position(o2,65,115);
  set.priority(o2,4);
  ignore.objs(o2);
  stop.cycling(o2);
  draw(o2);
  }

  if(!isset(f24)) {
   animate.obj(o1);
   load.view(17);
   set.view(o1,17);
   set.loop(o1,0);
   set.cel(o1,0);
   v255=2;
   step.size(o1,v255);
   position(o1,59,131);
   release.loop(o1);
     draw(o1);
   follow.ego(o1,7,f17);
   print("There's a large creature coming towards you. Perhaps it wants to get to know you and become your friend.");
   }

}

if(isset(f17)) {
   reset(f17);
   print("Well, its certainly keen on getting to know your legs.");
   stop.motion(o1);
   erase(ego);
   load.view(18);
   set.view(o1,18);
   set.loop(o1,0);
   set.cel(o1,0);
   end.of.loop(o1,f18);
}

if(isset(f18)) {
   reset(f18);
   print("Dang, those digestive juices are going to leave a mark. Isn't it frustrating when a creature of low intelligence acting on pure instinct can outwit a highly intelligent, prodigial sorceror like yourself?");
   death_type=3;
}

if (said("look")) {
  print("You've reached what passes for a dead end in this crazy world. Some dead guy is selfishly taking up space over there.");
}


if (said("look","corpse")) {
  print("The dead gentleman has almost been picked clean by that beast. There's a lot of blood. He seems to be wearing some kind of futuristic suit of armour which the animal effortlessly tore open.");
   v255=16;
  if(obj.in.room("Skull",v255)) {
   print("The dead man's skull looks nice and loose.");
  }
}

if (said("look","suit")) {
  print("It's made of shiny metals and protects his whole body from the neck down. Some might say that that would be something of a design flaw. This chap for a start.");
   v255=16;
  if(obj.in.room("Metal shard",v255)) {
   print("You notice a loose metal shard hanging off from the main damaged area.");
  }
}

if (said("get","suit")) {
  print("Eugh, no thanks, there's someone in it.");
}

if (said("look","skull")) {
  v255=16;
  if(obj.in.room("Skull",v255)) {
     print("It's completely devoid of flesh, probably licked clean.");
  }
  else {
  reset(input_parsed);
  }
}

if (said("get","skull")) {
  v255=16;
  if(obj.in.room("Skull",v255)) {
    if(posn(ego,42,111,71,124)) {
      erase(o2);
      get("Skull");
      print("Pausing only to do your Hamlet impression, you take the skull.");
    }
    else {
     print("Come a little closer!");
    }
  }
  else {
  reset(input_parsed);
  }
}

if (said("look","shard")) {
   v255=16;
  if(obj.in.room("Metal shard",v255)) {
  print("Looks pretty sharp. You could probably pull it off with your hands.");
  }
  else {
   reset(input_parsed);
  }
}

if (said("get","shard")) {
   v255=16;
  if(obj.in.room("Metal shard",v255)) {
    if(posn(ego,42,111,71,124)) {
      get("Metal shard");
      print("You yank the sharp bit of metal off the suit. Watch those fingers!");
     }
    else {
     print("Come a little closer!");
    }
  }
  else {
   reset(input_parsed);
  }
}

if (said("get","corpse")) {
  print("Although sorcerers are somewhat desensitized to the dead, you draw the line at accepting one as a travelling companion.");
}

if (said("look","blood")) {
  print("There certainly seems to be a hell of a lot of it.");
}

if ((said("get","blood") ||
     said("get","blood","shard") ||
     said("use","shard","blood"))) {
  print("Use HUMAN blood in a ritual? Skulls are a different matter, but actual human BLOOD? There's a special word for that sort of sorceror.");
}

if (said("look","creature")) {
  if(!isset(f24)) {
     print("It's a sort of bipedal doggy thing with squid feelers for a face. It seems very keen on you.");
    }
  else {
  print("Be reassured that it's dead.");
  }
}

if (said("kill","creature")) {
  if(!isset(f24)) {
     print("Good idea. Why don't you wait until it gets REALLY close then try to boot it in the gob?");
    }
  else {
  print("Be reassured that it's dead.");
  }
}

if ((said("shoot","creature") ||
     said("shoot","creature","gun") ||
     said("shoot","gun","creature") ||
     said("shoot","gun") ||
     said("use","gun") ||
     said("use","gun","creature"))) {
  if(!has("Shotgun")) {
     print("OK, my guess is that you forgot to pick up the gun. Why don't you retreat strategically and fetch it.");
    }
   else {
  if(!isset(f24)) {
     print("You don't have time to dig your gun out your jacket. Do something quick or scarper!");
    }
  else {
  print("Be reassured that it's dead.");
  }
  }
}

if ((said("viogra","creature") ||
     said("cast","viogra","creature") ||
     said("cast","viogra","magic","creature"))) {
  if(!isset(f24)) {
   print("The creature stops dead as you cast your spell over it. It seems to be thinking about something.");
   stop.motion(o1);
   load.view(18);
   set.view(o1,18);
   set.loop(o1,1);
   set.cel(o1,0);
   end.of.loop(o1,f19);
  }  
  else {
  print("Damn, someone beat you to it.");
  }
}

if(isset(f19)) {
  reset(f19);
  erase(o1);
  set(f24);
  print("Amazing! What an interesting metabolism that creature must have! It can actually will its digestive system into reverse and digest itself!");
  print("Maybe some scientist would be interested in that if it wasn't a rampant killing machine.");
}

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

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

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

return();




