12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- 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. There 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_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");
- return true;
- }
- west(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinTownGreen");
- return true;
- }
- east(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad7");
- return true;
- }
- south(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad6");
- return true;
- }
- southwest(room, mobile, input) {
- world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad1");
- return true;
- }
- };
|