GrumpyGamer
First Post
I wrote a quick python script to take a look at greatswords vs greataxes with the Great Weapon Fighting style.
>>> dicesim_py(100000,2,6)
(8.33177, 0.05091)
>>> dicesim_py(100000,1,12)
(7.32378, 0.09736)
From the results it looks like 2d6 does 1 more point of damage, but d12 hits for max twice as often.
I would not be shocked to find an issue with my script. Does this match expectations?
Code:
import random
def dicesim_py(n, ndice, dicetype):
t = 0
m = 0
for i in range(n): # repeat N experiments
s = 0
for j in range(ndice):
r = random.randint(1, dicetype) # roll die dicetype
if r <= 2: # reroll 1 or 2
r = random.randint(1, dicetype)
t = t+r
s = s+r
if s == dicetype*ndice: # successful event?
m += 1
a = float(t)/n # average
p = float(m)/n # count of max results
return a,p
>>> dicesim_py(100000,2,6)
(8.33177, 0.05091)
>>> dicesim_py(100000,1,12)
(7.32378, 0.09736)
From the results it looks like 2d6 does 1 more point of damage, but d12 hits for max twice as often.
I would not be shocked to find an issue with my script. Does this match expectations?