int_diff = a.int - b.int success = false if int_diff >= 100 success = rand(16) < 12 elsif int_diff >= 50 success = rand(16) < 4 end if success # do your job end
int_diff = a.int - b.int (int_diff >= 100 ? rand(16) < 12 : int_diff >= 50 && rand(16) < 4) && do_your_job
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |