From c3c2022029a879a67dbf9eb856bcd9a73e36dc38 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 27 Apr 2020 03:09:05 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=B4=EC=A0=95=20=EC=8B=9C=EB=8F=84?= =?UTF-8?q?=EC=9C=A8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_time_event.php | 4 ++-- hwe/sammo/GeneralAI.php | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/hwe/func_time_event.php b/hwe/func_time_event.php index 6c145539..adfdbac0 100644 --- a/hwe/func_time_event.php +++ b/hwe/func_time_event.php @@ -180,7 +180,7 @@ function calcCityGoldIncome(array $rawCity, int $officerCnt, bool $isCapital, in $cityIncome *= 1 + $rawCity['secu']/$rawCity['secu_max']/10; $cityIncome *= pow(1.05, $officerCnt); if($isCapital){ - $cityIncome *= 1 + 1/(3*$nationLevel); + $cityIncome *= 1 + (1/3/$nationLevel); } $cityIncome = Util::round($nationType->onCalcNationalIncome('gold', $cityIncome)); @@ -198,7 +198,7 @@ function calcCityRiceIncome(array $rawCity, int $officerCnt, bool $isCapital, in $cityIncome *= 1 + $rawCity['secu']/$rawCity['secu_max']/10; $cityIncome *= pow(1.05, $officerCnt); if($isCapital){ - $cityIncome *= 1 + 1/(3*$nationLevel); + $cityIncome *= 1 + (1/3/$nationLevel); } $cityIncome = Util::round($nationType->onCalcNationalIncome('rice', $cityIncome)); diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index f14fd17c..cd90fb1a 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -1818,24 +1818,25 @@ class GeneralAI if (!TechLimit($env['startyear'], $env['year'], $nation['tech'])) { $cmd = buildGeneralCommandClass('che_기술연구', $general, $env); if ($cmd->isRunnable()) { + $nextTech = $nation['tech'] % 1000 + 1; if (!TechLimit($env['startyear'], $env['year'], $nation['tech'] + 1000)) { //한등급 이상 뒤쳐져 있다면, 조금 더 열심히 하자. - $cmdList[] = [$cmd, $intel * 2]; + $cmdList[] = [$cmd, $intel / ($nextTech / 3000)]; } else { - $cmdList[] = [$cmd, $intel]; + $cmdList[] = [$cmd, $intel / ($nextTech / 1000)]; } } } if ($develRate['agri'] < 1) { $cmd = buildGeneralCommandClass('che_농지개간', $general, $env); if ($cmd->isRunnable()) { - $cmdList[] = [$cmd, $intel]; + $cmdList[] = [$cmd, $intel / Util::valueFit($develRate['agri'], 0.001, 1)]; } } if ($develRate['comm'] < 1) { $cmd = buildGeneralCommandClass('che_상업투자', $general, $env); if ($cmd->isRunnable()) { - $cmdList[] = [$cmd, $intel]; + $cmdList[] = [$cmd, $intel / Util::valueFit($develRate['comm'], 0.001, 1)]; } } } @@ -1946,11 +1947,12 @@ class GeneralAI if (!TechLimit($env['startyear'], $env['year'], $nation['tech'])) { $cmd = buildGeneralCommandClass('che_기술연구', $general, $env); if ($cmd->isRunnable()) { + $nextTech = $nation['tech'] % 1000 + 1; if (!TechLimit($env['startyear'], $env['year'], $nation['tech'] + 1000)) { //한등급 이상 뒤쳐져 있다면, 조금 더 열심히 하자. - $cmdList[] = [$cmd, $intel * 2]; + $cmdList[] = [$cmd, $intel / ($nextTech / 3000)]; } else { - $cmdList[] = [$cmd, $intel]; + $cmdList[] = [$cmd, $intel / ($nextTech / 1000)]; } } } @@ -1958,10 +1960,10 @@ class GeneralAI $cmd = buildGeneralCommandClass('che_농지개간', $general, $env); if ($cmd->isRunnable()) { if (in_array($city['front'], [1, 3])) { - $cmdList[] = [$cmd, $intel / 4]; + $cmdList[] = [$cmd, $intel / 4 / Util::valueFit($develRate['agri'], 0.001, 1)]; } else{ - $cmdList[] = [$cmd, $intel / 2]; + $cmdList[] = [$cmd, $intel / 2 / Util::valueFit($develRate['agri'], 0.001, 1)]; } } } @@ -1969,10 +1971,10 @@ class GeneralAI $cmd = buildGeneralCommandClass('che_상업투자', $general, $env); if ($cmd->isRunnable()) { if (in_array($city['front'], [1, 3])) { - $cmdList[] = [$cmd, $intel / 4]; + $cmdList[] = [$cmd, $intel / 4 / Util::valueFit($develRate['comm'], 0.001, 1)]; } else{ - $cmdList[] = [$cmd, $intel / 2]; + $cmdList[] = [$cmd, $intel / 2 / Util::valueFit($develRate['comm'], 0.001, 1)]; } } }