View Single Post
  #5  
Old 08-15-2023, 12:55 PM
Lune Lune is offline
Banned


Join Date: Mar 2013
Posts: 3,354
Default

Quote:
Originally Posted by Jimjam [You must be logged in to view images. Log in or Register.]
Great code you found.

Shouldn’t the presence of 2 rolls (roll for attack and roll for defence) create a normal distribution (like how rolling 2d6 creates a bell curve where 2 and 12 are 1/36 each, 3 and 11 are 3/36 going up to the most common result, 7 which is 6/36)?

The question is why aren’t hits amounts on mr turtle looking very normally distributed? Each fight he has like 100 hits for 1 specific hit value and the many (more than 19) other hit values tend to only occur a couple of times??

Edit: Interestingly mr turtle himself only hit for one value (like 30 times per fight).
Yes, 2d10 with the formula:

int index = std::max(0, (atk_roll - def_roll) + (avg / 2))

is going to be normally distributed. However, rounding all the outputs up is going to skew it slightly rightward. Also skewed higher than the expected cluster around 10 with 2d10 by the addition of avg/2 to roll difference. Evidence:

[You must be logged in to view images. Log in or Register.]

I believe the reason Mr. Turtle isn't normally distributed is because of this:

auto atk_roll = zone->random.Roll0(offense + 5);
auto def_roll = zone->random.Roll0(mitigation + 5);

int avg = (offense + mitigation + 10) / 2;

The modifiers on your hits are overwhelming the modifiers on his defense, producing consistently high outputs. The fact that mitigation is added to offense tells me the calculation for mitigation might result in a negative value or it is modified in some other way before final result.
Last edited by Lune; 08-15-2023 at 01:11 PM..
Reply With Quote