Functions | |
| bool | enabled () |
| Returns true if the current game uses the biased random mode with a local RNG. More... | |
| int | roll_credit (randomness::rng &rng) |
| Rolls the credit a combatant starts a fight with. More... | |
| bool | roll_hit (randomness::rng &rng, int strikes_left, int chance_to_hit, int &credit) |
| Rolls one strike. More... | |
| bool biased_rng::enabled | ( | ) |
Returns true if the current game uses the biased random mode with a local RNG.
Definition at line 78 of file attack.cpp.
References resources::classification, randomness::generator, randomness::rng::is_networked(), and game_classification::random_mode.
Referenced by events::mouse_handler::fill_weapon_choices(), gui2::text_history::get_history(), gui2::dialogs::campaign_selection::pre_show(), hotkey::command_executor_default::set_button_state(), and gui2::text_history::set_enabled().
| int biased_rng::roll_credit | ( | randomness::rng & | rng | ) |
Rolls the credit a combatant starts a fight with.
Definition at line 83 of file attack.cpp.
References randomness::rng::get_random_int().
| bool biased_rng::roll_hit | ( | randomness::rng & | rng, |
| int | strikes_left, | ||
| int | chance_to_hit, | ||
| int & | credit | ||
| ) |
Rolls one strike.
strikes_left includes this strike.
Definition at line 88 of file attack.cpp.
References randomness::rng::get_random_int().