Advertisement
Guest User

Calculadora

a guest
Apr 25th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. # To manually test a scenario, simply use the following formula template:
  2. #
  3. # dps(xxx=XXX+n)/dps()
  4. #
  5. # where xxx is the stat being tested (dr, cr, cdr, br, bdr, pdr) and XXX is the same stat, but written in all caps, and n is its change in value.
  6. # Capital stats represent your current, static values. Lowercase stats represent your hypothetical new values.
  7. # You can test multiple changes simultaneously by separating with commas
  8. # and you can use negative values to simulate losing stats, ie testing one artifact against another. For example:
  9. #
  10. # dps(cr=CR+122,cdr=CDR+591,dr=DR-150,br=BR-141)/dps()
  11. #
  12. # would simluate your DPS change if you gained 122 Critical Rating, 591 Critical Damage Rating, but lost 150 Damage Rating and 141 Brutal Rating.
  13. # dps() is your current total damage multiplier.
  14. # The change is expressed as a percentile, so 1.015 would mean you'd gain 1.5% total damage multiplier (essentially 1.5% DPS) with the
  15. # simulated change versus your current numbers.
  16. # IAS changes need to be modeled separately using this formula:
  17. #
  18. # (1+(speed(IAS+n)/100))/(1+(speed(IAS)/100)
  19. #
  20. # and replace n with the positive or negative change in IAS in full percent (ie +5% IAS would replace n with 5).
  21. # As with dps, IAS changes are expressed as a percentile that expresses total DPS change; remember that IAS changes will only affect powers
  22. # that have an Attack Speed in their tooltip, and will not benefit DOT dps.
  23.  
  24. #Input current ratings as they appear in your Character Sheet
  25. IAS <- 19.8 #Increased Attack Speed as a full percentage (ie 12.5%)
  26. DR <- 3899+846 #Total Damage Rating for applicable types (ie, Energy/Physical/Mental rating plus Ranged/Melee rating)
  27. CR <- 3182+3182+3813-2*3182 #Total Critical Strike rating for applicable types (E/P/M rating plus R/M rating plus Area rating minus 2*base Critical Rating)
  28. CDR <- 4227 #Critical Damage Rating
  29. BR <- 1318 #Brutal Strike Rating
  30. BDR <- 2408 #Brutal Damage Rating
  31. hela <-20 #Brutal Strike Chance flat bonuses (ie 5% per Blessing of Hela)
  32. PDR <- 18+32+2 #Total percentage damage bonuses (Base plus E/P/M plus R/M)
  33.  
  34. #calculate DPS
  35. dps <- function(dr=DR, cr=CR, cdr=CDR, br=BR, bdr=BDR, pdr=PDR) {
  36. dam <- ((dr/60)*1.5/100)+(pdr/100)
  37. crit <- (99*cr)/((cr+(60*60))+1)/100
  38. cdam <- (150+(cdr/60*.75))/100
  39. brut <- (((br*75)/(br+3601))/100)+(hela/100)
  40. bdam <- (300+((bdr+cdr)/60*.75))/100
  41. calc <- (1+dam)*(1+((crit-(crit*brut))*cdam))*(1+((crit*brut)*bdam))
  42. return(calc)
  43. }
  44.  
  45. #This is your current total damage multiplier
  46. dps()
  47.  
  48. #calculate IAS
  49. speed <- function(ias=IAS){
  50. if (ias<=12.5){
  51. return(ias)
  52. } else {
  53. s1 <- (40*(1-exp((-3*(ias/100)))))
  54. return(s1)
  55. }
  56. }
  57.  
  58. #iterate for increased stats
  59. a <- round(dps(dr=DR+100)/dps(), digits=3)
  60. b <- round(dps(cr=CR+100)/dps(), digits=3)
  61. c <- round(dps(cdr=CDR+100)/dps(), digits=3)
  62. d <- round(dps(br=BR+100)/dps(), digits=3)
  63. e <- round(dps(bdr=BDR+100)/dps(), digits=3)
  64. f <- round(dps(pdr=PDR+1)/dps(), digits=3)
  65. g <- round((1+(speed(IAS+1)/100))/(1+(speed(IAS)/100)), digits=3)
  66.  
  67. # Ratings displayed here roughly equate to "weights" for stats. Ie, if CR shows 1.015 and DR shows 1.010, that means getting 100 points of CR is
  68. # better than 100 points of DR. All things being equal, try to add the stat with the highest weight for the most increase to your DPS.
  69.  
  70. matrix(c("100 more DR","100 more CR","100 more CDR","100 more BR","100 more BDR","1% more Damage","1% more IAS",a,b,c,d,e,f,g),ncol=2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement