123456789101112131415161718 |
- /// <reference path="../Forest.ts" />
- /// <reference path="OrcVillage.ts" />
- module Forest{
- export let OminousCave = new RoomRandom("Ominous Cave", false, true);
- export let CaveCoordinates = Forest.rnc.generate(Forest.OrcCoordinates[0],Forest.OrcCoordinates[0] + 2, Forest.OrcCoordinates[0] + 3, Forest.OrcCoordinates[0] + 5);
- OminousCave.backgroundImage = "roomOminousCave";
- OminousCave.connectableOn = [Direction.SOUTH];
- }
- Forest.region.place(Forest.OminousCave);
- Forest.OminousCave.trickyCode = (options : TrickyOptions) => {
- let blocked = !options.map.isFree(Forest.CaveCoordinates[0], Forest.CaveCoordinates[1]);
- while (blocked) {
- Forest.CaveCoordinates[1] += 1;
- blocked = !options.map.isFree(Forest.CaveCoordinates[0], Forest.CaveCoordinates[1]);
- }
- return options.x == Forest.CaveCoordinates[0] && options.y == Forest.CaveCoordinates[1];
- };
|