fix: ReqCities, ReqRegion 버그

This commit is contained in:
2025-01-21 17:13:37 +00:00
parent 9f81c760d0
commit 84fee0f1f2
7 changed files with 52 additions and 42 deletions
+2 -2
View File
@@ -2570,7 +2570,7 @@ class GeneralAI
$types = [];
foreach (GameUnitConst::byType($armType) as $crewtype) {
if ($crewtype->isValid($cities, $regions, $relYear, $tech)) {
if ($crewtype->isValid($general, $cities, $regions, $relYear, $tech)) {
$score = $crewtype->pickScore($tech);
$types[$crewtype->id] = $score;
}
@@ -2584,7 +2584,7 @@ class GeneralAI
if ($this->generalPolicy->can고급병종) {
$currCrewType = $general->getCrewTypeObj();
if ($currCrewType->isValid($cities, $regions, $relYear, $tech)) {
if ($currCrewType->isValid($general, $cities, $regions, $relYear, $tech)) {
$reqTechObj = $currCrewType->reqConstraints['reqTech'] ?? null;
if($reqTechObj){
$reqTech = $reqTechObj->getValue($tech);