1234567891011121314151617 |
- /// <reference path="../Forest.ts" />
- module Forest{
- export let TheObelisk = new RoomRandom("The Obelisk", false, true);
- export let ObeliskCoordinates = Forest.rnc.generate(-1,1, 6, 8);
- TheObelisk.backgroundImage = "roomObelisk";
- TheObelisk.connectableOn = [Direction.SOUTH];
- }
- Forest.region.place(Forest.TheObelisk);
- Forest.TheObelisk.trickyCode = (options : TrickyOptions) => {
- let blocked = !options.map.isFree(Forest.ObeliskCoordinates[0], Forest.ObeliskCoordinates[1]);
- while (blocked) {
- Forest.ObeliskCoordinates[1] += 1;
- blocked = !options.map.isFree(Forest.ObeliskCoordinates[0], Forest.ObeliskCoordinates[1]);
- }
- return options.x == Forest.ObeliskCoordinates[0] && options.y == Forest.ObeliskCoordinates[1];
- };
|