Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- BLACK_STONE_COST = 210000
- DURABILITY_COST = 6450
- CLEANSE_COST = 100000
- NUMBER_OF_RUNS = 1000000
- TARGET_STACK = 15
- total_cost = 0
- runs = 0
- while runs < NUMBER_OF_RUNS:
- stack = 0
- while stack < TARGET_STACK:
- total_cost += BLACK_STONE_COST
- if random.random() < (0.02 + (0.002 * stack)):
- #Enhance successful
- total_cost += CLEANSE_COST
- stack = 0
- else:
- #Enhance failed
- total_cost += DURABILITY_COST
- stack += 1
- runs += 1
- print(round(total_cost/NUMBER_OF_RUNS, 0))
Advertisement
Add Comment
Please, Sign In to add comment