Advertisement
Guest User

R-Calc

a guest
Jun 14th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.07 KB | None | 0 0
  1. <div id="ReiCosCal">
  2. <table style="width:98%">
  3. <tr>
  4. <th>Complete list of Reincarnation benefits <input id="ReiCosRei" type="number" min="1" max="160" value="1"><span id="R10"> with time(total) <input id="R10TimTot" type="number" min="0" max="876000" value="1"> in hours</span><span id="R20"> and <input id="R20SpeBui" type="number" min="0" max="9999999" value="1">buildings of given type.</span></th>
  5. </tr>
  6. <tr>
  7. <td id="Ben">
  8. <p id="R1AllBuiPro"></p>
  9. <p id="R1OffPro"></p>
  10. <p id="R1FCChaMul"></p>
  11. <p id="R1MpS"></p>
  12. <p id="R2GemPro"></p>
  13. <p id="R5Ass"></p>
  14. <p id="R10AllBuiPro"></p>
  15. <p id="R12MaxMan"></p>
  16. <p id="R20ProEacBui"></p>
  17. <p id="R25RE"></p>
  18. <p id="R41UniBuiPro"></p>
  19. <p id="R45MaxMan"></p>
  20. <p id="R50FCChaAdd"></p>
  21. <p id="R60FCChaMul"></p>
  22. <p id="R70AddResSlo"></p>
  23. <p id="R85AssPerR"></p>
  24. <p id="R100ManRegPerR"></p>
  25. <p id="R108ProdUBTimeDiff"></p>
  26. <p id="R115FCChaMul"></p>
  27. <p id="RNex"></p>
  28. <p id="RUnl"></p>
  29. </td>
  30. </tr>
  31. </table>
  32. <script>
  33. function Runl(unl) {
  34. $('#RUnl').html('This Reincarnation unlocks <b>' + unl + '</b>.');
  35. $('#RUnl').css('display', 'block');
  36. }
  37. function CalRBen() {
  38. var rei = parseInt($('#ReiCosRei').val());
  39. if (rei >= 1) {
  40. var bonus = (rei < 40) ? 25 * rei : (Math.pow(1 + 0.25 * rei, 0.1) - 1) * 100;
  41. $('#R1AllBuiPro').text('Production of all buildings is increased by ' + bonus.toFixed(1) + '%.');
  42. $('#R1AllBuiPro').css('display', 'block');
  43. } else {
  44. $('#R1AllBuiPro').css('display', 'none');
  45. }
  46. if (rei >= 1) {
  47. var bonus = (rei < 40) ? 500 * rei : (Math.pow(1 + 5 * rei, 0.1) - 1) * 100;
  48. $('#R1OffPro').text('Offline production is increased by ' + bonus.toFixed(1) + '%.');
  49. $('#R1OffPro').css('display', 'block');
  50. } else {
  51. $('#R1OffPro').css('display', 'none');
  52. }
  53. if (rei >= 1) {
  54. var bonus = Math.pow(rei, 1.1);
  55. $('#R1FCChaMul').text('Faction coin chance is multiplicatively increased by ' + bonus.toFixed(1) + '%.');
  56. $('#R1FCChaMul').css('display', 'block');
  57. } else {
  58. $('#R1FCChaMul').css('display', 'none');
  59. }
  60. if (rei >= 1) {
  61. var bonus = Math.floor(12.5 * (Math.pow(1 + 8 * rei, 0.5) - 1) / 2) / 10;
  62. $('#R1MpS').text('Mana regeneration is increased by +' + bonus.toFixed(1) + ' m/s.');
  63. $('#R1MpS').css('display', 'block');
  64. } else {
  65. $('#R1MpS').css('display', 'none');
  66. }
  67. if (rei >= 2) {
  68. var bonus = 0.2 * rei;
  69. $('#R2GemPro').text('Gem production bonus is increased by +' + bonus.toFixed(1) + '%.');
  70. $('#R2GemPro').css('display', 'block');
  71. } else {
  72. $('#R2GemPro').css('display', 'none');
  73. }
  74. if (rei >= 5) {
  75. var bonus = (rei < 40) ? 2 * rei : (Math.pow(1 + 0.02 * rei, 0.1) - 1) * 100;
  76. $('#R5Ass').text('Add ' + rei + ' assistants and their production is increased by ' + bonus.toFixed(1) + '%.');
  77. $('#R5Ass').css('display', 'block');
  78. } else {
  79. $('#R5Ass').css('display', 'none');
  80. }
  81. if (rei >= 10) {
  82. var bonus = (rei < 40) ? Math.pow(rei, 1.75) * Math.pow(parseInt($('#R10TimTot').val()), 0.65) : (Math.pow(1 + Math.pow(rei, 1.75) * Math.pow(parseInt($('#R10TimTot').val()), 0.65) / 100, 0.1) - 1) * 100;
  83. $('#R10AllBuiPro').text('Production of all buildings is increased by ' + bonus.toFixed(1) + '%.');
  84. $('#R10AllBuiPro, #R10').css('display', 'block');
  85. } else {
  86. $('#R10AllBuiPro, #R10').css('display', 'none');
  87. }
  88. if (rei >= 12) {
  89. var bonus = 35 * rei;
  90. $('#R12MaxMan').text('Maximum mana is increased by +' + bonus.toFixed(0) + '.');
  91. if (rei >= 45) $('#R12MaxMan').append(' Total increase is +' + (bonus + 70 * Math.pow(rei, 1.2)).toFixed(0) + '.');
  92. $('#R12MaxMan').css('display', 'block');
  93. } else {
  94. $('#R12MaxMan').css('display', 'none');
  95. }
  96. if (rei >= 20) {
  97. var bonus = (rei < 40) ? 0.01 * rei * parseInt($('#R20SpeBui').val()) : (Math.pow(1 + 0.0001 * rei * parseInt($('#R20SpeBui').val()), 0.1) - 1) * 100;
  98. $('#R20ProEacBui').text('Given buildings\' production is increased by ' + bonus.toFixed(1) + '%.');
  99. $('#R20ProEacBui, #R20').css('display', 'block');
  100. } else {
  101. $('#R20ProEacBui, #R20').css('display', 'none');
  102. }
  103. if (rei >= 25) {
  104. var bonus = 0.5 * rei;
  105. $('#R25RE').text('Royal Exchange bonus is increased by ' + bonus.toFixed(1) + '%.');
  106. $('#R25RE').css('display', 'block');
  107. } else {
  108. $('#R25RE').css('display', 'none');
  109. }
  110. if (rei >= 41) {
  111. var bonus = 1200 * Math.pow(rei, 1.1);
  112. $('#R41UniBuiPro').text('Unique Buildings\' production is increased by ' + bonus.toFixed(1) + '%.');
  113. $('#R41UniBuiPro').css('display', 'block');
  114. } else {
  115. $('#R41UniBuiPro').css('display', 'none');
  116. }
  117. if (rei >= 45) {
  118. var bonus = 70 * Math.pow(rei, 1.25);
  119. $('#R45MaxMan').text('Maximum mana is increased by +' + bonus.toFixed(0) + '. Total increase is +' + (bonus + 35 * rei).toFixed(0) + '.');
  120. $('#R45MaxMan').css('display', 'block');
  121. } else {
  122. $('#R45MaxMan').css('display', 'none');
  123. }
  124. if (rei >= 50) {
  125. var bonus = rei;
  126. $('#R50FCChaAdd').text('Faction coin chance is increased by ' + bonus.toFixed(1) + '%.');
  127. $('#R50FCChaAdd').css('display', 'block');
  128. } else {
  129. $('#R50FCChaAdd').css('display', 'none');
  130. }
  131. if (rei >= 60) {
  132. var bonus = 1.2 * Math.pow(rei, 1.05);
  133. $('#R60FCChaMul').text('Faction coin chance is increased ' + bonus.toFixed(0) + ' times if they match your Faction or Bloodline.');
  134. $('#R60FCChaMul').css('display', 'block');
  135. } else {
  136. $('#R60FCChaMul').css('display', 'none');
  137. }
  138. if (rei >= 70) {
  139. $('#R70AddResSlo').text('You gain 1 additional Research slot for each branch.');
  140. $('#R70AddResSlo').css('display', 'block');
  141. } else {
  142. $('#R70AddResSlo').css('display', 'none');
  143. }
  144. if (rei >= 85) {
  145. var bonus = rei * 4;
  146. $('#R85AssPerR').text('Add ' + bonus.toFixed(0) + ' additional Assistants.');
  147. $('#R85AssPerR').css('display', 'block');
  148. } else {
  149. $('#R85AssPerR').css('display', 'none');
  150. }
  151. if (rei >= 100) {
  152. var bonus = rei;
  153. $('#R100ManRegPerR').text('Increase Mana Regeneration by ' + bonus.toFixed(1) + '%.');
  154. $('#R100ManRegPerR').css('display', 'block');
  155. } else {
  156. $('#R100ManRegPerR').css('display', 'none');
  157. }
  158. if (rei >= 108) {
  159. $('#R108ProdUBTimeDiff').text('Increase the production of Unique Buildings based on the difference of time spent as their respective faction against your most most used faction this reincarnation');
  160. $('#R108ProdUBTimeDiff').css('display', 'block');
  161. } else {
  162. $('#R108ProdUBTimeDiff').css('display', 'none');
  163. }
  164. if (rei >= 115) {
  165. var bonus = 1.2 * Math.pow(rei, 1.05);
  166. $('#R115FCChaMul').text('Faction coin chance is increased ' + bonus.toFixed(0) + ' times if they match your Faction, Bloodline or Artifact Set.');
  167. $('#R115FCChaMul').css('display', 'block');
  168. } else {
  169. $('#R115FCChaMul').css('display', 'none');
  170. }
  171. if (rei <= 40) {
  172. $('#RNex').html('To Reincarnate to R' + rei.toFixed(0) + ', you need <b>1e' + (24 + rei * 3).toFixed(0) + '</b> gems.');
  173. } else if (rei <= 100){
  174. $('#RNex').html('To Reincarnate to R' + rei.toFixed(0) + ', you need <b>1.778e' + (rei * 2 - 62).toFixed(0) + '</b> gems.');
  175. } else {
  176. $('#RNex').html('To Reincarnate to R' + rei.toFixed(0) + ', you need <b>' + (Math.pow(1e27,0.75) * Math.pow(rei , (rei - 100))).toExponential(4) + '</b> gems.');
  177. }
  178. switch (rei) {
  179. case 2:
  180. Runl('Vanilla Challenges');
  181. break;
  182. case 3:
  183. Runl('Mercenaries');
  184. break;
  185. case 4:
  186. Runl('Neutral Challenges');
  187. break;
  188. case 6:
  189. Runl('Prestige Challenges');
  190. break;
  191. case 7:
  192. Runl('Bloodlines');
  193. break;
  194. case 16:
  195. Runl('Vanilla Research');
  196. break;
  197. case 23:
  198. Runl('Neutral Research');
  199. break;
  200. case 29:
  201. Runl('prestige research');
  202. break;
  203. case 40:
  204. Runl('Ascension 1');
  205. break;
  206. case 42:
  207. Runl('Tiered Autocasting');
  208. break;
  209. case 46:
  210. Runl('Neutral Prestige (Dragons)');
  211. break;
  212. case 47:
  213. Runl('Neutral Prestige Research');
  214. break;
  215. case 48:
  216. Runl('Dragon Challenges');
  217. break;
  218. case 60:
  219. Runl('lineages');
  220. break;
  221. case 75:
  222. Runl('Mercenary Research');
  223. break;
  224. case 100:
  225. Runl('Ascension 2 and Second Alignments');
  226. break;
  227. case 111:
  228. Runl('Union Upgrades')
  229. break;
  230. case 116:
  231. Runl('Prestige Factions')
  232. break;
  233. default:
  234. $('#RUnl').css('display', 'none');
  235. break;
  236. }
  237. }
  238. $('#ReiCosRei, #R10TimTot, #R20SpeBui').on('input', CalRBen);
  239. CalRBen();
  240. </script>
  241. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement