road01.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module.exports = class PhandalinRoad1 {
  2. constructor() {
  3. this.id = this.constructor.name;
  4. this.name = "Phandalin Road";
  5. this.description = "A well worn dirt road leading to the town green to the north. The bustle of the town square is heard to the northeast.";
  6. this.filename = "phandalin/road01.js";
  7. this.type = "room";
  8. this.items = [];
  9. this.mobiles = [];
  10. this.roomExits = [];
  11. this.roomExpires = 0;
  12. this.resetDelay = 12000000;
  13. this.roomExits = ["north", "northeast", "south"];
  14. }
  15. mud_reset(time) {
  16. libs.Output.toRoom(this.id, "One of the townsfolk smiles as she passes by.");
  17. this.roomExpires = time + this.resetDelay;
  18. }
  19. mud_tick(time) {
  20. if(time >= this.roomExpires) {
  21. this.mud_reset(time);
  22. }
  23. }
  24. west(room, mobile, input) {
  25. world.mud_moveMobile(mobile.id, this.id, "PhandalinGrassField");
  26. return true;
  27. }
  28. north(room, mobile, input) {
  29. world.mud_moveMobile(mobile.id, this.id, "PhandalinTownGreen");
  30. return true;
  31. }
  32. northeast(room, mobile, input) {
  33. world.mud_moveMobile(mobile.id, this.id, "PhandalinTownSquare");
  34. return true;
  35. }
  36. north(room, mobile, input) {
  37. world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad2");
  38. return true;
  39. }
  40. };