MazeEntrance.ts 1.3 KB

123456789101112131415161718192021222324252627
  1. /// <reference path="../Forest.ts" />
  2. /// <reference path="Maze/People/MinotaurGuard.ts" />
  3. module Forest{
  4. export let MazeEntrance = new RoomRandom("Ancient Crypt", false, true);
  5. export let MazeCoordinates = Forest.rnc.generate(-3,0, 3, 6);
  6. MazeEntrance.description = new Say(
  7. "These fields are clear of trees, but you can see what appears to be a small rock crypt with two stone pillars to the sides of its entrance. ",
  8. "The crypt appears ancient: there is moss growing on it and most of the rocks that make it are chipped or broken. ",
  9. "Yet, it stands. There is a writing on the slab on top of it, but between the moss and the weird symbols used to write it, you can't imagine what it means."
  10. );
  11. MazeEntrance.backgroundImage = "roomCrypt";
  12. export let MazeMinotaurGuard = new MinotaurGuard();
  13. MazeEntrance.place(MazeMinotaurGuard);
  14. }
  15. Forest.region.place(Forest.MazeEntrance);
  16. Forest.MazeEntrance.trickyCode = (options : TrickyOptions) => {
  17. let blocked = !options.map.isFree(Forest.MazeCoordinates[0], Forest.MazeCoordinates[1]);
  18. while (blocked) {
  19. Forest.MazeCoordinates[0] -= 1;
  20. blocked = !options.map.isFree(Forest.MazeCoordinates[0], Forest.MazeCoordinates[1]);
  21. }
  22. return options.x == Forest.MazeCoordinates[0] && options.y == Forest.MazeCoordinates[1];
  23. };