import matplotlib.pyplot as plt
import numpy as np
base_attack = 10000.00
attack = 25000.00
rate = 2.5
ex = ((0.016*base_attack)/attack*100.00)/rate
ex_max = rate * 100.00
x = np.linspace(0, 300, 600)
# 8 piece curse
y1 = np.where(x <= 100, 30 + 0.2*x, 30 + 0.2*100)
# 4C + 4E
y2 = np.where(x <= 100, 20 + 0.1*x + (ex*x)*(1.2 + 0.001*x),
np.where(x <= ex_max, 30 + ex*x*1.3, 30 + ex*ex_max*1.3))
diff = np.abs(y1 - y2)
intersection_index = np.argmin(diff)
intersection_x = x[intersection_index]
intersection_y = y1[intersection_index]
plt.figure(figsize=(8, 6))
plt.plot(x, y1, label='8 piece Curse', color='blue')
plt.plot(x, y2, label='4 Curse + 4 Expert', color='red')
plt.scatter(intersection_x, intersection_y, color='green', zorder=5)
plt.text(intersection_x + 5, intersection_y - 8, f'time={intersection_x:.2f} s\ndmg={intersection_y:.2f} %',
fontsize=10, color='green')
plt.xlabel('Time')
plt.ylabel('Damage Increase')
plt.ylim(0, None)
plt.title('Damage Increase Over Time (curse vs expert)')
plt.text(180, 15, f"Parameters\nAttack: {int(attack/1000)}k\nExpert stacks rate: {rate}s", fontsize=10, bbox=dict(facecolor='white', alpha=0.5))
plt.legend()
plt.grid(True)
plt.show()
Click Run or press shift + ENTER to run code