fix: AI 후방 발령 로직 버그 수정
- 징병시 인구 소모가 없는 경우 후방 발령 제외 - NPC 수뇌일때와 유저 수뇌일 때 도시 인구 계산식 다른 버그 수정
This commit is contained in:
+14
-6
@@ -673,6 +673,9 @@ class GeneralAI
|
|||||||
if ($userGeneral->getVar('crew') >= $this->nationPolicy->minWarCrew) {
|
if ($userGeneral->getVar('crew') >= $this->nationPolicy->minWarCrew) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($userGeneral->onCalcDomestic('징집인구', 'score', 100) <= 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$generalCadidates[$generalID] = $userGeneral;
|
$generalCadidates[$generalID] = $userGeneral;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -686,9 +689,10 @@ class GeneralAI
|
|||||||
|
|
||||||
/** @var General */
|
/** @var General */
|
||||||
$pickedGeneral = $this->rng->choice($generalCadidates);
|
$pickedGeneral = $this->rng->choice($generalCadidates);
|
||||||
$minRecruitPop = $this->fullLeadership * 100 + GameConst::$minAvailableRecruitPop;
|
$pickedGeneralLeadership = $pickedGeneral->getLeadership(false, true, true, true);
|
||||||
if (!$this->generalPolicy->can한계징병) {
|
$minRecruitPop = $pickedGeneralLeadership * 100 + GameConst::$minAvailableRecruitPop;
|
||||||
$minRecruitPop = max($minRecruitPop, $this->fullLeadership * 100 + $this->nationPolicy->minNPCRecruitCityPopulation);
|
if($pickedGeneral->getNPCType() >= 2) {
|
||||||
|
$minRecruitPop = max($minRecruitPop, $pickedGeneralLeadership * 100 + $this->nationPolicy->minNPCRecruitCityPopulation);
|
||||||
}
|
}
|
||||||
|
|
||||||
$recruitableCityList = [];
|
$recruitableCityList = [];
|
||||||
@@ -972,6 +976,9 @@ class GeneralAI
|
|||||||
if ($npcGeneral->getVar('crew') >= $this->nationPolicy->minWarCrew) {
|
if ($npcGeneral->getVar('crew') >= $this->nationPolicy->minWarCrew) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($npcGeneral->onCalcDomestic('징집인구', 'score', 100) <= 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$generalCadidates[$generalID] = $npcGeneral;
|
$generalCadidates[$generalID] = $npcGeneral;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -985,9 +992,10 @@ class GeneralAI
|
|||||||
|
|
||||||
/** @var General */
|
/** @var General */
|
||||||
$pickedGeneral = $this->rng->choice($generalCadidates);
|
$pickedGeneral = $this->rng->choice($generalCadidates);
|
||||||
$minRecruitPop = $this->fullLeadership * 100 + GameConst::$minAvailableRecruitPop;
|
$pickedGeneralLeadership = $pickedGeneral->getLeadership(false, true, true, true);
|
||||||
if (!$this->generalPolicy->can한계징병) {
|
$minRecruitPop = $pickedGeneralLeadership * 100 + GameConst::$minAvailableRecruitPop;
|
||||||
$minRecruitPop = max($minRecruitPop, $this->fullLeadership * 100 + $this->nationPolicy->minNPCRecruitCityPopulation);
|
if($pickedGeneral->getNPCType() >= 2) {
|
||||||
|
$minRecruitPop = max($minRecruitPop, $pickedGeneralLeadership * 100 + $this->nationPolicy->minNPCRecruitCityPopulation);
|
||||||
}
|
}
|
||||||
|
|
||||||
$recruitableCityList = [];
|
$recruitableCityList = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user