LNK_leader

показывает "вес" отрядов ГЛ - чем меньше число, тем больше набирается ХП на единицу лидерства

  1. // ==UserScript==
  2. // @name LNK_leader
  3. // @namespace LNK
  4. // @version 1.0
  5. // @description показывает "вес" отрядов ГЛ - чем меньше число, тем больше набирается ХП на единицу лидерства
  6. // @author NemoMan
  7. // @include *heroeswm.ru/leader_army.php
  8. // @include *heroeswm.ru/leader_army.php?from_event*
  9. // @include *heroeswm.ru/leader_spec_army*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. function mainFunc() {
  17. var troops = document.querySelectorAll(".reserve_amount");
  18. var curTroop;
  19. for (var i = 0; i < troops.length; i++) {
  20. curTroop = troops[i];
  21. curTroop.innerHTML = curTroop.innerHTML + ' (' + (obj[i+1]['cost'] / obj[i+1]['maxhealth']).toFixed(1) + ')';
  22. obj[i+1]['maxhealth'] = obj[i+1]['maxhealth'] + '<br>Вес: ' + (obj[i+1]['cost'] / obj[i+1]['maxhealth']).toFixed(1);
  23. }
  24. }
  25.  
  26. setTimeout(mainFunc, 2000);
  27.  
  28. })();// ==UserScript==
  29. // @name LNK_leader
  30. // @namespace LNK
  31. // @version 1.0
  32. // @description показывает "вес" отрядов ГЛ - чем меньше число, тем больше набирается ХП на единицу лидерства
  33. // @author NemoMan
  34. // @include *heroeswm.ru/leader_army.php
  35. // @include *heroeswm.ru/leader_army.php?from_event*
  36. // @include *heroeswm.ru/leader_spec_army*
  37. // @grant none
  38. // ==/UserScript==
  39.  
  40. (function() {
  41. 'use strict';
  42.  
  43. function mainFunc() {
  44. var troops = document.querySelectorAll(".reserve_amount");
  45. var curTroop;
  46. for (var i = 0; i < troops.length; i++) {
  47. curTroop = troops[i];
  48. curTroop.innerHTML = curTroop.innerHTML + ' (' + (obj[i+1]['cost'] / obj[i+1]['maxhealth']).toFixed(1) + ')';
  49. obj[i+1]['maxhealth'] = obj[i+1]['maxhealth'] + '<br>Вес: ' + (obj[i+1]['cost'] / obj[i+1]['maxhealth']).toFixed(1);
  50. }
  51. }
  52.  
  53. setTimeout(mainFunc, 2000);
  54.  
  55. })();