Tuesday, October 25, 2011

c0dehammer v0.1a - Combining "216" with Rerolls - Save Revision

In our last post we had the problem of how to deal with our Opponents Saving Throw if he has a reroll. What we learned is that if we take his failing sides of the dice and put that through our reroll() function it actually gives us a better chance of beating them. This obviously does that make sense. What we must do is think slightly backwards.

cout << "# of sides Opponent needs to Pass Save: ";
cin >> save;
save = (1-reroll(save));
Instead of asking what our opponents failures are we ask what the probability of passing his saving throw would be. From there we can properly get his success rate with a reroll. Now obviously we cannot use that number, as we would just run into the opposite problem as we had before. If we minus the percentage by 1, we can get the inverse percentage.

If our opponent has a 50% chance of passing, and therefore a 75% chance with a reroll, if we take 1 minus 0.75 we will get 0.25 or 25% of failing. Now that we have this we can play it right into our 216 calculation which may or may not exist anymore. Cheers.

No comments:

Post a Comment