fix: 비쟁장에 쟁장 공식이 섞여서, 최소 포상 금쌀이 꼬이는 문제 수정

This commit is contained in:
2021-11-26 19:53:12 +09:00
parent e845777735
commit 82c8441e1d
+5 -8
View File
@@ -1321,17 +1321,15 @@ class GeneralAI
} }
if ($isWarGeneral) { if ($isWarGeneral) {
$reqHumanMinRes = $reqHumanMinWarRes;
} else {
$reqHumanMinRes = $reqHumanMinDevelRes;
}
$crewtype = $targetUserGeneral->getCrewTypeObj(); $crewtype = $targetUserGeneral->getCrewTypeObj();
$reqMoney = $crewtype->costWithTech($this->nation['tech'], Util::toInt($targetUserGeneral->getLeadership(false))) * 100 * 6 * 1.1; $reqMoney = $crewtype->costWithTech($this->nation['tech'], Util::toInt($targetUserGeneral->getLeadership(false))) * 100 * 6 * 1.1;
if ($this->env['year'] > $this->env['startyear'] + 3) { if ($this->env['year'] > $this->env['startyear'] + 3) {
$reqMoney = max($reqMoney, $reqHumanMinRes); $reqMoney = max($reqMoney, $reqHumanMinWarRes);
} }
$enoughMoney = $reqMoney * 1.2; $enoughMoney = $reqMoney * 1.2;
} else {
$enoughMoney = $reqHumanMinDevelRes * 1.2;
}
if ($targetUserGeneral->getVar($resName) >= $reqMoney) { if ($targetUserGeneral->getVar($resName) >= $reqMoney) {
continue; continue;
@@ -3090,8 +3088,7 @@ class GeneralAI
if ($movingTargetCityID === $currCityID) { if ($movingTargetCityID === $currCityID) {
$movingTargetCityID = null; $movingTargetCityID = null;
} } else if (key_exists($movingTargetCityID, $occupiedCities)) {
else if(key_exists($movingTargetCityID, $occupiedCities)){
$movingTargetCityID = null; $movingTargetCityID = null;
} }