fix: 사전거병 후 군주가 사라지는 경우에 대한 수정

This commit is contained in:
포스트모더니즘
2023-12-29 12:07:59 +09:00
parent f24aea0120
commit 69f4d8e2c7
2 changed files with 10 additions and 4 deletions
@@ -90,6 +90,10 @@ class BuildNationCandidate extends \sammo\BaseAPI
return '거병을 실패했습니다.';
}
if ($general->getNPCType() < 2){
$general->setVar('killturn', $env['killturn']);
}
return null;
}
}
+6 -4
View File
@@ -3438,10 +3438,12 @@ class GeneralAI
$cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env);
if (!$cmd->hasFullConditionMet()) {
return buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
}
return $cmd;
if ($cmd->hasFullConditionMet()) return $cmd;
$cmd = buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
if ($cmd->hasFullConditionMet()) return $cmd;
return buildGeneralCommandClass('che_견문', $this->general, $this->env);
}
protected function categorizeNationCities(): void