diff --git a/hwe/func_process.php b/hwe/func_process.php index 4a955f1a..20c62bf0 100644 --- a/hwe/func_process.php +++ b/hwe/func_process.php @@ -156,8 +156,8 @@ function CriticalRatioDomestic($general, $type) { $fail = pow($ratio / 1.2, 1.4) - 0.3; $success = pow($ratio / 1.2, 1.5) - 0.25; - $fail = min(max($fail, 0), 0.5); - $success = min(max($success, 0), 0.5); + $fail = Util::valueFit($fail, 0, 0.5); + $success = Util::valueFit($success, 0, 0.5); return array( diff --git a/hwe/func_tournament.php b/hwe/func_tournament.php index 214b2266..f926d342 100644 --- a/hwe/func_tournament.php +++ b/hwe/func_tournament.php @@ -329,7 +329,7 @@ function fillLowGenAll() { $gameStor->tournament = 2; $gameStor->phase = 0; - $currentJoinerCnt = sum($grpCount); + $currentJoinerCnt = array_sum($grpCount); if($currentJoinerCnt == 64){ return; }