Widget:Calculator/Combat/Max Hit: Difference between revisions
No edit summary |
No edit summary |
||
Line 56: | Line 56: | ||
</table> | </table> | ||
<div class="max-hit-calc__results"> | <div class="max-hit-calc__results"> | ||
<b>Max Hit:</b> <span id="max-hit-result">—</span> | <b>Est. Max Hit:</b> <span id="max-hit-result">—</span> | ||
</div> | </div> | ||
</div> | </div> | ||
Line 86: | Line 86: | ||
} | } | ||
const | const calculatedHit = ( | ||
1.70 + | |||
0.1085 * effectiveStrength + | |||
0.0131 * strengthBonus - | |||
0.0003 * (effectiveStrength ** 2) + | |||
0.0020 * effectiveStrength * strengthBonus - | |||
0.0002 * (strengthBonus ** 2) | |||
); | |||
const maxHit = Math.max(1, Math.round(calculatedHit)); | |||
maxHitResultEl.textContent = maxHit; | maxHitResultEl.textContent = maxHit; | ||
} | } |