def _applyActionSide1(state, act):
me, them, extra = state
if act == 'Super Potion':
me = applyHPChange(me, 50)
return {(me, them, extra): Fraction(1)}
mdata = attack_data[act]
aind = 3 if mdata.isspec else 0
dind = 3 if mdata.isspec else 1
pdiv = 64 if mdata.crit else 512
dmg_dist = getCritDist(me.fixed.lvl, Fraction(me.fixed.basespeed, pdiv),
me.stats[aind], me.fixed.stats[aind], them.stats[
dind], them.fixed.stats[dind],
mdata.power, mdata.stab, mdata.te)
dist = defaultdict(Fraction)
for dmg, p in dmg_dist.items():
them2 = applyHPChange(them, -dmg)
dist[me, them2, extra] += p
return dist
评论列表
文章目录