/// /// 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]; };