You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

44 lines
1.1 KiB

  1. //Imports
  2. const eventEmitter = require('../misc/events');
  3. //Module
  4. module.exports = {
  5. //At which interval does each zone tick in ms
  6. tickTime: 350,
  7. //The maximum level a player can reach
  8. maxLevel: 20,
  9. //Rune damage is multiplied by nth entry from this array where n = level - 1
  10. dmgMults: [0.25, 0.4, 0.575, 0.8, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3, 2.4, 2.5],
  11. //Mob HP is multiplied by nth entry from this array where n = level - 1
  12. hpMults: [0.1, 0.2, 0.4, 0.7, 0.78, 0.91, 1.16, 1.19, 1.65, 2.36, 3.07, 3.55, 4.1, 4.85, 5.6, 5.9, 6.5, 7.1, 7.9, 12],
  13. //How far a player can see objects horizontally
  14. viewDistanceX: 25,
  15. //How far a player can see objects vertically
  16. viewDistanceY: 14,
  17. init: function (threadArgs) {
  18. const emBeforeGetConsts = {
  19. threadArgs,
  20. constValues: {}
  21. };
  22. Object.entries(this).forEach(([k, v]) => {
  23. if (typeof(v) === 'function')
  24. return;
  25. emBeforeGetConsts.constValues[k] = v;
  26. });
  27. eventEmitter.emit('beforeGetConsts', emBeforeGetConsts);
  28. Object.entries(emBeforeGetConsts.constValues).forEach(([k, v]) => {
  29. this[k] = v;
  30. });
  31. }
  32. };