Improved randomness (part 1) (#7882)
Faster and with no module bias Removed rnd_init, rnd_uint32 and rnd_uniform From now on we will only use rnd_value(min, max) for values in range [min, max] and rnd_chance(chance, base) for chances Fixes #7881 Fixes #7883 Fixes #7884 Fixes #7885 Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
@@ -421,7 +421,7 @@ bool mercenary_dead(s_mercenary_data *md) {
|
||||
void mercenary_killbonus(s_mercenary_data *md) {
|
||||
std::vector<sc_type> scs = { SC_MERC_FLEEUP, SC_MERC_ATKUP, SC_MERC_HPUP, SC_MERC_SPUP, SC_MERC_HITUP };
|
||||
|
||||
sc_start(&md->bl,&md->bl, util::vector_random(scs), 100, rnd() % 5, 600000);
|
||||
sc_start(&md->bl,&md->bl, util::vector_random(scs), 100, rnd_value(1, 5), 600000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user