Advertisement
Guest User

Stacking AS Source

a guest
Jul 15th, 2022
1,950
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.30 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2.  
  3.  
  4. # final variables
  5. base_AS = 0.75
  6. rb_increment = base_AS * .06        # rb = Rageblade
  7. rb_AS = base_AS * .1
  8.  
  9.  
  10. # no rageblade scenario
  11. attack_speed = base_AS
  12. auto = 1
  13. time_until_attack = 1 / attack_speed
  14. points = []
  15. points.append((0, 0))
  16. for centisecond in range(3100):
  17.     if time_until_attack < 0:
  18.         points.append((centisecond / 100, auto))
  19.         time_until_attack = 1 / attack_speed
  20.         auto += 1
  21.     time_until_attack -= 0.01
  22.  
  23. xs = [x[0] for x in points]
  24. ys = [x[1] for x in points]
  25. plt.plot(xs, ys, label = 'No Rageblade')
  26.  
  27.  
  28. # one rageblade scenario
  29. attack_speed = base_AS + rb_AS
  30. auto = 1
  31. time_until_attack = 1 / attack_speed
  32. points = []
  33. capped = False
  34. points.append((0, 0))
  35. for centisecond in range(3100):
  36.     if attack_speed > 5:
  37.         capped = True
  38.         attack_speed = 5
  39.         time_until_attack = 1 / attack_speed
  40.     if time_until_attack < 0 and capped == False:
  41.         points.append((centisecond / 100, auto))
  42.         attack_speed += rb_increment
  43.         time_until_attack = 1 / attack_speed
  44.         auto += 1
  45.     elif time_until_attack < 0 and capped == True:
  46.         points.append((centisecond / 100, auto))
  47.         time_until_attack = 1 / attack_speed
  48.         auto += 1
  49.     time_until_attack -= 0.01
  50.  
  51. xs = [x[0] for x in points]
  52. ys = [x[1] for x in points]
  53. plt.plot(xs, ys, label = '1 Rageblade')
  54.  
  55.  
  56. # two rageblades scenario
  57. attack_speed = base_AS + rb_AS * 2
  58. auto = 1
  59. time_until_attack = 1 / attack_speed
  60. points = []
  61. capped = False
  62. points.append((0, 0))
  63. for centisecond in range(3100):
  64.     if attack_speed > 5:
  65.         capped = True
  66.         attack_speed = 5
  67.         time_until_attack = 1 / attack_speed
  68.     if time_until_attack < 0 and capped == False:
  69.         points.append((centisecond / 100, auto))
  70.         attack_speed += 2 * rb_increment
  71.         time_until_attack = 1 / attack_speed
  72.         auto += 1
  73.     elif time_until_attack < 0 and capped == True:
  74.         points.append((centisecond / 100, auto))
  75.         time_until_attack = 1 / attack_speed
  76.         auto += 1
  77.     time_until_attack -= 0.01
  78.  
  79. xs = [x[0] for x in points]
  80. ys = [x[1] for x in points]
  81. plt.plot(xs, ys, label = '2 Rageblades')
  82.  
  83.  
  84. # three rageblades scenario
  85. attack_speed = base_AS + rb_AS * 3
  86. auto = 1
  87. time_until_attack = 1 / attack_speed
  88. points = []
  89. capped = False
  90. points.append((0, 0))
  91. for centisecond in range(3100):
  92.     if attack_speed > 5:
  93.         capped = True
  94.         attack_speed = 5
  95.         time_until_attack = 1 / attack_speed
  96.     if time_until_attack < 0 and capped == False:
  97.         points.append((centisecond / 100, auto))
  98.         attack_speed += 3 * rb_increment
  99.         time_until_attack = 1 / attack_speed
  100.         auto += 1
  101.     elif time_until_attack < 0 and capped == True:
  102.         points.append((centisecond / 100, auto))
  103.         time_until_attack = 1 / attack_speed
  104.         auto += 1
  105.     time_until_attack -= 0.01
  106.  
  107. xs = [x[0] for x in points]
  108. ys = [x[1] for x in points]
  109. plt.plot(xs, ys, label = '3 Rageblades')
  110.  
  111.  
  112. # one rageblade and RFC scenario
  113. attack_speed = base_AS + rb_AS + base_AS * 0.5
  114. auto = 1
  115. time_until_attack = 1 / attack_speed
  116. points = []
  117. capped = False
  118. points.append((0, 0))
  119. for centisecond in range(3100):
  120.     if attack_speed > 5:
  121.         capped = True
  122.         attack_speed = 5
  123.         time_until_attack = 1 / attack_speed
  124.     if time_until_attack < 0 and capped == False:
  125.         points.append((centisecond / 100, auto))
  126.         attack_speed += rb_increment
  127.         time_until_attack = 1 / attack_speed
  128.         auto += 1
  129.     elif time_until_attack < 0 and capped == True:
  130.         points.append((centisecond / 100, auto))
  131.         time_until_attack = 1 / attack_speed
  132.         auto += 1
  133.     time_until_attack -= 0.01
  134.  
  135. xs = [x[0] for x in points]
  136. ys = [x[1] for x in points]
  137. plt.plot(xs, ys, label = '1 Rageblade and RFC')
  138.  
  139.  
  140. # plotting/formatting stuff
  141. plt.xlabel('Seconds', fontsize=16)
  142. plt.ylabel('Autos', fontsize=16)
  143. plt.legend(loc = 'upper left')
  144. plt.title('Total Autos based on Number of Rageblades (0.75 base AS)', fontdict={'fontsize': 18})
  145.  
  146. plt.grid(b=True, which='major', color='blue', linestyle='-', linewidth = 0.5)
  147. plt.grid(b=True, which='minor', color='gray', linestyle='-', linewidth = 0.1)
  148. plt.minorticks_on()
  149. plt.yticks(fontsize=14)
  150. plt.xticks(fontsize=14)
  151. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement