Issue Data
|
Issue #21775: Mehrunes Razor Crit Chance Incorrect
Mehrune's razor has a comment stating that it should have a 1% chance to instakill its target. The way the code is set up also suggests this. See the code snippet from DA07MehrunesRazorMagicEffectScript:
<code>;1 percent chance to kill target If (Utility.RandomInt() <= 1)</code> However, Utility.RandomInt has a default minimum of 0, and maximum of 100 ([[https://www.creationkit.com/index.php?title=RandomInt_-_Utility|CK documentation]]) This means that it's checking if the random number is either 0 or 1 out of 100, meaning the effective chance is 2/101. According to the CK documentation, we can just pass it a parameter that sets the minimum int to 1 so that the crit chance is correct like so: <code>If (Utility.RandomInt(int aiMin = 1, int aiMax = 100) <= 1)</code> |
Related Issues: 24327