Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.37 KB | None | 0 0
  1. import random
  2. import matplotlib.pyplot as plt
  3.  
  4. random.seed()
  5. basechance = 0.02
  6. failstack = basechance / 10;
  7.  
  8. #GREEN
  9. costGreen = 0
  10. #BOSS
  11. costBoss = 0
  12.  
  13. currentFailstack = 40
  14. stacks = 0
  15.  
  16. #prices
  17. failstackcosts = {40: 75, 45: 119, 50:201, 55: 296, 60: 408, 65:541 , 70:704, 75: 906, 80:1159}
  18.  
  19. differentCosts = []
  20. differentCosts2 = {}
  21.  
  22. for y in range(45, 81, 5):
  23.     for x in range(1, 400000):
  24.         roll = round(random.uniform(0, 1), 2);
  25.         if(roll > basechance + failstack * currentFailstack):
  26.             currentFailstack += 5
  27.             costGreen += 120
  28.             costBoss += 199
  29.             if currentFailstack == y:
  30.                 stacks += 1
  31.                 currentFailstack = 40
  32.         else:
  33.             costGreen += failstackcosts[currentFailstack]
  34.             costBoss += failstackcosts[currentFailstack]
  35.             costGreen -= 150
  36.             costBoss -= 707
  37.             currentFailstack = 40
  38.     currentFailstack = 40
  39.     if stacks != 0:
  40.         differentCosts.append((costBoss - costGreen) / stacks);
  41.         differentCosts2.update({y: (costBoss - costGreen) / stacks})
  42.        
  43.         costGreen = 0
  44.         costBoss = 0
  45.        
  46.         stacks = 0
  47.     else:
  48.         differentCosts.append(0);
  49.  
  50. #print ("COST ENHANCING WITH GRUNIL/HEVE:",costGreen)
  51. #print ("COST ENHANCING WITH BOSS GEAR :",costBoss)
  52. #print ("MILLONES SAVED PER 60 STACK:",(costBoss - costGreen) / stacks)
  53.  
  54. print (differentCosts2)
  55. print (list(differentCosts2.keys()))
  56. plt.plot(differentCosts2.keys(), differentCosts2.values())
  57. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement