From 69f4d8e2c767b33197cc702416e2d697bad57a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=8F=AC=EC=8A=A4=ED=8A=B8=EB=AA=A8=EB=8D=94=EB=8B=88?= =?UTF-8?q?=EC=A6=98?= <> Date: Fri, 29 Dec 2023 12:07:59 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=EC=82=AC=EC=A0=84=EA=B1=B0=EB=B3=91?= =?UTF-8?q?=20=ED=9B=84=20=EA=B5=B0=EC=A3=BC=EA=B0=80=20=EC=82=AC=EB=9D=BC?= =?UTF-8?q?=EC=A7=80=EB=8A=94=20=EA=B2=BD=EC=9A=B0=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/API/General/BuildNationCandidate.php | 4 ++++ hwe/sammo/GeneralAI.php | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hwe/sammo/API/General/BuildNationCandidate.php b/hwe/sammo/API/General/BuildNationCandidate.php index 5a4b2d1b..8d32e5ae 100644 --- a/hwe/sammo/API/General/BuildNationCandidate.php +++ b/hwe/sammo/API/General/BuildNationCandidate.php @@ -90,6 +90,10 @@ class BuildNationCandidate extends \sammo\BaseAPI return '거병을 실패했습니다.'; } + if ($general->getNPCType() < 2){ + $general->setVar('killturn', $env['killturn']); + } + return null; } } diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 0b904e00..6bff6e6a 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -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 From dd2b032fa3d9e4692739af7d2761314327574a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=8F=AC=EC=8A=A4=ED=8A=B8=EB=AA=A8=EB=8D=94=EB=8B=88?= =?UTF-8?q?=EC=A6=98?= <> Date: Fri, 26 Jan 2024 22:13:44 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=82=B4=EC=9A=A9=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/API/General/BuildNationCandidate.php | 5 ++--- hwe/sammo/GeneralAI.php | 12 +++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hwe/sammo/API/General/BuildNationCandidate.php b/hwe/sammo/API/General/BuildNationCandidate.php index 8d32e5ae..1dc54bf8 100644 --- a/hwe/sammo/API/General/BuildNationCandidate.php +++ b/hwe/sammo/API/General/BuildNationCandidate.php @@ -90,9 +90,8 @@ class BuildNationCandidate extends \sammo\BaseAPI return '거병을 실패했습니다.'; } - if ($general->getNPCType() < 2){ - $general->setVar('killturn', $env['killturn']); - } + $general->setVar('killturn', $env['killturn']); + $general->applyDB($db); return null; } diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 6bff6e6a..90d830a9 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -3438,12 +3438,14 @@ class GeneralAI $cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env); - if ($cmd->hasFullConditionMet()) return $cmd; + if (!$cmd->hasFullConditionMet()) { + $cmd = buildGeneralCommandClass('che_물자조달', $this->general, $this->env); + } + if (!$cmd->hasFullConditionMet()) { + $cmd = buildGeneralCommandClass('che_견문', $this->general, $this->env); + } - $cmd = buildGeneralCommandClass('che_물자조달', $this->general, $this->env); - if ($cmd->hasFullConditionMet()) return $cmd; - - return buildGeneralCommandClass('che_견문', $this->general, $this->env); + return $cmd; } protected function categorizeNationCities(): void From 2f00aee947382e91a53d8af1717cf0c167f90a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=8F=AC=EC=8A=A4=ED=8A=B8=EB=AA=A8=EB=8D=94=EB=8B=88?= =?UTF-8?q?=EC=A6=98?= <> Date: Fri, 26 Jan 2024 22:17:06 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EC=95=84=EC=A3=BC=20=EC=95=BD=EA=B0=84=20?= =?UTF-8?q?=ED=9A=A8=EC=9C=A8=EC=A0=81=EC=9C=BC=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/GeneralAI.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 90d830a9..7722610c 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -3440,9 +3440,9 @@ class GeneralAI $cmd = buildGeneralCommandClass($this->rng->choice($candidate), $this->general, $this->env); if (!$cmd->hasFullConditionMet()) { $cmd = buildGeneralCommandClass('che_물자조달', $this->general, $this->env); - } - if (!$cmd->hasFullConditionMet()) { - $cmd = buildGeneralCommandClass('che_견문', $this->general, $this->env); + if (!$cmd->hasFullConditionMet()) { + $cmd = buildGeneralCommandClass('che_견문', $this->general, $this->env); + } } return $cmd;