From 39d7b6d55c7cfc4e9045ae1bee93ccc1e7578a75 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Mon, 28 Mar 2022 01:09:25 +0900 Subject: [PATCH] =?UTF-8?q?fix:=201=EC=9D=B8=EA=B5=AD=20n=EC=9E=A5=20?= =?UTF-8?q?=EA=B5=B0=EC=A3=BC=EC=9D=BC=EB=95=8C=20=EB=B0=9C=EC=83=9D?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?-=2012=EC=9B=94,=206=EC=9B=94=20=EC=A7=80=EA=B8=89=EB=A5=A0=20?= =?UTF-8?q?=EA=B3=84=EC=82=B0=20=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/GeneralAI.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 4c0d217c..662034cc 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -4095,17 +4095,18 @@ class GeneralAI return 20; } + $nationGenerals = $this->nationGenerals; + $nationGenerals[] = $this->general; + $dedicationList = array_map(function (General $general) { return $general->getRaw(); - }, array_filter($this->nationGenerals, function (General $rawGeneral) { - return $rawGeneral->getVar('officer_level') != 5; - })); + }, $nationGenerals); $goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList); $warIncome = getWarGoldIncome($nation['type'], $cityList); $income = $goldIncome + $warIncome; - $outcome = getOutcome(100, $dedicationList); + $outcome = Util::valueFit(getOutcome(100, $dedicationList), 1); $bill = intval($income / $outcome * 90); // 수입의 90% 만 지급 if ($nation['gold'] + $income - $outcome > $this->nationPolicy->reqNationGold * 2) { @@ -4138,11 +4139,12 @@ class GeneralAI return 20; } + $nationGenerals = $this->nationGenerals; + $nationGenerals[] = $this->general; + $dedicationList = array_map(function (General $general) { return $general->getRaw(); - }, array_filter($this->nationGenerals, function (General $rawGeneral) { - return $rawGeneral->getVar('npc') != 5; - })); + }, $nationGenerals); $riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList); $wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);