내정 시도율 변경

This commit is contained in:
2020-04-27 03:09:05 +09:00
parent fb08e86a4c
commit c3c2022029
2 changed files with 14 additions and 12 deletions
+2 -2
View File
@@ -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));
+12 -10
View File
@@ -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)];
}
}
}