The Battle for Wesnoth  1.19.28+dev
Functions
biased_rng Namespace Reference

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...
 

Function Documentation

◆ enabled()

bool biased_rng::enabled ( )

◆ roll_credit()

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().

◆ roll_hit()

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().