1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- module.exports = class PhandalinTownSquare {
- constructor() {
- this.id = this.constructor.name;
- this.name = "Phandalin Town Square";
- this.description = "The square is a large, well-trodden area that acts as the hub for the town. The lush grass of the green to the west beacons to you. You can see a shrine to the north and a tall, important looking building to the southeast.\r\nThere is a big yellow-and-black sign here.";
- this.filename = "phandalin/townsquare.js";
- this.type = "room";
- this.items = [];
- this.mobiles = [];
- this.roomExpires = 0;
- this.resetDelay = 12000000;
- this.roomExits = ["west", "north", "south", "southwest", "east"];
- }
- mud_reset(time) {
- libs.Output.toRoom(this.id, "One of the townsfolk smiles as he passes by.");
- this.roomExpires = time + this.resetDelay;
- }
- mud_tick(time) {
- if(time >= this.roomExpires) {
- this.mud_reset(time);
- }
- }
- mud_getName() {
- return this.name;
- }
- mud_getDescription() {
- return this.description;
- }
- look(room, mobile, input) {
- switch(input[0]) {
- case "sign":
- libs.Output.toMobile(mobile.id, "This town is currently under construction! Please take care not to fall off the edge of reality!\r\n\t\t-Midas");
- return true;
- }
- }
- read(room, mobile, input) {
- switch(input[0]) {
- case "sign":
- libs.Output.toMobile(mobile.id, "This town is currently under construction! Please take care not to fall off the edge of reality!\r\n\t\t-Midas");
- return true;
- }
- }
- north(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinShrineLuck", "leaves north");
- return true;
- }
- west(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinTownGreen", "leaves west");
- return true;
- }
- east(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad7", "leaves east");
- return true;
- }
- south(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad6", "leaves south");
- return true;
- }
- southwest(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad1", "leaves southwest");
- return true;
- }
- };
|