HDR-Development / HewDraw-Remix

GNU Affero General Public License v3.0
96 stars 86 forks source link

Luigi Misfire is guaranteed on the 6th Green Missile or earlier, not the 8th #2500

Closed cynidea closed 3 weeks ago

cynidea commented 3 months ago

I performed an experiment where I repeatedly used Luigi's side special until I got a total of 100 Misfires, and tallied up how many attempts it took for each one. Results are below:

image

By the intended implementation, I should be seeing instances where Misfire occurs on the 7th or 8th side special, but no such instances ever occurred out of these 100 Misfires.

It is worth noting that I've entered this data into a chi-square calculator, which did not find this distribution statistically significant when assuming a 1/6th expected chance for each category.

So if you really wanted to, you could just not touch any code, declare this a simple buff to side special, and call it a day. :^)

SuddyN commented 3 months ago

Good catch. It seems that the code for calculating misfire fails our assumptions in two ways

What this means is that in reality a range of 7 numbers is generated (not 8), and then that is shifted down to 6. The actual odds (for now) are:

This makes the misfire guaranteed in 6, and biased toward 1st try (twice as likely).

jobrien97 commented 3 weeks ago

Fixed in v0.47.0 pre-release