Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use normal distribution to generate random height in new character screen #49270

Merged
merged 9 commits into from
Jul 7, 2021
4 changes: 3 additions & 1 deletion src/newcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3298,7 +3298,9 @@ tab_direction set_description( avatar &you, const bool allow_reroll,
no_name_entered = you.name.empty();
}
you.set_base_age( rng( 16, 55 ) );
you.set_base_height( rng( 145, 200 ) );
// Height distribution data is taken from this paper:
// http://www.biostat.jhsph.edu/bstcourse/bio751/papers/bimodalHeight.pdf
you.set_base_height( round( you.male ? normal_roll( 176.0, 7.4 ) : normal_roll( 162.8, 7.0 ) ) );
Tairesh marked this conversation as resolved.
Show resolved Hide resolved
you.randomize_blood();
} else if( action == "CHANGE_GENDER" ) {
you.male = !you.male;
Expand Down