cout << "# of sides Opponent needs to Pass 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.
cin >> save;
save = (1-reroll(save));
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