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

Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/247
This commit was merged in pull request #247.
This commit is contained in:
2024-02-17 00:01:34 +09:00
2 changed files with 8 additions and 1 deletions
@@ -90,6 +90,9 @@ class BuildNationCandidate extends \sammo\BaseAPI
return '거병을 실패했습니다.'; return '거병을 실패했습니다.';
} }
$general->setVar('killturn', $env['killturn']);
$general->applyDB($db);
return null; return null;
} }
} }
+5 -1
View File
@@ -3439,8 +3439,12 @@ class GeneralAI
$cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env); $cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env);
if (!$cmd->hasFullConditionMet()) { if (!$cmd->hasFullConditionMet()) {
return buildGeneralCommandClass('che_물자조달', $this->general, $this->env); $cmd = buildGeneralCommandClass('che_물자조달', $this->general, $this->env);
if (!$cmd->hasFullConditionMet()) {
$cmd = buildGeneralCommandClass('che_견문', $this->general, $this->env);
}
} }
return $cmd; return $cmd;
} }