Created
March 26, 2019 18:42
-
-
Save dbgarf/f885ddbd5b9d6134f9ae318ae9158459 to your computer and use it in GitHub Desktop.
poe bleed dps calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def bleed_multiplier(min_d, max_d, aps, chance, duration, trials=10000, ruthless=True, fossil=True, rys=True): | |
min_new = min_d | |
max_new = max_d | |
if rys: | |
min_new = int(0.7*min_d) | |
max_new = int(1.4*max_d) | |
totals = [] | |
# simulate a set of trials | |
for i in range(0, trials): | |
bleeds = [] | |
# simulation of each trial in the set | |
for t in range(0, int(aps*duration)): | |
if random.randint(0, 99) < chance: | |
bleed = random.randint(min_new, max_new) | |
if fossil and random.randint(0, 99) < 60: | |
bleed *= 2 | |
if ruthless: | |
if t % 3 == 2: | |
bleed = int(bleed*1.5472) | |
else: | |
bleed = int(bleed/1.3767) | |
# generate the total for this trial by taking the 8 largest bleed instances | |
bleeds.append(bleed) | |
bleeds.sort(reverse=True) | |
total = sum(bleeds[0:8]) | |
totals.append(total) | |
avg = sum(totals) / trials | |
return (2 * avg) / (min_d + max_d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment