// Apply Must optionsfor(size_t i =0; i <this->slots.size(); i++){// Try to apply an entryfor(size_t j =0, max =this->slots[static_cast<uint16>(i)].size()*3; j < max; j++){
std::shared_ptr<s_random_opt_group_entry> option = util::vector_random(this->slots[static_cast<uint16>(i)]);if( rnd_chance<uint16>(option->chance,10000)){
apply_sub( item.option[i], option );break;}}// If no entry was applied, assign oneif( item.option[i].id ==0){
std::shared_ptr<s_random_opt_group_entry> option = util::vector_random(this->slots[static_cast<uint16>(i)]);// Apply an entry without checking the chance
apply_sub( item.option[i], option );}}
Here for must options.
The implementation choose to equally choose from options from slot, then do the chance check.
I think this might not be logical if the there is a big difference for the chance in each option
Another question is that what is the *3 for? Is it just for increasing the probability to pass chance check?
Question
ptrs810812
Here for must options.
The implementation choose to equally choose from options from slot, then do the chance check.
I think this might not be logical if the there is a big difference for the chance in each option
Another question is that what is the *3 for? Is it just for increasing the probability to pass chance check?
I wonder if this is to follow official logic.
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.