stick.js 528 B

123456789101112131415161718192021222324252627
  1. module.exports = class Stick {
  2. constructor() {
  3. this.id = 0;
  4. this.name = "a stick";
  5. this.description = "A small crooked stick, splintered on the ends.";
  6. this.type = "item";
  7. this.keywords = ["stick"];
  8. this.resetDelay = 12000000;
  9. this.itemExpires = 0;
  10. this.filename = "stick.js";
  11. }
  12. mud_init() {
  13. world.mud_addItemToRoom("PhandalinTownGreen", this.id);
  14. }
  15. mud_reset(time) {
  16. this.itemExpires = time + this.resetDelay;
  17. }
  18. mud_tick(time) {
  19. if(time >= this.itemExpires) {
  20. this.mud_reset(time);
  21. }
  22. }
  23. }