Guest User

Untitled

a guest
Jul 15th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 2.23 KB | None | 0 0
  1. ap_ratio = (0.1:0.05:2.5);
  2. mr = (0:5:400);
  3.  
  4. [apr,emr] = meshgrid(ap_ratio,mr);
  5.  
  6. base_spell = 250;
  7. lvl = 13;
  8.  
  9. ap_from_runes = 24;
  10. ap_from_masteries = 4+lvl;
  11. ap_bonus = 1.05; %percent
  12. mpen_from_runes = 8.5;
  13. mpen_from_masteries = 0.9; %percent
  14.  
  15. doranx2_ap = 15*2;
  16. sorc_boots_mpen = 20;
  17. base_mpen = mpen_from_runes + sorc_boots_mpen;
  18.  
  19. abyssal_ap = 70;
  20. abyssal_mr = 57;
  21. abyssal_mpen = 20;
  22.  
  23. blasting_wand = 40;
  24.  
  25. dcap_ap = 140;
  26. dcap_ap_bonus = 1.3; %percent
  27.  
  28. base_abyssal_ap = ap_from_runes + ap_from_masteries + doranx2_ap + abyssal_ap + blasting_wand;
  29. total_abyssal_ap = base_abyssal_ap * ap_bonus;
  30.  
  31. %enemy_mr_abyssal = (emr-base_abyssal_mpen)*(mpen_from_masteries);
  32. emr2 = emr - abyssal_mpen;
  33. for i=1:size(emr,1)
  34.     for j=1:size(emr,2)
  35.         if emr2(i,j) < 0
  36.             enemy_mr_abyssal(i,j) = emr2(i,j)
  37.         else
  38.             enemy_mr_abyssal(i,j) = (emr2(i,j) - base_mpen)*(mpen_from_masteries);
  39.             if enemy_mr_abyssal(i,j) < 0
  40.                 enemy_mr_abyssal(i,j) = 0;
  41.             end
  42.         end
  43.     end
  44. end
  45. dmg_reduc_abyssal = 100./(100+enemy_mr_abyssal);
  46.  
  47. abyssal_spell_dmg = (base_spell+apr*total_abyssal_ap).*dmg_reduc_abyssal;
  48.  
  49. base_dcap_ap = ap_from_runes + ap_from_masteries + doranx2_ap + dcap_ap;
  50. total_dcap_ap = base_dcap_ap * ap_bonus * dcap_ap_bonus;
  51.  
  52. for i=1:size(emr,1)
  53.     for j=1:size(emr,2)
  54.         enemy_mr_dcap(i,j) = (emr(i,j) - base_mpen)*(mpen_from_masteries);
  55.         if enemy_mr_dcap(i,j) < 0
  56.             enemy_mr_dcap(i,j) = 0;
  57.         end
  58.     end
  59. end
  60. dmg_reduc_dcap = 100./(100+enemy_mr_dcap);
  61.  
  62. dcap_spell_dmg = (base_spell+apr*total_dcap_ap).*dmg_reduc_dcap;
  63.  
  64. diff = (dcap_spell_dmg - abyssal_spell_dmg)./abyssal_spell_dmg;
  65. size(apr)
  66. size(emr)
  67. size(diff)
  68.  
  69. figure;
  70. contour(apr,emr,abyssal_spell_dmg,2000);
  71. xlabel('AP Ratio');
  72. ylabel('Enemy MR');
  73. hold on;
  74. title('Abyssal');
  75. % zlabel('HP After Bonuses');
  76.  
  77. colorbar;
  78. hold off;
  79.  
  80. figure;
  81. contour(apr,emr,dcap_spell_dmg,2000);
  82. xlabel('AP Ratio');
  83. ylabel('Enemy MR');
  84. hold on;
  85. title('DCap');
  86. % zlabel('HP After Bonuses');
  87.  
  88. colorbar;
  89. hold off;
  90.  
  91. figure;
  92. contour(apr,emr,diff,2000);
  93. xlabel('AP Ratio');
  94. ylabel('Enemy MR');
  95. hold on;
  96. title('Abyssal vs. DCap');
  97. % zlabel('HP After Bonuses');
  98.  
  99. colorbar;
Add Comment
Please, Sign In to add comment