statistics_dialog: Don't show probability of the actual result

To simplify the stats dialog, show two percentages, instead of three
percentages that add up to 100%.

https://github.com/wesnoth/wesnoth/pull/4070#discussion_r285874571
This commit is contained in:
josteph 2019-05-22 10:47:07 +00:00
parent 061edc2bb3
commit e2638c9d84
2 changed files with 1 additions and 4 deletions

View file

@ -565,7 +565,7 @@
{_GUI_DAMAGE_STATS_LIST
(_ "Hits") stats_list_hits hits_type hits_overall hits_this_turn
(_"stats dialog^Number of hits (actual / expected)")
(_"stats dialog^<i>A priori</i> probabilities of hitting less than, exactly, and more than the actual number of hits")}
(_"stats dialog^<i>A priori</i> probabilities of hitting less than and more than the actual number of hits")}
[/column]
[/row]

View file

@ -255,7 +255,6 @@ static hitrate_table_element tally(const statistics::stats::hitrate_map& by_cth,
for(unsigned int i = 0; i < overall_hits; ++i) {
probability_lt += chance_of_exactly_N_hits(i);
}
double probability_eq = chance_of_exactly_N_hits(overall_hits);
double probability_gt = 0.0;
for(unsigned int i = final_hp_dist.size() - 1; i > overall_hits; --i) {
probability_gt += chance_of_exactly_N_hits(i);
@ -273,8 +272,6 @@ static hitrate_table_element tally(const statistics::stats::hitrate_map& by_cth,
// TODO: document for users what these values are.
add_probability(probability_lt, !more_is_better);
str2 << ", ";
str2 << get_probability_string(probability_eq);
str2 << ", ";
add_probability(probability_gt, more_is_better);
}
}