road03.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. module.exports = class PhandalinRoad3 {
  2. constructor() {
  3. this.id = this.constructor.name;
  4. this.name = "Phandalin Road";
  5. this.description = "The dirt road curves here. There is a large house with dark trim to the north, and a crossroads to the southeast.";
  6. this.filename = "phandalin/road03.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", "southeast"];
  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. mud_getName() {
  25. return this.name;
  26. }
  27. mud_getDescription() {
  28. return this.description;
  29. }
  30. north(room, mobile, input) {
  31. world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad2", "leaves north");
  32. return true;
  33. }
  34. southeast(room, mobile, input) {
  35. world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad4", "leaves southeast");
  36. return true;
  37. }
  38. };