SHARE
TWEET

Untitled

a guest May 19th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %Please PLEASE find mistakes! I love working on this, any excuse to do
  2. %more - you can reach me on BG as Radec, FFXIAH as Radec.Bismarck, Radec on
  3. %Lunariansls.com, or RadecTheBLM on AIM.
  4.  
  5. %Using MATLAB 7.1.0.246 R14 SP3
  6.  
  7. %Assumptions: No JA are used when they could alter swing speed EXCEPT that
  8. %WS does not killshot and the 120 delay there is felt. For every JA you use
  9. %in a TP Cycle add 120 delay to
  10.  
  11. % Time_To_100 = ((Delay/Round_Rate)*Hits_to_WS/(1+DA_Rate) + 120)/60;
  12.  
  13. %Something like boost before a WS: Add whatever time you spend between
  14. %boost and the WS, up to 2 seconds (120). Chained JA, up to 120 between
  15. %them and 120 after the last, ex: Haste Samba > Wait 1.5 seconds (90) >
  16. %Quick Step > Wait 1.2 seconds (72) > Reverse Flourish > Wait 2 Seconds
  17. %(120) = 282 added delay.
  18.  
  19. %Other things: There is no mention of Accuracy here, or Zanshin. I
  20. %originally wrote this to find the difference between 2March and MarchMin
  21. %which shouldn't be altered by misses. At some point I may repost with
  22. %Calcuation for those added but for now, enjoy.
  23.  
  24. %Honestly it's best if you fill this in on your own
  25.  
  26. Hits_to_WS = 15; %After WS has landed - This doesn't have to be whole, if 10% of the time you go 1 hit over, add 10%, 5.5 if normal is 5, etc.
  27. Hits_on_WS = 8; %Remember /nin gets a bonus on Offhand
  28. Haste_Gear = 0.25; %Some jobs get less
  29. Haste_Magic = 0.15+0.12; %Haste Spell + VMarch
  30. Haste_JA = 0.0+0.1; %Hasso and Samba
  31. Att_Base = 465; %Guess
  32. Level = 75; %If you change this you better fix WSC
  33. Enemy_Def = 270; %Guess
  34. Enemy_Level = 82; %Guess
  35. Crit_Rate = 0.15; %Guess
  36. DA_Rate = 0.05;
  37. %OAT Weapons: Calculate your own "real" DA rate - I should make this extra
  38. %attacks per round rather than DA in retrospect, to allow for
  39. %Ridill/Soboro/KClub etc - just figure "On Average I throw 2.4 hits per
  40. %round" and put that there.
  41.  
  42. WS_Crits = 0; %Set to 1 if the WS can crit.
  43. WS_Crit_Rate = 0.00; %Guess
  44. WS_Att_Base = 577;
  45.  
  46. WS_Att_Boost = 0; %Set to 0 if the WS doesn't get a base attack boost.
  47. WS_First_Att_Base = 9999; %For WS with ATT boost, usually is capped but not always.
  48. WS_First_Crit_Rate = 0; %Set to 1 for SA, or to w/e WS Crit rate is if you can crit Ws and get Att boost
  49.  
  50. WS_DA_Rate = 0.00; %Double normal DA rate if you have an offhand swing on the WS - example NIN/WAR + brutal is normally 15%, put 0.30.
  51. %I'm aware that you don't get a 30% DA rate overall but read the whole
  52. %thing before you question it please, I think it'll work.
  53.  
  54. %Aside: If you're a whm/nin trying to work this with hexa, FUCK YOU - I
  55. %have no idea how 7 hits + 2 potential DA's will work with the
  56. %8-hits-at-once cap.
  57. Delay = 176;
  58. WD_TP = 35 + 10; %Weapon Damage + fSTR
  59. WD_WS = 35 + 10 + 12; %Weapon Damage + fSTR + WSC
  60. WD_WS_Extra = 35 + 10; %No WSC on extra hits on WS
  61. WS_fTP = 1.1; %Asuran Fist w/ Gorget
  62.  
  63. %Yup, that's a lot of variables!
  64.  
  65. %Case 1: 2x March
  66. CRatio_Marches = Att_Base/Enemy_Def;
  67. WS_CRatio_Marches = WS_Att_Base/Enemy_Def;
  68. WS_First_CRatio_Marches = WS_First_Att_Base/Enemy_Def;
  69.  
  70. if Enemy_Level > Level
  71.     CRatio_Marches = CRatio_Marches - 0.050 * (Enemy_Level - Level);
  72.     WS_CRatio_Marches = WS_CRatio_Marches - 0.050 * (Enemy_Level - Level);
  73.     WS_First_CRatio_Marches = WS_First_CRatio_Marches - 0.050 * (Enemy_Level - Level);
  74. end
  75.  
  76. %TP CRatio
  77. if CRatio_Marches < 0
  78.     CRatio_Marches = 0;
  79. end
  80. if CRatio_Marches > 2
  81.     CRatio_Marches1 = 2;
  82. end
  83. if CRatio_Marches > 2.2
  84.     CRatio_Marches2 = 2.2;
  85. end
  86. CRatio_Marches1 = CRatio_Marches;
  87. CRatio_Marches2 = CRatio_Marches;
  88.  
  89. %WS_CRatio
  90. if WS_CRatio_Marches < 0
  91.     WS_CRatio_Marches = 0;
  92. end
  93. if WS_CRatio_Marches > 2
  94.     WS_CRatio_Marches1 = 2;
  95. end
  96. if WS_CRatio_Marches > 2.2
  97.     WS_CRatio_Marches2 = 2.2;
  98. end
  99. WS_CRatio_Marches1 = WS_CRatio_Marches;
  100. WS_CRatio_Marches2 = WS_CRatio_Marches;
  101.  
  102. %WS_CRatio w/ ATT Boosted first hit.
  103. if WS_First_CRatio_Marches < 0
  104.     WS_First_CRatio_Marches = 0;
  105. end
  106. if WS_First_CRatio_Marches > 2
  107.     WS_First_CRatio_Marches1 = 2;
  108. else
  109.     WS_First_CRatio_Marches1 = WS_First_CRatio_Marches;
  110. end
  111. if WS_First_CRatio_Marches > 2.2
  112.     WS_First_CRatio_Marches2 = 2.2;
  113. else
  114.     WS_First_CRatio_Marches2 = WS_First_CRatio_Marches;
  115. end
  116.  
  117. %Case 1A: 1Hander
  118. if CRatio_Marches1 < 0.5
  119.     fMax_1Hand_Marches = 0.4 + 1.2*CRatio_Marches1;
  120. elseif CRatio_Marches1 <= 5/6
  121.     fMax_1Hand_Marches = 1;
  122. elseif CRatio_Marches1 < 2
  123.     fMax_1Hand_Marches = 1.2*CRatio_Marches1;
  124. elseif CRatio_Marches1 == 2
  125.     fMax_1Hand_Marches = 1.2*CRatio_Marches1 + 0.05;
  126. end
  127.  
  128. fMax_1Hand_Marches_Crit = (fMax_1Hand_Marches+1);
  129. if fMax_1Hand_Marches_Crit > 3
  130.     fMax_1Hand_Marches_Crit = 3;
  131. end
  132.  
  133. fMax_1Hand_Marches_Crit = fMax_1Hand_Marches_Crit * 1.05;
  134. fMax_1Hand_Marches = fMax_1Hand_Marches * 1.05;
  135.  
  136. if CRatio_Marches1 < 1.25
  137.     fMin_1Hand_Marches = -0.5 + 1.2*CRatio_Marches1;
  138. elseif 1.25 < CRatio_Marches1 <= 1.5
  139.     fMin_1Hand_Marches = 1;
  140. elseif 1.5 < CRatio_Marches1 < 2
  141.     fMin_1Hand_Marches = -0.8+1.2*CRatio_Marches1;
  142. elseif CRatio_Marches1 == 2
  143.     fMin_1Hand_Marches = -0.82+1.2*CRatio_Marches1;
  144. end
  145. if fMin_1Hand_Marches < 0
  146.     fMin_1Hand_Marches = 0;
  147. end
  148.  
  149. fMin_1Hand_Marches_Crit = fMin_1Hand_Marches+1;
  150.  
  151. %Case 1B: 2Hander - note that unlike 1Hand I am not 100% certain on pDIF
  152. %numbers.
  153.  
  154. if CRatio_Marches2 <= 0.5
  155.     fMax_2Hand_Marches = 0.4 + 1.2*CRatio_Marches2;
  156. elseif CRatio_Marches2 <= 5/6
  157.     fMax_2Hand_Marches = 1;
  158. elseif CRatio_Marches2 < 2.2
  159.     fMax_2Hand_Marches = 1.2*CRatio_Marches2;
  160. elseif CRatio_Marches2 == 2.2
  161.     fMax_2Hand_Marches = 1.2*CRatio_Marches2 + 0.05;
  162. end
  163.  
  164. fMax_2Hand_Marches_Crit = (fMax_2Hand_Marches+1);
  165. if fMax_2Hand_Marches_Crit > 3
  166.     fMax_2Hand_Marches_Crit = 3;
  167. end
  168.  
  169. fMax_2Hand_Marches_Crit = fMax_2Hand_Marches_Crit * 1.05;
  170. fMax_2Hand_Marches = fMax_2Hand_Marches*1.05;
  171.  
  172. if CRatio_Marches2 <= 1.25
  173.     fMin_2Hand_Marches = -0.5 + 1.2*CRatio_Marches2;
  174. elseif CRatio_Marches2 <= 1.5;
  175.     fMin_2Hand_Marches = 1;
  176. elseif CRatio_Marches2 < 2.2
  177.     fMin_2Hand_Marches = -0.8+1.2*CRatio_Marches2;
  178. elseif CRatio_Marches2 == 2.2
  179.     fMin_2Hand_Marches = -0.8+1.2*CRatio_Marches2;
  180. end
  181.  
  182. if fMin_2Hand_Marches < 0
  183.     fMin_2Hand_Marches = 0;
  184. end
  185. fMin_2Hand_Marches_Crit = fMin_2Hand_Marches+1;
  186.  
  187. %Case 1C: 1Hander WS
  188.  
  189. if WS_CRatio_Marches1 < 0.5
  190.     WS_fMax_1Hand_Marches = 0.4 + 1.2*WS_CRatio_Marches1;
  191. elseif WS_CRatio_Marches1 <= 5/6
  192.     WS_fMax_1Hand_Marches = 1;
  193. elseif WS_CRatio_Marches1 < 2
  194.     WS_fMax_1Hand_Marches = 1.2*WS_CRatio_Marches1;
  195. elseif WS_CRatio_Marches1 == 2
  196.     WS_fMax_1Hand_Marches = 1.2*WS_CRatio_Marches1 + 0.05;
  197. end
  198.  
  199. WS_fMax_1Hand_Marches_Crit = (WS_fMax_1Hand_Marches+1);
  200. if WS_fMax_1Hand_Marches_Crit > 3
  201.     WS_fMax_1Hand_Marches_Crit = 3;
  202. end
  203.  
  204. WS_fMax_1Hand_Marches_Crit = WS_fMax_1Hand_Marches_Crit * 1.05;
  205. WS_fMax_1Hand_Marches = WS_fMax_1Hand_Marches * 1.05;
  206.  
  207. if WS_CRatio_Marches1 < 1.25
  208.     WS_fMin_1Hand_Marches = -0.5 + 1.2*WS_CRatio_Marches1;
  209. elseif 1.25 < WS_CRatio_Marches1 <= 1.5
  210.     WS_fMin_1Hand_Marches = 1;
  211. elseif 1.5 < WS_CRatio_Marches1 < 2
  212.     WS_fMin_1Hand_Marches = -0.8+1.2*WS_CRatio_Marches1;
  213. elseif WS_CRatio_Marches1 == 2
  214.     WS_fMin_1Hand_Marches = -0.82+1.2*WS_CRatio_Marches1;
  215. end
  216. if WS_fMin_1Hand_Marches < 0
  217.     WS_fMin_1Hand_Marches = 0;
  218. end
  219.  
  220. WS_fMin_1Hand_Marches_Crit = WS_fMin_1Hand_Marches+1;
  221.  
  222. %Case 1D: 2Hander WS
  223.  
  224. if WS_CRatio_Marches2 <= 0.5
  225.     WS_fMax_2Hand_Marches = 0.4 + 1.2*WS_CRatio_Marches2;
  226. elseif WS_CRatio_Marches2 <= 5/6
  227.     WS_fMax_2Hand_Marches = 1;
  228. elseif WS_CRatio_Marches2 < 2.2
  229.     WS_fMax_2Hand_Marches = 1.2*WS_CRatio_Marches2;
  230. elseif WS_CRatio_Marches2 == 2.2
  231.     WS_fMax_2Hand_Marches = 1.2*WS_CRatio_Marches2 + 0.05;
  232. end
  233.  
  234. WS_fMax_2Hand_Marches_Crit = (WS_fMax_2Hand_Marches+1);
  235. if WS_fMax_2Hand_Marches_Crit > 3
  236.     WS_fMax_2Hand_Marches_Crit = 3;
  237. end
  238.  
  239. WS_fMax_2Hand_Marches_Crit = WS_fMax_2Hand_Marches_Crit * 1.05;
  240. WS_fMax_2Hand_Marches = WS_fMax_2Hand_Marches*1.05;
  241.  
  242. if WS_CRatio_Marches2 <= 1.25
  243.     WS_fMin_2Hand_Marches = -0.5 + 1.2*WS_CRatio_Marches2;
  244. elseif WS_CRatio_Marches2 <= 1.5;
  245.     WS_fMin_2Hand_Marches = 1;
  246. elseif WS_CRatio_Marches2 < 2.2
  247.     WS_fMin_2Hand_Marches = -0.8+1.2*WS_CRatio_Marches2;
  248. elseif WS_CRatio_Marches2 == 2.2
  249.     WS_fMin_2Hand_Marches = -0.8+1.2*WS_CRatio_Marches2;
  250. end
  251.  
  252. if WS_fMin_2Hand_Marches < 0
  253.     WS_fMin_2Hand_Marches = 0;
  254. end
  255. WS_fMin_2Hand_Marches_Crit = WS_fMin_2Hand_Marches+1;
  256.  
  257. %Case 1E: 1Hander WS with ATT Boost
  258.  
  259. if WS_First_CRatio_Marches1 < 0.5
  260.     WS_First_fMax_1Hand_Marches = 0.4 + 1.2*WS_First_CRatio_Marches1;
  261. elseif WS_First_CRatio_Marches1 <= 5/6
  262.     WS_First_fMax_1Hand_Marches = 1;
  263. elseif WS_First_CRatio_Marches1 < 2
  264.     WS_First_fMax_1Hand_Marches = 1.2*WS_First_CRatio_Marches1;
  265. elseif WS_First_CRatio_Marches1 == 2
  266.     WS_First_fMax_1Hand_Marches = 1.2*WS_First_CRatio_Marches1 + 0.05;
  267. end
  268.  
  269. WS_First_fMax_1Hand_Marches_Crit = (WS_First_fMax_1Hand_Marches+1);
  270. if WS_First_fMax_1Hand_Marches_Crit > 3
  271.     WS_First_fMax_1Hand_Marches_Crit = 3;
  272. end
  273.  
  274. WS_First_fMax_1Hand_Marches_Crit = WS_First_fMax_1Hand_Marches_Crit * 1.05;
  275. WS_First_fMax_1Hand_Marches = WS_First_fMax_1Hand_Marches * 1.05;
  276.  
  277. if WS_First_CRatio_Marches1 < 1.25
  278.     WS_First_fMin_1Hand_Marches = -0.5 + 1.2*WS_First_CRatio_Marches1;
  279. elseif 1.25 < WS_First_CRatio_Marches1 <= 1.5
  280.     WS_First_fMin_1Hand_Marches = 1;
  281. elseif 1.5 < WS_First_CRatio_Marches1 < 2
  282.     WS_First_fMin_1Hand_Marches = -0.8+1.2*WS_First_CRatio_Marches1;
  283. elseif WS_First_CRatio_Marches1 == 2
  284.     WS_First_fMin_1Hand_Marches = -0.82+1.2*WS_First_CRatio_Marches1;              
  285. end
  286. if WS_First_fMin_1Hand_Marches < 0
  287.     WS_First_fMin_1Hand_Marches = 0;
  288. end
  289.  
  290. WS_First_fMin_1Hand_Marches_Crit = WS_First_fMin_1Hand_Marches+1;
  291.  
  292. %Case 1F: 2Hander WS with ATT Boost
  293.  
  294. if WS_First_CRatio_Marches2 <= 0.5
  295.     WS_First_fMax_2Hand_Marches = 0.4 + 1.2*WS_First_CRatio_Marches2;
  296. elseif WS_First_CRatio_Marches2 <= 5/6
  297.     WS_First_fMax_2Hand_Marches = 1;
  298. elseif WS_First_CRatio_Marches2 < 2.2
  299.     WS_First_fMax_2Hand_Marches = 1.2*WS_First_CRatio_Marches2;
  300. elseif WS_First_CRatio_Marches2 == 2.2
  301.     WS_First_fMax_2Hand_Marches = 1.2*WS_First_CRatio_Marches2 + 0.05;
  302. end
  303.  
  304. WS_First_fMax_2Hand_Marches_Crit = (WS_First_fMax_2Hand_Marches+1);
  305. if WS_First_fMax_2Hand_Marches_Crit > 3
  306.     WS_First_fMax_2Hand_Marches_Crit = 3;
  307. end
  308.  
  309. WS_First_fMax_2Hand_Marches_Crit = WS_First_fMax_2Hand_Marches_Crit * 1.05;
  310. WS_First_fMax_2Hand_Marches = WS_First_fMax_2Hand_Marches*1.05;
  311.  
  312. if WS_First_CRatio_Marches2 <= 1.25
  313.     WS_First_fMin_2Hand_Marches = -0.5 + 1.2*WS_First_CRatio_Marches2;
  314. elseif WS_First_CRatio_Marches2 <= 1.5;
  315.     WS_First_fMin_2Hand_Marches = 1;
  316. elseif WS_First_CRatio_Marches2 < 2.2
  317.     WS_First_fMin_2Hand_Marches = -0.8+1.2*WS_First_CRatio_Marches2;
  318. elseif WS_First_CRatio_Marches2 == 2.2
  319.     WS_First_fMin_2Hand_Marches = -0.8+1.2*WS_First_CRatio_Marches2;
  320. end
  321.  
  322. if WS_First_fMin_2Hand_Marches < 0
  323.     WS_First_fMin_2Hand_Marches = 0;
  324. end
  325. WS_First_fMin_2Hand_Marches_Crit = WS_First_fMin_2Hand_Marches+1;
  326.  
  327. Haste_Magic_Marches = Haste_Magic + 0.09;
  328. if Haste_Magic_Marches > 0.4375;
  329.     Haste_Magic_Marches = 0.4375;
  330. end
  331.  
  332. Haste_Marches = Haste_Gear + Haste_Magic_Marches + Haste_JA; %Haste Total
  333. if Haste_Marches > 0.8
  334.     Haste_Marches = 0.8;
  335. end
  336.  
  337. Round_Rate = 1/(1-Haste_Marches);
  338. Time_To_100 = ((Delay/Round_Rate)*Hits_to_WS/(1+DA_Rate) + 120)/60;
  339.  
  340. %Going to make an assumption pdif is evenly distributed in the range min ->
  341. %max.
  342. pDIF_1Hand_Marches_avg = (fMin_1Hand_Marches+fMax_1Hand_Marches)/2;
  343. pDIF_2Hand_Marches_avg = (fMin_2Hand_Marches+fMax_2Hand_Marches)/2;
  344.  
  345. pDIF_1Hand_Marches_avg_Crit = (fMin_1Hand_Marches_Crit+fMax_1Hand_Marches_Crit)/2;
  346. pDIF_2Hand_Marches_avg_Crit = (fMin_2Hand_Marches_Crit+fMax_2Hand_Marches_Crit)/2;
  347.  
  348. pDIF_1Hand_Marches_avg_withCrit = ((1-Crit_Rate)*(pDIF_1Hand_Marches_avg)+(Crit_Rate)*(pDIF_1Hand_Marches_avg_Crit));
  349. pDIF_2Hand_Marches_avg_withCrit = ((1-Crit_Rate)*(pDIF_2Hand_Marches_avg)+(Crit_Rate)*(pDIF_2Hand_Marches_avg_Crit));
  350.  
  351. WS_pDIF_1Hand_Marches_avg = (WS_fMin_1Hand_Marches+WS_fMax_1Hand_Marches)/2;
  352. WS_pDIF_2Hand_Marches_avg = (WS_fMin_2Hand_Marches+WS_fMax_2Hand_Marches)/2;
  353.  
  354. WS_pDIF_1Hand_Marches_avg_Crit = (WS_fMin_1Hand_Marches_Crit+WS_fMax_1Hand_Marches_Crit)/2;
  355. WS_pDIF_2Hand_Marches_avg_Crit = (WS_fMin_2Hand_Marches_Crit+WS_fMax_2Hand_Marches_Crit)/2;
  356.  
  357. WS_pDIF_1Hand_Marches_avg_withCrit = ((1-WS_Crit_Rate)*(WS_pDIF_1Hand_Marches_avg)+(WS_Crit_Rate)*(WS_pDIF_1Hand_Marches_avg_Crit));
  358. WS_pDIF_2Hand_Marches_avg_withCrit = ((1-WS_Crit_Rate)*(WS_pDIF_2Hand_Marches_avg)+(WS_Crit_Rate)*(WS_pDIF_2Hand_Marches_avg_Crit));
  359.  
  360. WS_First_pDIF_1Hand_Marches_avg = (WS_First_fMin_1Hand_Marches+WS_First_fMax_1Hand_Marches)/2;
  361. WS_First_pDIF_2Hand_Marches_avg = (WS_First_fMin_2Hand_Marches+WS_First_fMax_2Hand_Marches)/2;
  362.  
  363. WS_First_pDIF_1Hand_Marches_avg_Crit = (WS_First_fMin_1Hand_Marches_Crit+WS_First_fMax_1Hand_Marches_Crit)/2;
  364. WS_First_pDIF_2Hand_Marches_avg_Crit = (WS_First_fMin_2Hand_Marches_Crit+WS_First_fMax_2Hand_Marches_Crit)/2;
  365.  
  366. WS_First_pDIF_1Hand_Marches_avg_withCrit = ((1-WS_First_Crit_Rate)*(WS_First_pDIF_1Hand_Marches_avg)+(WS_First_Crit_Rate)*(WS_First_pDIF_1Hand_Marches_avg_Crit));
  367. WS_First_pDIF_2Hand_Marches_avg_withCrit = ((1-WS_First_Crit_Rate)*(WS_First_pDIF_2Hand_Marches_avg)+(WS_First_Crit_Rate)*(WS_First_pDIF_2Hand_Marches_avg_Crit));
  368.  
  369. Damage_To_100_1Hand_Marches = Hits_to_WS*WD_TP*pDIF_1Hand_Marches_avg_withCrit;
  370. Damage_To_100_2Hand_Marches = Hits_to_WS*WD_TP*pDIF_2Hand_Marches_avg_withCrit;
  371.  
  372. if WS_Att_Boost == 1 %I've replaced pDIF averages on the first hit with the highest possible average here - as magic numbers. Sorry!
  373.     if WS_Crits == 0
  374.         WS_Damage_1Hand_Marches = (WD_WS)*WS_fTP*WS_First_pDIF_1Hand_Marches_avg + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_1Hand_Marches_avg;
  375.         WS_Damage_2Hand_Marches = (WD_WS)*WS_fTP*WS_First_pDIF_2Hand_Marches_avg + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_2Hand_Marches_avg;
  376.     else
  377.         WS_Damage_1Hand_Marches = (WD_WS)*WS_fTP*WS_First_pDIF_1Hand_Marches_avg_withCrit + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_1Hand_Marches_avg_withCrit;
  378.         WS_Damage_2Hand_Marches = (WD_WS)*WS_fTP*WS_First_pDIF_2Hand_Marches_avg_withCrit + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_2Hand_Marches_avg_withCrit;
  379.     end
  380. else
  381.     if WS_Crits == 1
  382.         WS_Damage_1Hand_Marches = (WD_WS)*WS_fTP*WS_pDIF_1Hand_Marches_avg_withCrit + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_1Hand_Marches_avg_withCrit;
  383.         WS_Damage_2Hand_Marches = (WD_WS)*WS_fTP*WS_pDIF_2Hand_Marches_avg_withCrit + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_2Hand_Marches_avg_withCrit;
  384.     else
  385.         WS_Damage_1Hand_Marches = (WD_WS)*WS_fTP*(WS_pDIF_1Hand_Marches_avg) + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*(WS_pDIF_1Hand_Marches_avg);
  386.         WS_Damage_2Hand_Marches = (WD_WS)*WS_fTP*(WS_pDIF_2Hand_Marches_avg) + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*(WS_pDIF_2Hand_Marches_avg);
  387.     end
  388. end
  389.  
  390. DPS_1Hand_Marches = (WS_Damage_1Hand_Marches+Damage_To_100_1Hand_Marches)/Time_To_100
  391. DPS_2Hand_Marches = (WS_Damage_2Hand_Marches+Damage_To_100_2Hand_Marches)/Time_To_100
  392.  
  393. %Case 2: VMarch and Min4
  394.  
  395. CRatio_MarchMin = Att_Base+66/Enemy_Def;
  396. WS_CRatio_MarchMin = WS_Att_Base+66/Enemy_Def;
  397. WS_First_CRatio_MarchMin = WS_First_Att_Base+66/Enemy_Def;
  398.  
  399. if Enemy_Level > Level
  400.     CRatio_MarchMin = CRatio_MarchMin - 0.050 * (Enemy_Level - Level);
  401.     WS_CRatio_MarchMin = WS_CRatio_MarchMin - 0.050 * (Enemy_Level - Level);
  402. end
  403.  
  404. %TP CRatio
  405. if CRatio_MarchMin < 0
  406.     CRatio_MarchMin = 0;
  407. end
  408. if CRatio_MarchMin > 2
  409.     CRatio_MarchMin1 = 2;
  410. else
  411.     CRatio_MarchMin1 = CRatio_MarchMin;
  412. end
  413. if CRatio_MarchMin > 2.2
  414.     CRatio_MarchMin2 = 2.2;
  415. else
  416.     CRatio_MarchMin1 = CRatio_MarchMin;
  417. end
  418.  
  419. %WS_CRatio
  420. if WS_CRatio_MarchMin < 0
  421.     WS_CRatio_MarchMin = 0;
  422. end
  423. if WS_CRatio_MarchMin > 2
  424.     WS_CRatio_MarchMin1 = 2;
  425. else
  426.     WS_CRatio_MarchMin1 = WS_CRatio_MarchMin;
  427. end
  428. if WS_CRatio_MarchMin > 2.2
  429.     WS_CRatio_MarchMin2 = 2.2;
  430. else
  431.     WS_CRatio_MarchMin1 = WS_CRatio_MarchMin;
  432. end
  433.  
  434. %WS_CRatio w/ ATT Boosted first hit.
  435. if WS_First_CRatio_MarchMin < 0
  436.     WS_First_CRatio_MarchMin = 0;
  437. end
  438. if WS_First_CRatio_MarchMin > 2
  439.     WS_First_CRatio_MarchMin1 = 2;
  440. else
  441.     WS_First_CRatio_MarchMin1 = WS_First_CRatio_MarchMin;
  442. end
  443. if WS_First_CRatio_MarchMin > 2.2
  444.     WS_First_CRatio_MarchMin2 = 2.2;
  445. else
  446.     WS_First_CRatio_MarchMin2 = WS_First_CRatio_MarchMin;
  447. end
  448.  
  449. %Case 2A: 1Hander
  450. if CRatio_MarchMin1 < 0.5
  451.     fMax_1Hand_MarchMin = 0.4 + 1.2*CRatio_MarchMin1;
  452. elseif CRatio_MarchMin1 <= 5/6
  453.     fMax_1Hand_MarchMin = 1;
  454. elseif CRatio_MarchMin1 < 2
  455.     fMax_1Hand_MarchMin = 1.2*CRatio_MarchMin1;
  456. elseif CRatio_MarchMin1 == 2
  457.     fMax_1Hand_MarchMin = 1.2*CRatio_MarchMin1 + 0.05;
  458. end
  459.  
  460. fMax_1Hand_MarchMin_Crit = (fMax_1Hand_MarchMin+1);
  461. if fMax_1Hand_MarchMin_Crit > 3
  462.     fMax_1Hand_MarchMin_Crit = 3;
  463. end
  464.  
  465. fMax_1Hand_MarchMin_Crit = fMax_1Hand_MarchMin_Crit * 1.05;
  466. fMax_1Hand_MarchMin = fMax_1Hand_MarchMin * 1.05;
  467.  
  468. if CRatio_MarchMin1 < 1.25
  469.     fMin_1Hand_MarchMin = -0.5 + 1.2*CRatio_MarchMin1;
  470. elseif 1.25 < CRatio_MarchMin1 <= 1.5
  471.     fMin_1Hand_MarchMin = 1;
  472. elseif 1.5 < CRatio_MarchMin1 < 2
  473.     fMin_1Hand_MarchMin = -0.8+1.2*CRatio_MarchMin1;
  474. elseif CRatio_MarchMin1 == 2
  475.     fMin_1Hand_MarchMin = -0.82+1.2*CRatio_MarchMin1;
  476. end
  477. if fMin_1Hand_MarchMin < 0
  478.     fMin_1Hand_MarchMin = 0;
  479. end
  480.  
  481. fMin_1Hand_MarchMin_Crit = fMin_1Hand_MarchMin+1;
  482.  
  483. %Case 2B: 2Hander - note that unlike 1Hand I am not 100% certain on pDIF
  484. %numbers.
  485.  
  486. if CRatio_MarchMin2 <= 0.5
  487.     fMax_2Hand_MarchMin = 0.4 + 1.2*CRatio_MarchMin2;
  488. elseif CRatio_MarchMin2 <= 5/6
  489.     fMax_2Hand_MarchMin = 1;
  490. elseif CRatio_MarchMin2 < 2.2
  491.     fMax_2Hand_MarchMin = 1.2*CRatio_MarchMin2;
  492. elseif CRatio_MarchMin2 == 2.2
  493.     fMax_2Hand_MarchMin = 1.2*CRatio_MarchMin2 + 0.05;
  494. end
  495.  
  496. fMax_2Hand_MarchMin_Crit = (fMax_2Hand_MarchMin+1);
  497. if fMax_2Hand_MarchMin_Crit > 3
  498.     fMax_2Hand_MarchMin_Crit = 3;
  499. end
  500.  
  501. fMax_2Hand_MarchMin_Crit = fMax_2Hand_MarchMin_Crit * 1.05;
  502. fMax_2Hand_MarchMin = fMax_2Hand_MarchMin*1.05;
  503.  
  504. if CRatio_MarchMin2 <= 1.25
  505.     fMin_2Hand_MarchMin = -0.5 + 1.2*CRatio_MarchMin2;
  506. elseif CRatio_MarchMin2 <= 1.5;
  507.     fMin_2Hand_MarchMin = 1;
  508. elseif CRatio_MarchMin2 < 2.2
  509.     fMin_2Hand_MarchMin = -0.8+1.2*CRatio_MarchMin2;
  510. elseif CRatio_MarchMin2 == 2.2
  511.     fMin_2Hand_MarchMin = -0.8+1.2*CRatio_MarchMin2;
  512. end
  513.  
  514. if fMin_2Hand_MarchMin < 0
  515.     fMin_2Hand_MarchMin = 0;
  516. end
  517. fMin_2Hand_MarchMin_Crit = fMin_2Hand_MarchMin+1;
  518.  
  519. %Case 2C: 1Hander WS
  520.  
  521. if WS_CRatio_MarchMin1 < 0.5
  522.     WS_fMax_1Hand_MarchMin = 0.4 + 1.2*WS_CRatio_MarchMin1;
  523. elseif WS_CRatio_MarchMin1 <= 5/6
  524.     WS_fMax_1Hand_MarchMin = 1;
  525. elseif WS_CRatio_MarchMin1 < 2
  526.     WS_fMax_1Hand_MarchMin = 1.2*WS_CRatio_MarchMin1;
  527. elseif WS_CRatio_MarchMin1 == 2
  528.     WS_fMax_1Hand_MarchMin = 1.2*WS_CRatio_MarchMin1 + 0.05;
  529. end
  530.  
  531. WS_fMax_1Hand_MarchMin_Crit = (WS_fMax_1Hand_MarchMin+1);
  532. if WS_fMax_1Hand_MarchMin_Crit > 3
  533.     WS_fMax_1Hand_MarchMin_Crit = 3;
  534. end
  535.  
  536. WS_fMax_1Hand_MarchMin_Crit = WS_fMax_1Hand_MarchMin_Crit * 1.05;
  537. WS_fMax_1Hand_MarchMin = WS_fMax_1Hand_MarchMin * 1.05;
  538.  
  539. if WS_CRatio_MarchMin1 < 1.25
  540.     WS_fMin_1Hand_MarchMin = -0.5 + 1.2*WS_CRatio_MarchMin1;
  541. elseif 1.25 < WS_CRatio_MarchMin1 <= 1.5
  542.     WS_fMin_1Hand_MarchMin = 1;
  543. elseif 1.5 < WS_CRatio_MarchMin1 < 2
  544.     WS_fMin_1Hand_MarchMin = -0.8+1.2*WS_CRatio_MarchMin1;
  545. elseif WS_CRatio_MarchMin1 == 2
  546.     WS_fMin_1Hand_MarchMin = -0.82+1.2*WS_CRatio_MarchMin1;
  547. end
  548. if WS_fMin_1Hand_MarchMin < 0
  549.     WS_fMin_1Hand_MarchMin = 0;
  550. end
  551.  
  552. WS_fMin_1Hand_MarchMin_Crit = WS_fMin_1Hand_MarchMin+1;
  553.  
  554. %Case 2D: 2Hander WS
  555.  
  556. if WS_CRatio_MarchMin2 <= 0.5
  557.     WS_fMax_2Hand_MarchMin = 0.4 + 1.2*WS_CRatio_MarchMin2;
  558. elseif WS_CRatio_MarchMin2 <= 5/6
  559.     WS_fMax_2Hand_MarchMin = 1;
  560. elseif WS_CRatio_MarchMin2 < 2.2
  561.     WS_fMax_2Hand_MarchMin = 1.2*WS_CRatio_MarchMin2;
  562. elseif WS_CRatio_MarchMin2 == 2.2
  563.     WS_fMax_2Hand_MarchMin = 1.2*WS_CRatio_MarchMin2 + 0.05;
  564. end
  565.  
  566. WS_fMax_2Hand_MarchMin_Crit = (WS_fMax_2Hand_MarchMin+1);
  567. if WS_fMax_2Hand_MarchMin_Crit > 3
  568.     WS_fMax_2Hand_MarchMin_Crit = 3;
  569. end
  570.  
  571. WS_fMax_2Hand_MarchMin_Crit = WS_fMax_2Hand_MarchMin_Crit * 1.05;
  572. WS_fMax_2Hand_MarchMin = WS_fMax_2Hand_MarchMin*1.05;
  573.  
  574. if WS_CRatio_MarchMin2 <= 1.25
  575.     WS_fMin_2Hand_MarchMin = -0.5 + 1.2*WS_CRatio_MarchMin2;
  576. elseif WS_CRatio_MarchMin2 <= 1.5;
  577.     WS_fMin_2Hand_MarchMin = 1;
  578. elseif WS_CRatio_MarchMin2 < 2.2
  579.     WS_fMin_2Hand_MarchMin = -0.8+1.2*WS_CRatio_MarchMin2;
  580. elseif WS_CRatio_MarchMin2 == 2.2
  581.     WS_fMin_2Hand_MarchMin = -0.8+1.2*WS_CRatio_MarchMin2;
  582. end
  583.  
  584. if WS_fMin_2Hand_MarchMin < 0
  585.     WS_fMin_2Hand_MarchMin = 0;
  586. end
  587. WS_fMin_2Hand_MarchMin_Crit = WS_fMin_2Hand_MarchMin+1;
  588.  
  589. %Case 2E: 1Hander WS with ATT Boost
  590.  
  591. if WS_First_CRatio_MarchMin1 < 0.5
  592.     WS_First_fMax_1Hand_MarchMin = 0.4 + 1.2*WS_First_CRatio_MarchMin1;
  593. elseif WS_First_CRatio_MarchMin1 <= 5/6
  594.     WS_First_fMax_1Hand_MarchMin = 1;
  595. elseif WS_First_CRatio_MarchMin1 < 2
  596.     WS_First_fMax_1Hand_MarchMin = 1.2*WS_First_CRatio_MarchMin1;
  597. elseif WS_First_CRatio_MarchMin1 == 2
  598.     WS_First_fMax_1Hand_MarchMin = 1.2*WS_First_CRatio_MarchMin1 + 0.05;
  599. end
  600.  
  601. WS_First_fMax_1Hand_MarchMin_Crit = (WS_First_fMax_1Hand_MarchMin+1);
  602. if WS_First_fMax_1Hand_MarchMin_Crit > 3
  603.     WS_First_fMax_1Hand_MarchMin_Crit = 3;
  604. end
  605.  
  606. WS_First_fMax_1Hand_MarchMin_Crit = WS_First_fMax_1Hand_MarchMin_Crit * 1.05;
  607. WS_First_fMax_1Hand_MarchMin = WS_First_fMax_1Hand_MarchMin * 1.05;
  608.  
  609. if WS_First_CRatio_MarchMin1 < 1.25
  610.     WS_First_fMin_1Hand_MarchMin = -0.5 + 1.2*WS_First_CRatio_MarchMin1;
  611. elseif 1.25 < WS_First_CRatio_MarchMin1 <= 1.5
  612.     WS_First_fMin_1Hand_MarchMin = 1;
  613. elseif 1.5 < WS_First_CRatio_MarchMin1 < 2
  614.     WS_First_fMin_1Hand_MarchMin = -0.8+1.2*WS_First_CRatio_MarchMin1;
  615. elseif WS_First_CRatio_MarchMin1 == 2
  616.     WS_First_fMin_1Hand_MarchMin = -0.82+1.2*WS_First_CRatio_MarchMin1;              
  617. end
  618. if WS_First_fMin_1Hand_MarchMin < 0
  619.     WS_First_fMin_1Hand_MarchMin = 0;
  620. end
  621.  
  622. WS_First_fMin_1Hand_MarchMin_Crit = WS_First_fMin_1Hand_MarchMin+1;
  623.  
  624. %Case 2F: 2Hander WS with ATT Boost
  625.  
  626. if WS_First_CRatio_MarchMin2 <= 0.5
  627.     WS_First_fMax_2Hand_MarchMin = 0.4 + 1.2*WS_First_CRatio_MarchMin2;
  628. elseif WS_First_CRatio_MarchMin2 <= 5/6
  629.     WS_First_fMax_2Hand_MarchMin = 1;
  630. elseif WS_First_CRatio_MarchMin2 < 2.2
  631.     WS_First_fMax_2Hand_MarchMin = 1.2*WS_First_CRatio_MarchMin2;
  632. elseif WS_First_CRatio_MarchMin2 == 2.2
  633.     WS_First_fMax_2Hand_MarchMin = 1.2*WS_First_CRatio_MarchMin2 + 0.05;
  634. end
  635.  
  636. WS_First_fMax_2Hand_MarchMin_Crit = (WS_First_fMax_2Hand_MarchMin+1);
  637. if WS_First_fMax_2Hand_MarchMin_Crit > 3
  638.     WS_First_fMax_2Hand_MarchMin_Crit = 3;
  639. end
  640.  
  641. WS_First_fMax_2Hand_MarchMin_Crit = WS_First_fMax_2Hand_MarchMin_Crit * 1.05;
  642. WS_First_fMax_2Hand_MarchMin = WS_First_fMax_2Hand_MarchMin*1.05;
  643.  
  644. if WS_First_CRatio_MarchMin2 <= 1.25
  645.     WS_First_fMin_2Hand_MarchMin = -0.5 + 1.2*WS_First_CRatio_MarchMin2;
  646. elseif WS_First_CRatio_MarchMin2 <= 1.5;
  647.     WS_First_fMin_2Hand_MarchMin = 1;
  648. elseif WS_First_CRatio_MarchMin2 < 2.2
  649.     WS_First_fMin_2Hand_MarchMin = -0.8+1.2*WS_First_CRatio_MarchMin2;
  650. elseif WS_First_CRatio_MarchMin2 == 2.2
  651.     WS_First_fMin_2Hand_MarchMin = -0.8+1.2*WS_First_CRatio_MarchMin2;
  652. end
  653.  
  654. if WS_First_fMin_2Hand_MarchMin < 0
  655.     WS_First_fMin_2Hand_MarchMin = 0;
  656. end
  657. WS_First_fMin_2Hand_MarchMin_Crit = WS_First_fMin_2Hand_MarchMin+1;
  658.  
  659. Haste_MarchMin = Haste_Gear + Haste_Magic + Haste_JA; %Haste Total
  660. if Haste_MarchMin > 0.8
  661.     Haste_MarchMin = 0.8;
  662. end
  663.  
  664. Round_Rate = 1/(1-Haste_MarchMin);
  665. Time_To_100 = ((Delay/Round_Rate)*Hits_to_WS/(1+DA_Rate) + 120)/60;
  666.  
  667. %Going to make an assumption pdif is evenly distributed in the range min ->
  668. %max.
  669. pDIF_1Hand_MarchMin_avg = (fMin_1Hand_MarchMin+fMax_1Hand_MarchMin)/2;
  670. pDIF_2Hand_MarchMin_avg = (fMin_2Hand_MarchMin+fMax_2Hand_MarchMin)/2;
  671.  
  672. pDIF_1Hand_MarchMin_avg_Crit = (fMin_1Hand_MarchMin_Crit+fMax_1Hand_MarchMin_Crit)/2;
  673. pDIF_2Hand_MarchMin_avg_Crit = (fMin_2Hand_MarchMin_Crit+fMax_2Hand_MarchMin_Crit)/2;
  674.  
  675. pDIF_1Hand_MarchMin_avg_withCrit = ((1-Crit_Rate)*(pDIF_1Hand_MarchMin_avg)+(Crit_Rate)*(pDIF_1Hand_MarchMin_avg_Crit));
  676. pDIF_2Hand_MarchMin_avg_withCrit = ((1-Crit_Rate)*(pDIF_2Hand_MarchMin_avg)+(Crit_Rate)*(pDIF_2Hand_MarchMin_avg_Crit));
  677.  
  678. WS_pDIF_1Hand_MarchMin_avg = (WS_fMin_1Hand_MarchMin+WS_fMax_1Hand_MarchMin)/2;
  679. WS_pDIF_2Hand_MarchMin_avg = (WS_fMin_2Hand_MarchMin+WS_fMax_2Hand_MarchMin)/2;
  680.  
  681. WS_pDIF_1Hand_MarchMin_avg_Crit = (WS_fMin_1Hand_MarchMin_Crit+WS_fMax_1Hand_MarchMin_Crit)/2;
  682. WS_pDIF_2Hand_MarchMin_avg_Crit = (WS_fMin_2Hand_MarchMin_Crit+WS_fMax_2Hand_MarchMin_Crit)/2;
  683.  
  684. WS_pDIF_1Hand_MarchMin_avg_withCrit = ((1-WS_Crit_Rate)*(WS_pDIF_1Hand_MarchMin_avg)+(WS_Crit_Rate)*(WS_pDIF_1Hand_MarchMin_avg_Crit));
  685. WS_pDIF_2Hand_MarchMin_avg_withCrit = ((1-WS_Crit_Rate)*(WS_pDIF_2Hand_MarchMin_avg)+(WS_Crit_Rate)*(WS_pDIF_2Hand_MarchMin_avg_Crit));
  686.  
  687. WS_First_pDIF_1Hand_MarchMin_avg = (WS_First_fMin_1Hand_MarchMin+WS_First_fMax_1Hand_MarchMin)/2;
  688. WS_First_pDIF_2Hand_MarchMin_avg = (WS_First_fMin_2Hand_MarchMin+WS_First_fMax_2Hand_MarchMin)/2;
  689.  
  690. WS_First_pDIF_1Hand_MarchMin_avg_Crit = (WS_First_fMin_1Hand_MarchMin_Crit+WS_First_fMax_1Hand_MarchMin_Crit)/2;
  691. WS_First_pDIF_2Hand_MarchMin_avg_Crit = (WS_First_fMin_2Hand_MarchMin_Crit+WS_First_fMax_2Hand_MarchMin_Crit)/2;
  692.  
  693. WS_First_pDIF_1Hand_MarchMin_avg_withCrit = ((1-WS_First_Crit_Rate)*(WS_First_pDIF_1Hand_MarchMin_avg)+(WS_First_Crit_Rate)*(WS_First_pDIF_1Hand_MarchMin_avg_Crit));
  694. WS_First_pDIF_2Hand_MarchMin_avg_withCrit = ((1-WS_First_Crit_Rate)*(WS_First_pDIF_2Hand_MarchMin_avg)+(WS_First_Crit_Rate)*(WS_First_pDIF_2Hand_MarchMin_avg_Crit));
  695.  
  696. Damage_To_100_1Hand_MarchMin = Hits_to_WS*WD_TP*pDIF_1Hand_MarchMin_avg_withCrit;
  697. Damage_To_100_2Hand_MarchMin = Hits_to_WS*WD_TP*pDIF_2Hand_MarchMin_avg_withCrit;
  698.  
  699. if WS_Att_Boost == 1 %I've replaced pDIF averages on the first hit with the highest possible average here - as magic numbers. Sorry!
  700.     if WS_Crits == 0
  701.         WS_Damage_1Hand_MarchMin = (WD_WS)*WS_fTP*WS_First_pDIF_1Hand_MarchMin_avg + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_1Hand_MarchMin_avg;
  702.         WS_Damage_2Hand_MarchMin = (WD_WS)*WS_fTP*WS_First_pDIF_2Hand_MarchMin_avg + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_2Hand_MarchMin_avg;
  703.     else
  704.         WS_Damage_1Hand_MarchMin = (WD_WS)*WS_fTP*WS_First_pDIF_1Hand_MarchMin_avg_withCrit + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_1Hand_MarchMin_avg_withCrit;
  705.         WS_Damage_2Hand_MarchMin = (WD_WS)*WS_fTP*WS_First_pDIF_2Hand_MarchMin_avg_withCrit + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_2Hand_MarchMin_avg_withCrit;
  706.     end
  707. else
  708.     if WS_Crits == 1
  709.         WS_Damage_1Hand_MarchMin = (WD_WS)*WS_fTP*WS_pDIF_1Hand_MarchMin_avg_withCrit + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_1Hand_MarchMin_avg_withCrit;
  710.         WS_Damage_2Hand_MarchMin = (WD_WS)*WS_fTP*WS_pDIF_2Hand_MarchMin_avg_withCrit + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*WS_pDIF_2Hand_MarchMin_avg_withCrit;
  711.     else
  712.         WS_Damage_1Hand_MarchMin = (WD_WS)*WS_fTP*(WS_pDIF_1Hand_MarchMin_avg) + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*(WS_pDIF_1Hand_MarchMin_avg);
  713.         WS_Damage_2Hand_MarchMin = (WD_WS)*WS_fTP*(WS_pDIF_2Hand_MarchMin_avg) + (Hits_on_WS+WS_DA_Rate-1)*WD_WS_Extra*(WS_pDIF_2Hand_MarchMin_avg);
  714.     end
  715. end
  716.  
  717. DPS_1Hand_MarchMin = (WS_Damage_1Hand_MarchMin+Damage_To_100_1Hand_MarchMin)/Time_To_100
  718. DPS_2Hand_MarchMin = (WS_Damage_2Hand_MarchMin+Damage_To_100_2Hand_MarchMin)/Time_To_100
RAW Paste Data
Top