From 9aa1b25a56f1c4b7684ff7edb8d1e99ede4bb3b0 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 12 Aug 2021 22:35:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?use=20class,=20function=20=EC=BB=A4?= =?UTF-8?q?=EB=A7=A8=EB=93=9C=EB=A5=BC=20php8=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95=20-=20\=20=ED=86=A0=ED=81=B0=20?= =?UTF-8?q?=ED=95=B4=EC=84=9D=20=EB=AC=B8=EC=A0=9C=20-=20VSCode=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EC=99=84=EC=84=B1=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=EB=A1=9C=20use=20function=20\sammo\{=20=EB=A5=BC=20=EB=AA=A8?= =?UTF-8?q?=EB=91=90=20=ED=95=B4=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .phan/config.php | 8 ++-- composer.json | 2 +- f_install/templates/KakaoKey.orig.php | 1 + hwe/sammo/Command/BaseCommand.php | 4 +- hwe/sammo/Command/General/che_강행.php | 26 +++++------ hwe/sammo/Command/General/che_건국.php | 29 +++++------- hwe/sammo/Command/General/che_견문.php | 4 +- hwe/sammo/Command/General/che_군량매매.php | 5 +- hwe/sammo/Command/General/che_귀환.php | 7 +-- .../Command/General/che_내정특기초기화.php | 6 +-- hwe/sammo/Command/General/che_단련.php | 5 +- hwe/sammo/Command/General/che_등용.php | 12 ++--- hwe/sammo/Command/General/che_등용수락.php | 10 +--- hwe/sammo/Command/General/che_모반시도.php | 7 --- hwe/sammo/Command/General/che_모병.php | 28 +++++------ hwe/sammo/Command/General/che_물자조달.php | 8 +--- hwe/sammo/Command/General/che_방랑.php | 5 -- hwe/sammo/Command/General/che_사기진작.php | 5 +- hwe/sammo/Command/General/che_상업투자.php | 12 ++--- hwe/sammo/Command/General/che_선동.php | 15 +++--- hwe/sammo/Command/General/che_선양.php | 31 ++++++------- hwe/sammo/Command/General/che_소집해제.php | 5 -- hwe/sammo/Command/General/che_숙련전환.php | 39 +++++++--------- hwe/sammo/Command/General/che_요양.php | 5 -- hwe/sammo/Command/General/che_이동.php | 27 +++++------ hwe/sammo/Command/General/che_인재탐색.php | 34 ++++++-------- hwe/sammo/Command/General/che_임관.php | 9 ++-- hwe/sammo/Command/General/che_장비매매.php | 6 +-- .../Command/General/che_장수대상임관.php | 11 ++--- hwe/sammo/Command/General/che_전투태세.php | 6 +-- .../Command/General/che_전투특기초기화.php | 5 +- hwe/sammo/Command/General/che_정착장려.php | 12 ++--- hwe/sammo/Command/General/che_주민선정.php | 12 ++--- hwe/sammo/Command/General/che_증여.php | 32 ++++++------- hwe/sammo/Command/General/che_집합.php | 5 +- hwe/sammo/Command/General/che_징병.php | 35 ++++++-------- hwe/sammo/Command/General/che_첩보.php | 31 ++++++------- hwe/sammo/Command/General/che_출병.php | 29 +++++------- hwe/sammo/Command/General/che_하야.php | 5 -- hwe/sammo/Command/General/che_헌납.php | 30 ++++++------ hwe/sammo/Command/General/che_화계.php | 27 +++++------ hwe/sammo/Command/General/che_훈련.php | 5 +- hwe/sammo/Command/Nation/che_감축.php | 8 ---- hwe/sammo/Command/Nation/che_국기변경.php | 46 +++++++++---------- hwe/sammo/Command/Nation/che_국호변경.php | 42 ++++++++--------- hwe/sammo/Command/Nation/che_급습.php | 40 ++++++++-------- hwe/sammo/Command/Nation/che_몰수.php | 36 +++++++-------- hwe/sammo/Command/Nation/che_발령.php | 7 +-- hwe/sammo/Command/Nation/che_백성동원.php | 8 ---- hwe/sammo/Command/Nation/che_불가침제의.php | 42 ++++++++--------- .../Command/Nation/che_불가침파기수락.php | 42 ++++++++--------- .../Command/Nation/che_불가침파기제의.php | 11 ++--- hwe/sammo/Command/Nation/che_선전포고.php | 40 ++++++++-------- hwe/sammo/Command/Nation/che_수몰.php | 8 +--- hwe/sammo/Command/Nation/che_의병모집.php | 32 ++++++------- hwe/sammo/Command/Nation/che_이호경식.php | 40 ++++++++-------- hwe/sammo/Command/Nation/che_종전수락.php | 16 +++---- hwe/sammo/Command/Nation/che_종전제의.php | 11 ++--- hwe/sammo/Command/Nation/che_증축.php | 8 ---- hwe/sammo/Command/Nation/che_천도.php | 40 ++++++++-------- hwe/sammo/Command/Nation/che_초토화.php | 8 ---- hwe/sammo/Command/Nation/che_포상.php | 30 ++++++------ hwe/sammo/Command/Nation/che_피장파장.php | 12 ++--- hwe/sammo/Command/Nation/che_필사즉생.php | 7 --- hwe/sammo/Command/Nation/che_허보.php | 40 ++++++++-------- src/kakao/Kakao_REST_API_Helper.php | 2 +- 66 files changed, 461 insertions(+), 715 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index 09faeca8..47c41c75 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -7,7 +7,7 @@ */ return [ // Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`, - // `'7.4'`, `null`. + // `'7.4'`, `'8.0'`, `'8.1'`, `null`. // If this is set to `null`, // then Phan assumes the PHP version which is closest to the minor version // of the php executable used to execute Phan. @@ -15,9 +15,9 @@ return [ // Note that the **only** effect of choosing `'5.6'` is to infer // that functions removed in php 7.0 exist. // (See `backward_compatibility_checks` for additional options) - "target_php_version" => '7.3', - 'backward_compatibility_checks ' => false, - 'minimum_severity'=>\Phan\Issue::SEVERITY_NORMAL, + "target_php_version" => '7.4', + 'backward_compatibility_checks ' => true, + 'minimum_severity'=>\Phan\Issue::SEVERITY_CRITICAL, 'file_list' => [ 'f_config/config.php', diff --git a/composer.json b/composer.json index e2caa177..df34590d 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ ], "config": { "platform": { - "php": "7.3" + "php": "7.4" } }, "require": { diff --git a/f_install/templates/KakaoKey.orig.php b/f_install/templates/KakaoKey.orig.php index d50c281a..31b9ca24 100644 --- a/f_install/templates/KakaoKey.orig.php +++ b/f_install/templates/KakaoKey.orig.php @@ -1,6 +1,7 @@ getName()}(통솔경험, 자금×2)"; } - -} \ No newline at end of file +} diff --git a/hwe/sammo/Command/General/che_물자조달.php b/hwe/sammo/Command/General/che_물자조달.php index 4defba5a..6123c5a1 100644 --- a/hwe/sammo/Command/General/che_물자조달.php +++ b/hwe/sammo/Command/General/che_물자조달.php @@ -11,12 +11,8 @@ use \sammo\{ Command }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - tryUniqueItemLottery -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalScoreEx; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_방랑.php b/hwe/sammo/Command/General/che_방랑.php index bbfa33a9..3132c294 100644 --- a/hwe/sammo/Command/General/che_방랑.php +++ b/hwe/sammo/Command/General/che_방랑.php @@ -10,11 +10,6 @@ use \sammo\{ Command }; - -use function \sammo\{ - tryUniqueItemLottery -}; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\CityConst; diff --git a/hwe/sammo/Command/General/che_사기진작.php b/hwe/sammo/Command/General/che_사기진작.php index e7efc0b1..f44a58de 100644 --- a/hwe/sammo/Command/General/che_사기진작.php +++ b/hwe/sammo/Command/General/che_사기진작.php @@ -10,10 +10,7 @@ use \sammo\{ Command }; - -use function \sammo\{ - tryUniqueItemLottery -}; +use function \sammo\tryUniqueItemLottery; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_상업투자.php b/hwe/sammo/Command/General/che_상업투자.php index 6d6fe8d2..0a986e07 100644 --- a/hwe/sammo/Command/General/che_상업투자.php +++ b/hwe/sammo/Command/General/che_상업투자.php @@ -11,13 +11,11 @@ use \sammo\{ Command }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - tryUniqueItemLottery, - updateMaxDomesticCritical -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\tryUniqueItemLottery; +use function \sammo\updateMaxDomesticCritical; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_선동.php b/hwe/sammo/Command/General/che_선동.php index 72c55315..de193a7b 100644 --- a/hwe/sammo/Command/General/che_선동.php +++ b/hwe/sammo/Command/General/che_선동.php @@ -1,13 +1,14 @@ srcArmTypeName = GameUnitConst::allType()[$this->srcArmType]; $this->destArmType = $this->arg['destArmType']; $this->destArmTypeName = GameUnitConst::allType()[$this->destArmType]; - + [$reqGold, $reqRice] = $this->getCost(); $this->fullConditionConstraints = [ diff --git a/hwe/sammo/Command/General/che_요양.php b/hwe/sammo/Command/General/che_요양.php index e5ccb7f5..98ee0535 100644 --- a/hwe/sammo/Command/General/che_요양.php +++ b/hwe/sammo/Command/General/che_요양.php @@ -10,11 +10,6 @@ use \sammo\{ Command }; - -use function \sammo\{ - tryUniqueItemLottery -}; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_이동.php b/hwe/sammo/Command/General/che_이동.php index 338c1b6c..c4899986 100644 --- a/hwe/sammo/Command/General/che_이동.php +++ b/hwe/sammo/Command/General/che_이동.php @@ -2,23 +2,18 @@ namespace sammo\Command\General; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - ActionLogger, - GameConst, - GameUnitConst, - LastTurn, - Command -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\GameUnitConst; +use \sammo\LastTurn; +use \sammo\Command; - -use function\sammo\{ - tryUniqueItemLottery, - printCitiesBasedOnDistance -}; +use function \sammo\tryUniqueItemLottery; +use function \sammo\printCitiesBasedOnDistance; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_인재탐색.php b/hwe/sammo/Command/General/che_인재탐색.php index 7548455c..ccf90e48 100644 --- a/hwe/sammo/Command/General/che_인재탐색.php +++ b/hwe/sammo/Command/General/che_인재탐색.php @@ -2,26 +2,22 @@ namespace sammo\Command\General; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - tryUniqueItemLottery, - getAllNationStaticInfo, - pickGeneralFromPool, -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\tryUniqueItemLottery; +use function \sammo\getAllNationStaticInfo; +use function \sammo\pickGeneralFromPool; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_임관.php b/hwe/sammo/Command/General/che_임관.php index d0c0041d..3ccf43c0 100644 --- a/hwe/sammo/Command/General/che_임관.php +++ b/hwe/sammo/Command/General/che_임관.php @@ -12,12 +12,9 @@ use \sammo\{ KVStorage }; - -use function \sammo\{ - tryUniqueItemLottery, - getInvitationList, - getNationStaticInfo, -}; +use function \sammo\tryUniqueItemLottery; +use function \sammo\getInvitationList; +use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_장비매매.php b/hwe/sammo/Command/General/che_장비매매.php index fd0100db..29879470 100644 --- a/hwe/sammo/Command/General/che_장비매매.php +++ b/hwe/sammo/Command/General/che_장비매매.php @@ -12,11 +12,7 @@ use \sammo\{ Command }; - -use function \sammo\{ - tryUniqueItemLottery, - buildItemClass -}; +use function \sammo\buildItemClass; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_장수대상임관.php b/hwe/sammo/Command/General/che_장수대상임관.php index 32997977..d6d3cbf7 100644 --- a/hwe/sammo/Command/General/che_장수대상임관.php +++ b/hwe/sammo/Command/General/che_장수대상임관.php @@ -12,13 +12,10 @@ use \sammo\{ KVStorage }; - -use function \sammo\{ - getColoredName, - tryUniqueItemLottery, - getInvitationList, - getNationStaticInfo, -}; +use function \sammo\getColoredName; +use function \sammo\tryUniqueItemLottery; +use function \sammo\getInvitationList; +use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_전투태세.php b/hwe/sammo/Command/General/che_전투태세.php index 5a3ed2f8..331e35a0 100644 --- a/hwe/sammo/Command/General/che_전투태세.php +++ b/hwe/sammo/Command/General/che_전투태세.php @@ -11,10 +11,8 @@ use \sammo\{ MustNotBeReachedException }; - -use function \sammo\{ - tryUniqueItemLottery, getTechCost -}; +use function \sammo\tryUniqueItemLottery; +use function \sammo\getTechCost; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_전투특기초기화.php b/hwe/sammo/Command/General/che_전투특기초기화.php index 64e58cfc..72a431d3 100644 --- a/hwe/sammo/Command/General/che_전투특기초기화.php +++ b/hwe/sammo/Command/General/che_전투특기초기화.php @@ -10,10 +10,7 @@ use \sammo\{ Command }; - -use function \sammo\{ - tryUniqueItemLottery -}; +use function \sammo\tryUniqueItemLottery; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_정착장려.php b/hwe/sammo/Command/General/che_정착장려.php index 97d0b837..dc9c6009 100644 --- a/hwe/sammo/Command/General/che_정착장려.php +++ b/hwe/sammo/Command/General/che_정착장려.php @@ -11,13 +11,11 @@ use \sammo\{ Command }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - tryUniqueItemLottery, - updateMaxDomesticCritical -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\tryUniqueItemLottery; +use function \sammo\updateMaxDomesticCritical; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_주민선정.php b/hwe/sammo/Command/General/che_주민선정.php index eefc3440..1b70b6ea 100644 --- a/hwe/sammo/Command/General/che_주민선정.php +++ b/hwe/sammo/Command/General/che_주민선정.php @@ -11,13 +11,11 @@ use \sammo\{ Command }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - tryUniqueItemLottery, - updateMaxDomesticCritical -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\tryUniqueItemLottery; +use function \sammo\updateMaxDomesticCritical; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_증여.php b/hwe/sammo/Command/General/che_증여.php index a451e23e..b593cca3 100644 --- a/hwe/sammo/Command/General/che_증여.php +++ b/hwe/sammo/Command/General/che_증여.php @@ -2,25 +2,21 @@ namespace sammo\Command\General; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - tryUniqueItemLottery -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\tryUniqueItemLottery; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_집합.php b/hwe/sammo/Command/General/che_집합.php index de3684a1..3afccf61 100644 --- a/hwe/sammo/Command/General/che_집합.php +++ b/hwe/sammo/Command/General/che_집합.php @@ -10,10 +10,7 @@ use \sammo\{ Command }; - -use function \sammo\{ - tryUniqueItemLottery -}; +use function \sammo\tryUniqueItemLottery; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_징병.php b/hwe/sammo/Command/General/che_징병.php index 6c26fee7..1e536802 100644 --- a/hwe/sammo/Command/General/che_징병.php +++ b/hwe/sammo/Command/General/che_징병.php @@ -2,27 +2,22 @@ namespace sammo\Command\General; -use\sammo\{ - DB, - Util, - JosaUtil, - Session, - KVStorage, - General, - ActionLogger, - GameConst, - GameUnitConst, - LastTurn, - Command, - ServConfig -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\Session; +use \sammo\KVStorage; +use \sammo\General; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\GameUnitConst; +use \sammo\LastTurn; +use \sammo\Command; +use \sammo\ServConfig; - -use function\sammo\{ - getTechCall, - tryUniqueItemLottery, - getTechAbil -}; +use function \sammo\getTechCall; +use function \sammo\tryUniqueItemLottery; +use function \sammo\getTechAbil; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_첩보.php b/hwe/sammo/Command/General/che_첩보.php index bd701b61..6229af65 100644 --- a/hwe/sammo/Command/General/che_첩보.php +++ b/hwe/sammo/Command/General/che_첩보.php @@ -2,25 +2,20 @@ namespace sammo\Command\General; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - ActionLogger, - GameConst, - GameUnitConst, - LastTurn, - Command, - Json -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\GameUnitConst; +use \sammo\LastTurn; +use \sammo\Command; +use \sammo\Json; - -use function\sammo\{ - tryUniqueItemLottery, - searchDistance, - printCitiesBasedOnDistance -}; +use function \sammo\tryUniqueItemLottery; +use function \sammo\searchDistance; +use function \sammo\printCitiesBasedOnDistance; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_출병.php b/hwe/sammo/Command/General/che_출병.php index 804610e0..573f8f3e 100644 --- a/hwe/sammo/Command/General/che_출병.php +++ b/hwe/sammo/Command/General/che_출병.php @@ -2,30 +2,23 @@ namespace sammo\Command\General; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - ActionLogger, - GameConst, - GameUnitConst, - LastTurn, - Command -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\GameUnitConst; +use \sammo\LastTurn; +use \sammo\Command; - -use function\sammo\{ - tryUniqueItemLottery, - processWar -}; +use function \sammo\tryUniqueItemLottery; +use function \sammo\processWar; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\CityConst; - - class che_출병 extends Command\GeneralCommand { static protected $actionName = '출병'; diff --git a/hwe/sammo/Command/General/che_하야.php b/hwe/sammo/Command/General/che_하야.php index 382e9e4a..5a0f5082 100644 --- a/hwe/sammo/Command/General/che_하야.php +++ b/hwe/sammo/Command/General/che_하야.php @@ -10,11 +10,6 @@ use \sammo\{ Command }; - -use function \sammo\{ - tryUniqueItemLottery -}; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\CityConst; diff --git a/hwe/sammo/Command/General/che_헌납.php b/hwe/sammo/Command/General/che_헌납.php index 92b97515..96a74024 100644 --- a/hwe/sammo/Command/General/che_헌납.php +++ b/hwe/sammo/Command/General/che_헌납.php @@ -2,24 +2,20 @@ namespace sammo\Command\General; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - tryUniqueItemLottery -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\tryUniqueItemLottery; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_화계.php b/hwe/sammo/Command/General/che_화계.php index a7314675..27050671 100644 --- a/hwe/sammo/Command/General/che_화계.php +++ b/hwe/sammo/Command/General/che_화계.php @@ -2,23 +2,18 @@ namespace sammo\Command\General; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - ActionLogger, - GameConst, - GameUnitConst, - LastTurn, - Command -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\GameUnitConst; +use \sammo\LastTurn; +use \sammo\Command; - -use function\sammo\{ - searchDistance, - printCitiesBasedOnDistance -}; +use function \sammo\searchDistance; +use function \sammo\printCitiesBasedOnDistance; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_훈련.php b/hwe/sammo/Command/General/che_훈련.php index c1f42260..52292f88 100644 --- a/hwe/sammo/Command/General/che_훈련.php +++ b/hwe/sammo/Command/General/che_훈련.php @@ -10,10 +10,7 @@ use \sammo\{ Command }; - -use function \sammo\{ - tryUniqueItemLottery -}; +use function \sammo\tryUniqueItemLottery; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_감축.php b/hwe/sammo/Command/Nation/che_감축.php index 252a7c3a..ce6e7c82 100644 --- a/hwe/sammo/Command/Nation/che_감축.php +++ b/hwe/sammo/Command/Nation/che_감축.php @@ -15,14 +15,6 @@ use \sammo\{ CityHelper }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo -}; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\Event\Action; diff --git a/hwe/sammo/Command/Nation/che_국기변경.php b/hwe/sammo/Command/Nation/che_국기변경.php index 04ca130e..45ed3f46 100644 --- a/hwe/sammo/Command/Nation/che_국기변경.php +++ b/hwe/sammo/Command/Nation/che_국기변경.php @@ -2,32 +2,28 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - MessageTarget, - Message, - CityConst, - Json, -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\MessageTarget; +use \sammo\Message; +use \sammo\CityConst; +use \sammo\Json; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo, - GetNationColors, - newColor, -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\GetImageURL; +use function \sammo\getNationStaticInfo; +use function \sammo\GetNationColors; +use function \sammo\newColor; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_국호변경.php b/hwe/sammo/Command/Nation/che_국호변경.php index 2ec976d1..c2182cd0 100644 --- a/hwe/sammo/Command/Nation/che_국호변경.php +++ b/hwe/sammo/Command/Nation/che_국호변경.php @@ -2,30 +2,26 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - Json, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - MessageTarget, - Message, - CityConst -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\Json; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\MessageTarget; +use \sammo\Message; +use \sammo\CityConst; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo, -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\GetImageURL; +use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_급습.php b/hwe/sammo/Command/Nation/che_급습.php index 78d56693..979e02f9 100644 --- a/hwe/sammo/Command/Nation/che_급습.php +++ b/hwe/sammo/Command/Nation/che_급습.php @@ -2,29 +2,25 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - Message, - MessageTarget -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\Message; +use \sammo\MessageTarget; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\getAllNationStaticInfo; +use function \sammo\getNationStaticInfo; +use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_몰수.php b/hwe/sammo/Command/Nation/che_몰수.php index f0357235..0e942f51 100644 --- a/hwe/sammo/Command/Nation/che_몰수.php +++ b/hwe/sammo/Command/Nation/che_몰수.php @@ -2,27 +2,23 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - MessageTarget, - Message -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\MessageTarget; +use \sammo\Message; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_발령.php b/hwe/sammo/Command/Nation/che_발령.php index 7b3db4de..121ca6f5 100644 --- a/hwe/sammo/Command/Nation/che_발령.php +++ b/hwe/sammo/Command/Nation/che_발령.php @@ -13,12 +13,7 @@ use \sammo\{ TimeUtil }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - cutTurn -}; +use function \sammo\cutTurn; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_백성동원.php b/hwe/sammo/Command/Nation/che_백성동원.php index 5e5a1ed7..c2ea51b9 100644 --- a/hwe/sammo/Command/Nation/che_백성동원.php +++ b/hwe/sammo/Command/Nation/che_백성동원.php @@ -14,14 +14,6 @@ use \sammo\{ CityConst }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo -}; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\Event\Action; diff --git a/hwe/sammo/Command/Nation/che_불가침제의.php b/hwe/sammo/Command/Nation/che_불가침제의.php index 4391351b..2dff1c9f 100644 --- a/hwe/sammo/Command/Nation/che_불가침제의.php +++ b/hwe/sammo/Command/Nation/che_불가침제의.php @@ -2,30 +2,26 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - MessageTarget, - DiplomaticMessage, - Message, -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\MessageTarget; +use \sammo\DiplomaticMessage; +use \sammo\Message; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\getAllNationStaticInfo; +use function \sammo\GetImageURL; +use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_불가침파기수락.php b/hwe/sammo/Command/Nation/che_불가침파기수락.php index 87d7e5de..09d8b7df 100644 --- a/hwe/sammo/Command/Nation/che_불가침파기수락.php +++ b/hwe/sammo/Command/Nation/che_불가침파기수락.php @@ -2,30 +2,26 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - MessageTarget, - DiplomaticMessage, - Message, -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\MessageTarget; +use \sammo\DiplomaticMessage; +use \sammo\Message; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\getAllNationStaticInfo; +use function \sammo\getNationStaticInfo; +use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_불가침파기제의.php b/hwe/sammo/Command/Nation/che_불가침파기제의.php index 7cf511d1..fddd0109 100644 --- a/hwe/sammo/Command/Nation/che_불가침파기제의.php +++ b/hwe/sammo/Command/Nation/che_불가침파기제의.php @@ -14,14 +14,9 @@ use \sammo\{ Message, }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\getAllNationStaticInfo; +use function \sammo\getNationStaticInfo; +use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_선전포고.php b/hwe/sammo/Command/Nation/che_선전포고.php index 0531d1f5..c335a437 100644 --- a/hwe/sammo/Command/Nation/che_선전포고.php +++ b/hwe/sammo/Command/Nation/che_선전포고.php @@ -2,29 +2,25 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - Message, - MessageTarget -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\Message; +use \sammo\MessageTarget; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\getAllNationStaticInfo; +use function \sammo\getNationStaticInfo; +use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_수몰.php b/hwe/sammo/Command/Nation/che_수몰.php index 5101bde4..e19e3568 100644 --- a/hwe/sammo/Command/Nation/che_수몰.php +++ b/hwe/sammo/Command/Nation/che_수몰.php @@ -14,13 +14,7 @@ use \sammo\{ CityConst }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo -}; +use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_의병모집.php b/hwe/sammo/Command/Nation/che_의병모집.php index 7395aabb..36b0ca02 100644 --- a/hwe/sammo/Command/Nation/che_의병모집.php +++ b/hwe/sammo/Command/Nation/che_의병모집.php @@ -2,25 +2,21 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - KVStorage -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\KVStorage; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - tryUniqueItemLottery -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\tryUniqueItemLottery; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_이호경식.php b/hwe/sammo/Command/Nation/che_이호경식.php index 12ed97a9..15a2a2d9 100644 --- a/hwe/sammo/Command/Nation/che_이호경식.php +++ b/hwe/sammo/Command/Nation/che_이호경식.php @@ -2,29 +2,25 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - Message, - MessageTarget -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\Message; +use \sammo\MessageTarget; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\getAllNationStaticInfo; +use function \sammo\getNationStaticInfo; +use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_종전수락.php b/hwe/sammo/Command/Nation/che_종전수락.php index 18bf5b4c..a28d8d6e 100644 --- a/hwe/sammo/Command/Nation/che_종전수락.php +++ b/hwe/sammo/Command/Nation/che_종전수락.php @@ -2,7 +2,7 @@ namespace sammo\Command\Nation; -use\sammo\{ +use \sammo\{ DB, Util, JosaUtil, @@ -18,14 +18,12 @@ use\sammo\{ Message, }; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\getAllNationStaticInfo; +use function \sammo\getNationStaticInfo; +use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_종전제의.php b/hwe/sammo/Command/Nation/che_종전제의.php index 244822ac..23d2eb61 100644 --- a/hwe/sammo/Command/Nation/che_종전제의.php +++ b/hwe/sammo/Command/Nation/che_종전제의.php @@ -14,14 +14,9 @@ use \sammo\{ Message, }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\getAllNationStaticInfo; +use function \sammo\getNationStaticInfo; +use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_증축.php b/hwe/sammo/Command/Nation/che_증축.php index 5e983ed4..3b1560c9 100644 --- a/hwe/sammo/Command/Nation/che_증축.php +++ b/hwe/sammo/Command/Nation/che_증축.php @@ -14,14 +14,6 @@ use \sammo\{ CityConst }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo -}; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\Event\Action; diff --git a/hwe/sammo/Command/Nation/che_천도.php b/hwe/sammo/Command/Nation/che_천도.php index 3acef6ac..47516bbe 100644 --- a/hwe/sammo/Command/Nation/che_천도.php +++ b/hwe/sammo/Command/Nation/che_천도.php @@ -2,29 +2,25 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - MessageTarget, - Message, - CityConst -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\MessageTarget; +use \sammo\Message; +use \sammo\CityConst; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\GetImageURL; +use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_초토화.php b/hwe/sammo/Command/Nation/che_초토화.php index cb94a282..c456f35e 100644 --- a/hwe/sammo/Command/Nation/che_초토화.php +++ b/hwe/sammo/Command/Nation/che_초토화.php @@ -15,14 +15,6 @@ use \sammo\{ CityInitialDetail }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo -}; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\Event\Action; diff --git a/hwe/sammo/Command/Nation/che_포상.php b/hwe/sammo/Command/Nation/che_포상.php index 45090f5c..f07d34fa 100644 --- a/hwe/sammo/Command/Nation/che_포상.php +++ b/hwe/sammo/Command/Nation/che_포상.php @@ -2,24 +2,20 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_피장파장.php b/hwe/sammo/Command/Nation/che_피장파장.php index 0672876e..45c9961f 100644 --- a/hwe/sammo/Command/Nation/che_피장파장.php +++ b/hwe/sammo/Command/Nation/che_피장파장.php @@ -13,15 +13,9 @@ use \sammo\{ Message, MessageTarget }; -use function \sammo\{ - buildNationCommandClass, - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - getAllNationStaticInfo, - getNationStaticInfo, - GetImageURL -}; +use function \sammo\buildNationCommandClass; +use function \sammo\getAllNationStaticInfo; +use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_필사즉생.php b/hwe/sammo/Command/Nation/che_필사즉생.php index b6fae39b..61b93fb6 100644 --- a/hwe/sammo/Command/Nation/che_필사즉생.php +++ b/hwe/sammo/Command/Nation/che_필사즉생.php @@ -13,13 +13,6 @@ use \sammo\{ Message }; -use function \sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL -}; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\Event\Action; diff --git a/hwe/sammo/Command/Nation/che_허보.php b/hwe/sammo/Command/Nation/che_허보.php index 11fecc64..f5a805f0 100644 --- a/hwe/sammo/Command/Nation/che_허보.php +++ b/hwe/sammo/Command/Nation/che_허보.php @@ -2,29 +2,25 @@ namespace sammo\Command\Nation; -use\sammo\{ - DB, - Util, - JosaUtil, - General, - DummyGeneral, - ActionLogger, - GameConst, - LastTurn, - GameUnitConst, - Command, - MessageTarget, - Message, - CityConst -}; +use \sammo\DB; +use \sammo\Util; +use \sammo\JosaUtil; +use \sammo\General; +use \sammo\DummyGeneral; +use \sammo\ActionLogger; +use \sammo\GameConst; +use \sammo\LastTurn; +use \sammo\GameUnitConst; +use \sammo\Command; +use \sammo\MessageTarget; +use \sammo\Message; +use \sammo\CityConst; -use function\sammo\{ - getDomesticExpLevelBonus, - CriticalRatioDomestic, - CriticalScoreEx, - GetImageURL, - getNationStaticInfo -}; +use function \sammo\getDomesticExpLevelBonus; +use function \sammo\CriticalRatioDomestic; +use function \sammo\CriticalScoreEx; +use function \sammo\GetImageURL; +use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/src/kakao/Kakao_REST_API_Helper.php b/src/kakao/Kakao_REST_API_Helper.php index 339b396e..bd32a89f 100644 --- a/src/kakao/Kakao_REST_API_Helper.php +++ b/src/kakao/Kakao_REST_API_Helper.php @@ -2,7 +2,7 @@ namespace kakao; if (class_exists('\\kakao\\KakaoKey') === false) { - /** @suppress PhanRedefineClass */ + // @suppress PhanRedefineClass class KakaoKey { const REST_KEY = ''; -- 2.54.0 From 8f3c778b80848957c799b811cba9003dbec84ad6 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 12 Aug 2021 23:58:20 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20phan=20=EC=A7=80=EC=8B=9C=EC=97=90?= =?UTF-8?q?=20=EB=94=B0=EB=9D=BC=20=EC=9D=BC=EB=B6=80=20=EB=B2=84=EA=B7=B8?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20-=20null=20&&=20key=5Fexists=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20-=20or=20assign=EC=9D=B4=20integer=20?= =?UTF-8?q?=EB=8C=80=EC=83=81=EC=9D=B4=EB=AF=80=EB=A1=9C=20=EC=A7=81?= =?UTF-8?q?=EC=A0=91=20=EC=97=B0=EC=82=B0=20-=20false=20=EB=8C=80=EC=8B=A0?= =?UTF-8?q?=200=20=EC=9E=85=EB=A0=A5=ED=95=9C=20=EA=B3=B3=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20-=20=EC=9E=90=EC=B2=B4=20Deprecate=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=ED=95=9C=20=ED=95=A8=EC=88=98=20=ED=9A=8C=ED=94=BC=20?= =?UTF-8?q?-=20=EC=B4=88=EA=B8=B0=ED=99=94=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EC=9D=80=20[]=20=ED=99=95=EC=9D=B8=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20-=20sleep=EC=9D=80=20=EC=A0=95=EC=88=98?= =?UTF-8?q?=EB=A7=8C=20=EB=B0=9B=EC=9C=BC=EB=AF=80=EB=A1=9C=20usleep?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20-=20=EC=84=A0?= =?UTF-8?q?=EC=96=B8=ED=95=98=EC=A7=80=20=EC=95=8A=EA=B3=A0=20=EA=B7=B8?= =?UTF-8?q?=EB=83=A5=20=EC=82=AC=EC=9A=A9=ED=95=98=EB=8D=98=20member=20?= =?UTF-8?q?=EB=B3=80=EC=88=98=20=EC=84=A0=EC=96=B8=20-=20boolean=20operati?= =?UTF-8?q?on=20=EC=88=9C=EC=84=9C=20=ED=8B=80=EB=A6=B0=20=EB=B6=80?= =?UTF-8?q?=EB=B6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .phan/config.php | 11 +++++++++++ hwe/a_hallOfFame.php | 2 +- hwe/a_vote.php | 2 +- hwe/c_vote.php | 2 +- hwe/func.php | 2 +- hwe/func_gamerule.php | 4 ++-- hwe/install.php | 2 +- hwe/j_get_nation_general_list.php | 1 + hwe/j_install.php | 2 +- hwe/j_load_scenarios.php | 2 +- hwe/j_msg_get_recent.php | 2 +- hwe/sammo/ActionNationType/che_병가.php | 2 +- hwe/sammo/AutorunGeneralPolicy.php | 4 +++- hwe/sammo/Command/BaseCommand.php | 2 ++ hwe/sammo/Command/General/che_강행.php | 2 -- hwe/sammo/Command/General/che_거병.php | 2 -- hwe/sammo/Command/General/che_견문.php | 3 --- hwe/sammo/Command/General/che_군량매매.php | 2 -- hwe/sammo/Command/General/che_귀환.php | 3 --- hwe/sammo/Command/General/che_기술연구.php | 1 - hwe/sammo/Command/General/che_내정특기초기화.php | 3 --- hwe/sammo/Command/General/che_단련.php | 1 - hwe/sammo/Command/General/che_랜덤임관.php | 2 -- hwe/sammo/Command/General/che_숙련전환.php | 2 -- hwe/sammo/Command/General/che_이동.php | 1 - hwe/sammo/Command/General/che_인재탐색.php | 4 ---- hwe/sammo/Command/General/che_증여.php | 5 ----- hwe/sammo/Command/General/che_첩보.php | 1 - hwe/sammo/Command/General/che_해산.php | 3 --- hwe/sammo/Command/General/che_헌납.php | 5 ----- hwe/sammo/Command/Nation/che_국기변경.php | 5 ----- hwe/sammo/Command/Nation/che_국호변경.php | 6 ------ hwe/sammo/Command/Nation/che_급습.php | 4 ---- hwe/sammo/Command/Nation/che_몰수.php | 3 --- hwe/sammo/Command/Nation/che_물자원조.php | 3 --- hwe/sammo/Command/Nation/che_불가침수락.php | 5 ----- hwe/sammo/Command/Nation/che_불가침제의.php | 3 --- hwe/sammo/Command/Nation/che_불가침파기수락.php | 5 ----- hwe/sammo/Command/Nation/che_선전포고.php | 3 --- hwe/sammo/Command/Nation/che_의병모집.php | 5 ----- hwe/sammo/Command/Nation/che_이호경식.php | 4 ---- hwe/sammo/Command/Nation/che_종전수락.php | 5 ----- hwe/sammo/Command/Nation/che_천도.php | 7 ------- hwe/sammo/Command/Nation/che_포상.php | 4 ---- hwe/sammo/Command/Nation/che_허보.php | 4 ---- hwe/sammo/Constraint/AllowDiplomacyStatus.php | 1 + hwe/sammo/Constraint/Constraint.php | 10 +++++----- hwe/sammo/Constraint/RemainCityTrust.php | 1 + hwe/sammo/Constraint/ReqCityCapacity.php | 1 + hwe/sammo/Constraint/ReqCityTrust.php | 1 + hwe/sammo/Constraint/ReqCityValue.php | 1 + hwe/sammo/Constraint/ReqDestCityValue.php | 1 + hwe/sammo/Constraint/ReqDestNationValue.php | 1 + hwe/sammo/Constraint/ReqGeneralCrewMargin.php | 2 +- hwe/sammo/Constraint/ReqNationAuxValue.php | 1 + hwe/sammo/Constraint/ReqNationValue.php | 1 + hwe/sammo/Event/Action/InvaderEnding.php | 2 -- hwe/sammo/Event/Action/RaiseInvader.php | 1 - hwe/sammo/Event/Action/RaiseNPCNation.php | 1 - hwe/sammo/Event/Action/RegNPC.php | 2 +- hwe/sammo/Event/Action/RegNeutralNPC.php | 2 +- hwe/sammo/Event/Condition/Logic.php | 2 +- hwe/sammo/GameConstBase.php | 2 +- hwe/sammo/General.php | 2 +- hwe/sammo/GeneralPool/RandomNameGeneral.php | 2 +- hwe/sammo/Scenario.php | 2 ++ hwe/sammo/Scenario/GeneralBuilder.php | 3 --- 67 files changed, 51 insertions(+), 137 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index 47c41c75..ea554725 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -41,11 +41,13 @@ return [ 'hwe/b_dipcenter.php', 'hwe/b_diplomacy.php', 'hwe/b_genList.php', + 'hwe/b_inheritPoint.php', 'hwe/b_myBossInfo.php', 'hwe/b_myCityInfo.php', 'hwe/b_myGenInfo.php', 'hwe/b_myKingdomInfo.php', 'hwe/b_myPage.php', + 'hwe/b_npc_control.php', 'hwe/b_processing.php', 'hwe/b_tournament.php', 'hwe/b_troop.php', @@ -86,14 +88,18 @@ return [ 'hwe/j_diplomacy_respond_letter.php', 'hwe/j_diplomacy_rollback_letter.php', 'hwe/j_diplomacy_send_letter.php', + 'hwe/j_export_simulator_object.php', + 'hwe/j_general_log_old.php', 'hwe/j_general_set_permission.php', 'hwe/j_general_turn.php', 'hwe/j_getChiefTurn.php', + 'hwe/j_get_basic_general_list.php', 'hwe/j_get_city_list.php', 'hwe/j_get_general_list.php', 'hwe/j_get_nation_general_list.php', 'hwe/j_get_reserved_command.php', 'hwe/j_get_select_npc_token.php', + 'hwe/j_get_select_pool.php', 'hwe/j_image_upload.php', 'hwe/j_install.php', 'hwe/j_install_db.php', @@ -107,15 +113,20 @@ return [ 'hwe/j_msg_get_recent.php', 'hwe/j_msg_submit.php', 'hwe/j_myBossInfo.php', + 'hwe/j_raise_event.php', 'hwe/j_select_npc.php', + 'hwe/j_select_picked_general.php', 'hwe/j_server_basic_info.php', 'hwe/j_set_chief_command.php', 'hwe/j_set_general_command.php', + 'hwe/j_set_my_setting.php', + 'hwe/j_set_npc_control.php', 'hwe/j_simulate_battle.php', 'hwe/j_troop.php', 'hwe/j_vacation.php', 'hwe/lib.php', 'hwe/process_war.php', + 'hwe/select_general_from_pool.php', 'hwe/select_npc.php', 'hwe/t_board.php', 'hwe/t_diplomacy.php', diff --git a/hwe/a_hallOfFame.php b/hwe/a_hallOfFame.php index d9cdb043..9138f3d2 100644 --- a/hwe/a_hallOfFame.php +++ b/hwe/a_hallOfFame.php @@ -28,7 +28,7 @@ $scenarioList = (function(){ -if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){ +if($scenarioIdx !== null && key_exists($scenarioIdx, $scenarioList)){ $searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name']; $searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx); } diff --git a/hwe/a_vote.php b/hwe/a_vote.php index d2cc36c3..1d791b56 100644 --- a/hwe/a_vote.php +++ b/hwe/a_vote.php @@ -12,7 +12,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env'); increaseRefresh("설문조사", 1); $isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]); -$isVoteAdmin |= $session->userGrade >= 5; +$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5; $me = $db->queryFirstRow('SELECT no,vote from general where owner=%i', $userID); diff --git a/hwe/c_vote.php b/hwe/c_vote.php index 0937a10a..748064f3 100644 --- a/hwe/c_vote.php +++ b/hwe/c_vote.php @@ -15,7 +15,7 @@ $session = Session::requireGameLogin()->setReadOnly(); $userID = Session::getUserID(); $isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]); -$isVoteAdmin |= $session->userGrade >= 5; +$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5; $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); diff --git a/hwe/func.php b/hwe/func.php index dc758aa5..434bafe2 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1006,7 +1006,7 @@ function increaseRefresh($type = "", $cnt = 1) $isunited = $gameStor->isunited; $opentime = $gameStor->opentime; - if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::DatetimeNow()) { + if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::now()) { $db->update('general', [ 'lastrefresh' => $date, 'con' => $db->sqleval('con + %i', $cnt), diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index 07d52f11..3cf32b26 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -694,7 +694,7 @@ function updateNationState() $lastAssemblerID += 1; $npcObj = new Scenario\GeneralBuilder( sprintf('부대장%4d', $lastAssemblerID), - 0, + false, null, $nation['nation'] ); @@ -1052,7 +1052,7 @@ function checkEmperior() $generalLogger->flush(); } - $gen = join(', ', array_column($rawGeneral, 'name')); + $gen = join(', ', array_column($rawGeneralList, 'name')); $stat = $db->queryFirstRow('SELECT max(nation_count) as nc, max(gen_count) as gc FROM statistic'); $genCnt = $db->queryFirstField('SELECT count(*) FROM general'); diff --git a/hwe/install.php b/hwe/install.php index 309822f3..e60e91ed 100644 --- a/hwe/install.php +++ b/hwe/install.php @@ -14,7 +14,7 @@ $serverName = DB::prefix(); $serverAcl = $session->acl[$serverName]??[]; $allowReset = in_array('reset', $serverAcl); $allowFullReset = in_array('fullReset',$serverAcl); -$allowReset |= $allowFullReset; +$allowReset = $allowReset || $allowFullReset; if($session->userGrade < 5 && !$allowReset){ die('관리자 아님'); diff --git a/hwe/j_get_nation_general_list.php b/hwe/j_get_nation_general_list.php index ce9ac225..f5ad6fde 100644 --- a/hwe/j_get_nation_general_list.php +++ b/hwe/j_get_nation_general_list.php @@ -157,6 +157,7 @@ foreach ($customViewColumns as $column => $reqPermission) { $resultColumns[] = $column; } +$generalList = []; foreach ($rawGeneralList as $rawGeneral) { //General 생성? diff --git a/hwe/j_install.php b/hwe/j_install.php index 4a7c1317..c5f3547d 100644 --- a/hwe/j_install.php +++ b/hwe/j_install.php @@ -19,7 +19,7 @@ $serverName = DB::prefix(); $serverAcl = $session->acl[$serverName]??[]; $allowReset = in_array('reset', $serverAcl); $allowFullReset = in_array('fullReset',$serverAcl); -$allowReset |= $allowFullReset; +$allowReset = $allowReset || $allowFullReset; $reserve_open = Util::getPost('reserve_open'); if($reserve_open && $reserve_open < date('Y-m-d H:i')){ diff --git a/hwe/j_load_scenarios.php b/hwe/j_load_scenarios.php index d5eaa7af..c023277f 100644 --- a/hwe/j_load_scenarios.php +++ b/hwe/j_load_scenarios.php @@ -9,7 +9,7 @@ $serverName = DB::prefix(); $serverAcl = $session->acl[$serverName]??[]; $allowReset = in_array('reset', $serverAcl); $allowFullReset = in_array('fullReset',$serverAcl); -$allowReset |= $allowFullReset; +$allowReset = $allowReset || $allowFullReset; if($session->userGrade < 5 && !$allowReset){ Json::die([ diff --git a/hwe/j_msg_get_recent.php b/hwe/j_msg_get_recent.php index d7e5e17e..e71e9b65 100644 --- a/hwe/j_msg_get_recent.php +++ b/hwe/j_msg_get_recent.php @@ -32,7 +32,7 @@ $lastMsgGet[] = TimeUtil::now(); $session->lastMsgGet = Json::encode($lastMsgGet); if($delayTime){ - sleep(0.2); + usleep(200); } $session->setReadOnly(); diff --git a/hwe/sammo/ActionNationType/che_병가.php b/hwe/sammo/ActionNationType/che_병가.php index 401dc1fc..47094298 100644 --- a/hwe/sammo/ActionNationType/che_병가.php +++ b/hwe/sammo/ActionNationType/che_병가.php @@ -31,7 +31,7 @@ class che_병가 extends \sammo\BaseNation{ public function onCalcNationalIncome(string $type, $amount):int{ if($type == 'pop' && $amount > 0){ - return $amount * 0.8; + return Util::toInt($amount * 0.8); } return $amount; diff --git a/hwe/sammo/AutorunGeneralPolicy.php b/hwe/sammo/AutorunGeneralPolicy.php index 272993e2..ac3b8cfc 100644 --- a/hwe/sammo/AutorunGeneralPolicy.php +++ b/hwe/sammo/AutorunGeneralPolicy.php @@ -39,7 +39,7 @@ class AutorunGeneralPolicy{ - static public $default_priority = [ + static public array $default_priority = [ 'NPC사망대비', '귀환', '금쌀구매', @@ -89,6 +89,8 @@ class AutorunGeneralPolicy{ public $can건국 = true; public $can선양 = false; + public array $priority; + function doNPCState(General $general){ $npc = $general->getNPCType(); $nationID = $general->getNationID(); diff --git a/hwe/sammo/Command/BaseCommand.php b/hwe/sammo/Command/BaseCommand.php index 725cc1c0..65ead2ee 100644 --- a/hwe/sammo/Command/BaseCommand.php +++ b/hwe/sammo/Command/BaseCommand.php @@ -18,6 +18,7 @@ abstract class BaseCommand{ static protected $actionName = 'CommandName'; static public $reqArg = false; static protected $isLazyCalcReqTurn = false; + public ?string $reason; public function getCommandDetailTitle():string{ return $this->getName(); @@ -48,6 +49,7 @@ abstract class BaseCommand{ protected $fullConditionConstraints = null; protected $minConditionConstraints = null; protected $permissionConstraints = null; + protected $reasonConstraint = null; protected $logger; diff --git a/hwe/sammo/Command/General/che_강행.php b/hwe/sammo/Command/General/che_강행.php index d4116fd4..41f978b8 100644 --- a/hwe/sammo/Command/General/che_강행.php +++ b/hwe/sammo/Command/General/che_강행.php @@ -12,8 +12,6 @@ use \sammo\GameUnitConst; use \sammo\LastTurn; use \sammo\Command; - -use function \sammo\tryUniqueItemLottery; use function \sammo\printCitiesBasedOnDistance; use \sammo\Constraint\Constraint; diff --git a/hwe/sammo/Command/General/che_거병.php b/hwe/sammo/Command/General/che_거병.php index ff0400bd..02c3262d 100644 --- a/hwe/sammo/Command/General/che_거병.php +++ b/hwe/sammo/Command/General/che_거병.php @@ -14,9 +14,7 @@ use \sammo\{ use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\CityConst; -use function sammo\buildNationTypeClass; use function sammo\refreshNationStaticInfo; -use function sammo\GetNationColors; use function sammo\getAllNationStaticInfo; diff --git a/hwe/sammo/Command/General/che_견문.php b/hwe/sammo/Command/General/che_견문.php index 0ab543ec..480f955f 100644 --- a/hwe/sammo/Command/General/che_견문.php +++ b/hwe/sammo/Command/General/che_견문.php @@ -10,9 +10,6 @@ use \sammo\{ Command }; - -use function \sammo\tryUniqueItemLottery; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use \sammo\TextDecoration\SightseeingMessage; diff --git a/hwe/sammo/Command/General/che_군량매매.php b/hwe/sammo/Command/General/che_군량매매.php index b8bd2f14..91e723cc 100644 --- a/hwe/sammo/Command/General/che_군량매매.php +++ b/hwe/sammo/Command/General/che_군량매매.php @@ -12,8 +12,6 @@ use \sammo\{ Command }; -use function \sammo\tryUniqueItemLottery; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\MustNotBeReachedException; diff --git a/hwe/sammo/Command/General/che_귀환.php b/hwe/sammo/Command/General/che_귀환.php index 61997bad..b8c97942 100644 --- a/hwe/sammo/Command/General/che_귀환.php +++ b/hwe/sammo/Command/General/che_귀환.php @@ -10,9 +10,6 @@ use \sammo\{ Command }; -use function \sammo\getNationStaticInfo; -use function \sammo\tryUniqueItemLottery; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\CityConst; diff --git a/hwe/sammo/Command/General/che_기술연구.php b/hwe/sammo/Command/General/che_기술연구.php index 9c8cb1db..2ed2c351 100644 --- a/hwe/sammo/Command/General/che_기술연구.php +++ b/hwe/sammo/Command/General/che_기술연구.php @@ -11,7 +11,6 @@ use \sammo\{ use function sammo\{ TechLimit, - getDomesticExpLevelBonus, CriticalRatioDomestic, CriticalScoreEx, tryUniqueItemLottery, diff --git a/hwe/sammo/Command/General/che_내정특기초기화.php b/hwe/sammo/Command/General/che_내정특기초기화.php index a320a42b..8236c846 100644 --- a/hwe/sammo/Command/General/che_내정특기초기화.php +++ b/hwe/sammo/Command/General/che_내정특기초기화.php @@ -10,9 +10,6 @@ use \sammo\{ Command }; -use function \sammo\getNationStaticInfo; -use function \sammo\tryUniqueItemLottery; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_단련.php b/hwe/sammo/Command/General/che_단련.php index a7f93f86..c5fa2d63 100644 --- a/hwe/sammo/Command/General/che_단련.php +++ b/hwe/sammo/Command/General/che_단련.php @@ -11,7 +11,6 @@ use \sammo\{ }; -use function \sammo\getNationStaticInfo; use function \sammo\tryUniqueItemLottery; use \sammo\Constraint\Constraint; diff --git a/hwe/sammo/Command/General/che_랜덤임관.php b/hwe/sammo/Command/General/che_랜덤임관.php index eac97fac..c6863663 100644 --- a/hwe/sammo/Command/General/che_랜덤임관.php +++ b/hwe/sammo/Command/General/che_랜덤임관.php @@ -15,8 +15,6 @@ use \sammo\LastTurn; use \sammo\Command; use function \sammo\tryUniqueItemLottery; -use function \sammo\getInvitationList; -use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_숙련전환.php b/hwe/sammo/Command/General/che_숙련전환.php index c969124a..84e6bc46 100644 --- a/hwe/sammo/Command/General/che_숙련전환.php +++ b/hwe/sammo/Command/General/che_숙련전환.php @@ -16,9 +16,7 @@ use \sammo\Command; use \sammo\ServConfig; use function \sammo\getDexCall; -use function \sammo\getTechCall; use function \sammo\tryUniqueItemLottery; -use function \sammo\getTechAbil; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_이동.php b/hwe/sammo/Command/General/che_이동.php index c4899986..218b444e 100644 --- a/hwe/sammo/Command/General/che_이동.php +++ b/hwe/sammo/Command/General/che_이동.php @@ -12,7 +12,6 @@ use \sammo\GameUnitConst; use \sammo\LastTurn; use \sammo\Command; -use function \sammo\tryUniqueItemLottery; use function \sammo\printCitiesBasedOnDistance; use \sammo\Constraint\Constraint; diff --git a/hwe/sammo/Command/General/che_인재탐색.php b/hwe/sammo/Command/General/che_인재탐색.php index ccf90e48..cf66951b 100644 --- a/hwe/sammo/Command/General/che_인재탐색.php +++ b/hwe/sammo/Command/General/che_인재탐색.php @@ -12,11 +12,7 @@ use \sammo\LastTurn; use \sammo\GameUnitConst; use \sammo\Command; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; use function \sammo\tryUniqueItemLottery; -use function \sammo\getAllNationStaticInfo; use function \sammo\pickGeneralFromPool; use \sammo\Constraint\Constraint; diff --git a/hwe/sammo/Command/General/che_증여.php b/hwe/sammo/Command/General/che_증여.php index b593cca3..0b6595b2 100644 --- a/hwe/sammo/Command/General/che_증여.php +++ b/hwe/sammo/Command/General/che_증여.php @@ -13,11 +13,6 @@ use \sammo\LastTurn; use \sammo\GameUnitConst; use \sammo\Command; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\tryUniqueItemLottery; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/General/che_첩보.php b/hwe/sammo/Command/General/che_첩보.php index 6229af65..8b709a29 100644 --- a/hwe/sammo/Command/General/che_첩보.php +++ b/hwe/sammo/Command/General/che_첩보.php @@ -13,7 +13,6 @@ use \sammo\LastTurn; use \sammo\Command; use \sammo\Json; -use function \sammo\tryUniqueItemLottery; use function \sammo\searchDistance; use function \sammo\printCitiesBasedOnDistance; diff --git a/hwe/sammo/Command/General/che_해산.php b/hwe/sammo/Command/General/che_해산.php index b606cfec..87a7fb80 100644 --- a/hwe/sammo/Command/General/che_해산.php +++ b/hwe/sammo/Command/General/che_해산.php @@ -14,10 +14,7 @@ use \sammo\{ use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\CityConst; -use function sammo\buildNationTypeClass; use function sammo\refreshNationStaticInfo; -use function sammo\GetNationColors; -use function sammo\getAllNationStaticInfo; use function sammo\deleteNation; diff --git a/hwe/sammo/Command/General/che_헌납.php b/hwe/sammo/Command/General/che_헌납.php index 96a74024..07da81ed 100644 --- a/hwe/sammo/Command/General/che_헌납.php +++ b/hwe/sammo/Command/General/che_헌납.php @@ -12,11 +12,6 @@ use \sammo\LastTurn; use \sammo\GameUnitConst; use \sammo\Command; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\tryUniqueItemLottery; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_국기변경.php b/hwe/sammo/Command/Nation/che_국기변경.php index 45ed3f46..c3e66939 100644 --- a/hwe/sammo/Command/Nation/che_국기변경.php +++ b/hwe/sammo/Command/Nation/che_국기변경.php @@ -17,11 +17,6 @@ use \sammo\Message; use \sammo\CityConst; use \sammo\Json; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\GetImageURL; -use function \sammo\getNationStaticInfo; use function \sammo\GetNationColors; use function \sammo\newColor; diff --git a/hwe/sammo/Command/Nation/che_국호변경.php b/hwe/sammo/Command/Nation/che_국호변경.php index c2182cd0..b82906f7 100644 --- a/hwe/sammo/Command/Nation/che_국호변경.php +++ b/hwe/sammo/Command/Nation/che_국호변경.php @@ -17,12 +17,6 @@ use \sammo\MessageTarget; use \sammo\Message; use \sammo\CityConst; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\GetImageURL; -use function \sammo\getNationStaticInfo; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\Event\Action; diff --git a/hwe/sammo/Command/Nation/che_급습.php b/hwe/sammo/Command/Nation/che_급습.php index 979e02f9..f15f6161 100644 --- a/hwe/sammo/Command/Nation/che_급습.php +++ b/hwe/sammo/Command/Nation/che_급습.php @@ -15,12 +15,8 @@ use \sammo\Command; use \sammo\Message; use \sammo\MessageTarget; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; use function \sammo\getAllNationStaticInfo; use function \sammo\getNationStaticInfo; -use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_몰수.php b/hwe/sammo/Command/Nation/che_몰수.php index 0e942f51..286edcea 100644 --- a/hwe/sammo/Command/Nation/che_몰수.php +++ b/hwe/sammo/Command/Nation/che_몰수.php @@ -15,9 +15,6 @@ use \sammo\Command; use \sammo\MessageTarget; use \sammo\Message; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; diff --git a/hwe/sammo/Command/Nation/che_물자원조.php b/hwe/sammo/Command/Nation/che_물자원조.php index 8e7cbef4..c6d1990f 100644 --- a/hwe/sammo/Command/Nation/che_물자원조.php +++ b/hwe/sammo/Command/Nation/che_물자원조.php @@ -14,9 +14,6 @@ use \sammo\{ StringUtil }; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; use function \sammo\getAllNationStaticInfo; use function \sammo\getNationStaticInfo; diff --git a/hwe/sammo/Command/Nation/che_불가침수락.php b/hwe/sammo/Command/Nation/che_불가침수락.php index 74972570..89ee1965 100644 --- a/hwe/sammo/Command/Nation/che_불가침수락.php +++ b/hwe/sammo/Command/Nation/che_불가침수락.php @@ -16,12 +16,7 @@ use \sammo\MessageTarget; use \sammo\DiplomaticMessage; use \sammo\Message; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\getAllNationStaticInfo; use function \sammo\getNationStaticInfo; -use function \sammo\GetImageUR; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_불가침제의.php b/hwe/sammo/Command/Nation/che_불가침제의.php index 2dff1c9f..cfd7688c 100644 --- a/hwe/sammo/Command/Nation/che_불가침제의.php +++ b/hwe/sammo/Command/Nation/che_불가침제의.php @@ -16,9 +16,6 @@ use \sammo\MessageTarget; use \sammo\DiplomaticMessage; use \sammo\Message; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; use function \sammo\getAllNationStaticInfo; use function \sammo\GetImageURL; use function \sammo\getNationStaticInfo; diff --git a/hwe/sammo/Command/Nation/che_불가침파기수락.php b/hwe/sammo/Command/Nation/che_불가침파기수락.php index 09d8b7df..0e4ecc56 100644 --- a/hwe/sammo/Command/Nation/che_불가침파기수락.php +++ b/hwe/sammo/Command/Nation/che_불가침파기수락.php @@ -16,12 +16,7 @@ use \sammo\MessageTarget; use \sammo\DiplomaticMessage; use \sammo\Message; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\getAllNationStaticInfo; use function \sammo\getNationStaticInfo; -use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_선전포고.php b/hwe/sammo/Command/Nation/che_선전포고.php index c335a437..5ee6c14b 100644 --- a/hwe/sammo/Command/Nation/che_선전포고.php +++ b/hwe/sammo/Command/Nation/che_선전포고.php @@ -15,9 +15,6 @@ use \sammo\Command; use \sammo\Message; use \sammo\MessageTarget; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; use function \sammo\getAllNationStaticInfo; use function \sammo\getNationStaticInfo; use function \sammo\GetImageURL; diff --git a/hwe/sammo/Command/Nation/che_의병모집.php b/hwe/sammo/Command/Nation/che_의병모집.php index 36b0ca02..5bfc12c6 100644 --- a/hwe/sammo/Command/Nation/che_의병모집.php +++ b/hwe/sammo/Command/Nation/che_의병모집.php @@ -13,11 +13,6 @@ use \sammo\GameUnitConst; use \sammo\Command; use \sammo\KVStorage; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\tryUniqueItemLottery; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_이호경식.php b/hwe/sammo/Command/Nation/che_이호경식.php index 15a2a2d9..d7b31bcb 100644 --- a/hwe/sammo/Command/Nation/che_이호경식.php +++ b/hwe/sammo/Command/Nation/che_이호경식.php @@ -15,12 +15,8 @@ use \sammo\Command; use \sammo\Message; use \sammo\MessageTarget; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; use function \sammo\getAllNationStaticInfo; use function \sammo\getNationStaticInfo; -use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_종전수락.php b/hwe/sammo/Command/Nation/che_종전수락.php index a28d8d6e..017a0f2d 100644 --- a/hwe/sammo/Command/Nation/che_종전수락.php +++ b/hwe/sammo/Command/Nation/che_종전수락.php @@ -18,12 +18,7 @@ use \sammo\{ Message, }; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\getAllNationStaticInfo; use function \sammo\getNationStaticInfo; -use function \sammo\GetImageURL; use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_천도.php b/hwe/sammo/Command/Nation/che_천도.php index 47516bbe..1b3db6f9 100644 --- a/hwe/sammo/Command/Nation/che_천도.php +++ b/hwe/sammo/Command/Nation/che_천도.php @@ -15,13 +15,6 @@ use \sammo\Command; use \sammo\MessageTarget; use \sammo\Message; use \sammo\CityConst; - -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\GetImageURL; -use function \sammo\getNationStaticInfo; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; use sammo\Event\Action; diff --git a/hwe/sammo/Command/Nation/che_포상.php b/hwe/sammo/Command/Nation/che_포상.php index f07d34fa..ab09019f 100644 --- a/hwe/sammo/Command/Nation/che_포상.php +++ b/hwe/sammo/Command/Nation/che_포상.php @@ -13,10 +13,6 @@ use \sammo\LastTurn; use \sammo\GameUnitConst; use \sammo\Command; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; - use \sammo\Constraint\Constraint; use \sammo\Constraint\ConstraintHelper; diff --git a/hwe/sammo/Command/Nation/che_허보.php b/hwe/sammo/Command/Nation/che_허보.php index f5a805f0..fb007f28 100644 --- a/hwe/sammo/Command/Nation/che_허보.php +++ b/hwe/sammo/Command/Nation/che_허보.php @@ -16,10 +16,6 @@ use \sammo\MessageTarget; use \sammo\Message; use \sammo\CityConst; -use function \sammo\getDomesticExpLevelBonus; -use function \sammo\CriticalRatioDomestic; -use function \sammo\CriticalScoreEx; -use function \sammo\GetImageURL; use function \sammo\getNationStaticInfo; use \sammo\Constraint\Constraint; diff --git a/hwe/sammo/Constraint/AllowDiplomacyStatus.php b/hwe/sammo/Constraint/AllowDiplomacyStatus.php index df94774e..6068772d 100644 --- a/hwe/sammo/Constraint/AllowDiplomacyStatus.php +++ b/hwe/sammo/Constraint/AllowDiplomacyStatus.php @@ -9,6 +9,7 @@ class AllowDiplomacyStatus extends Constraint{ protected $nationID; protected $allowStatus = []; + protected $errMsg = null; public function checkInputValues(bool $throwExeception=true):bool{ if(!parent::checkInputValues($throwExeception) && !$throwExeception){ diff --git a/hwe/sammo/Constraint/Constraint.php b/hwe/sammo/Constraint/Constraint.php index cae4c57f..8783ad69 100644 --- a/hwe/sammo/Constraint/Constraint.php +++ b/hwe/sammo/Constraint/Constraint.php @@ -154,27 +154,27 @@ abstract class Constraint{ throw new \InvalidArgumentException('require arg'); } - if(($valueType&static::REQ_STRING_ARG===static::REQ_STRING_ARG) && !is_string($this->arg)){ + if((($valueType&static::REQ_STRING_ARG)===static::REQ_STRING_ARG) && !is_string($this->arg)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException('require string arg'); } - if(($valueType&static::REQ_BOOLEAN_ARG===static::REQ_BOOLEAN_ARG) && !is_bool($this->arg)){ + if((($valueType&static::REQ_BOOLEAN_ARG)===static::REQ_BOOLEAN_ARG) && !is_bool($this->arg)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException('require bool arg'); } - if(($valueType&static::REQ_INT_ARG===static::REQ_INT_ARG) && !is_int($this->arg)){ + if((($valueType&static::REQ_INT_ARG)===static::REQ_INT_ARG) && !is_int($this->arg)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException('require int arg'); } - if(($valueType&static::REQ_NUMERIC_ARG===static::REQ_NUMERIC_ARG) && !is_numeric($this->arg)){ + if((($valueType&static::REQ_NUMERIC_ARG)===static::REQ_NUMERIC_ARG) && !is_numeric($this->arg)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException('require numeric arg'); } - if(($valueType&static::REQ_ARRAY_ARG===static::REQ_ARRAY_ARG) && !is_array($this->arg)){ + if((($valueType&static::REQ_ARRAY_ARG)===static::REQ_ARRAY_ARG) && !is_array($this->arg)){ if(!$throwExeception){return false; } throw new \InvalidArgumentException('require array arg'); } diff --git a/hwe/sammo/Constraint/RemainCityTrust.php b/hwe/sammo/Constraint/RemainCityTrust.php index 4d6658ff..45b55c6a 100644 --- a/hwe/sammo/Constraint/RemainCityTrust.php +++ b/hwe/sammo/Constraint/RemainCityTrust.php @@ -9,6 +9,7 @@ class RemainCityTrust extends Constraint{ protected $key; protected $maxKey; + protected $maxVal; protected $keyNick; public function checkInputValues(bool $throwExeception=true):bool{ diff --git a/hwe/sammo/Constraint/ReqCityCapacity.php b/hwe/sammo/Constraint/ReqCityCapacity.php index 9f0dede6..82e78583 100644 --- a/hwe/sammo/Constraint/ReqCityCapacity.php +++ b/hwe/sammo/Constraint/ReqCityCapacity.php @@ -12,6 +12,7 @@ class ReqCityCapacity extends Constraint{ protected $maxKey; protected $keyNick; protected $reqVal; + protected $isPercent; public function checkInputValues(bool $throwExeception=true):bool{ if(!parent::checkInputValues($throwExeception) && !$throwExeception){ diff --git a/hwe/sammo/Constraint/ReqCityTrust.php b/hwe/sammo/Constraint/ReqCityTrust.php index 67f5a0b3..b8d917c1 100644 --- a/hwe/sammo/Constraint/ReqCityTrust.php +++ b/hwe/sammo/Constraint/ReqCityTrust.php @@ -10,6 +10,7 @@ class ReqCityTrust extends Constraint{ protected $key; protected $maxKey; protected $keyNick; + protected $reqVal; public function checkInputValues(bool $throwExeception=true):bool{ if(!parent::checkInputValues($throwExeception) && !$throwExeception){ diff --git a/hwe/sammo/Constraint/ReqCityValue.php b/hwe/sammo/Constraint/ReqCityValue.php index 25f2f8a6..fde479df 100644 --- a/hwe/sammo/Constraint/ReqCityValue.php +++ b/hwe/sammo/Constraint/ReqCityValue.php @@ -17,6 +17,7 @@ class ReqCityValue extends Constraint{ protected $reqVal; protected $comp; protected $errMsg; + protected $isPercent; public function checkInputValues(bool $throwExeception=true):bool{ if(!parent::checkInputValues($throwExeception) && !$throwExeception){ diff --git a/hwe/sammo/Constraint/ReqDestCityValue.php b/hwe/sammo/Constraint/ReqDestCityValue.php index 76fddb2f..59cde6cd 100644 --- a/hwe/sammo/Constraint/ReqDestCityValue.php +++ b/hwe/sammo/Constraint/ReqDestCityValue.php @@ -17,6 +17,7 @@ class ReqDestCityValue extends Constraint{ protected $reqVal; protected $comp; protected $errMsg; + protected $isPercent; public function checkInputValues(bool $throwExeception=true):bool{ if(!parent::checkInputValues($throwExeception) && !$throwExeception){ diff --git a/hwe/sammo/Constraint/ReqDestNationValue.php b/hwe/sammo/Constraint/ReqDestNationValue.php index 8369157d..2d5b4a82 100644 --- a/hwe/sammo/Constraint/ReqDestNationValue.php +++ b/hwe/sammo/Constraint/ReqDestNationValue.php @@ -17,6 +17,7 @@ class ReqDestNationValue extends Constraint{ protected $reqVal; protected $comp; protected $errMsg; + protected $isPercent; public function checkInputValues(bool $throwExeception=true):bool{ if(!parent::checkInputValues($throwExeception) && !$throwExeception){ diff --git a/hwe/sammo/Constraint/ReqGeneralCrewMargin.php b/hwe/sammo/Constraint/ReqGeneralCrewMargin.php index 541c81b3..1381ffa6 100644 --- a/hwe/sammo/Constraint/ReqGeneralCrewMargin.php +++ b/hwe/sammo/Constraint/ReqGeneralCrewMargin.php @@ -38,7 +38,7 @@ class ReqGeneralCrewMargin extends Constraint{ $reqCrewType = GameUnitConst::byID($this->arg); //XXX: 왜 General -> obj -> General 변환을 하고 있나? - $generalObj = new General($this->general, null, null, null, null, false); + $generalObj = new General($this->general, null, null, null, null, null, false); if($reqCrewType->id != $generalObj->getCrewTypeObj()->id){ return true; diff --git a/hwe/sammo/Constraint/ReqNationAuxValue.php b/hwe/sammo/Constraint/ReqNationAuxValue.php index a2f3e4a8..cca1e8ae 100644 --- a/hwe/sammo/Constraint/ReqNationAuxValue.php +++ b/hwe/sammo/Constraint/ReqNationAuxValue.php @@ -14,6 +14,7 @@ class ReqNationAuxValue extends Constraint const REQ_VALUES = Constraint::REQ_NATION | Constraint::REQ_ARRAY_ARG; protected $key; + protected $maxKey; protected $defaultValue; protected $reqVal; protected $comp; diff --git a/hwe/sammo/Constraint/ReqNationValue.php b/hwe/sammo/Constraint/ReqNationValue.php index dedb35f4..5aa6e543 100644 --- a/hwe/sammo/Constraint/ReqNationValue.php +++ b/hwe/sammo/Constraint/ReqNationValue.php @@ -17,6 +17,7 @@ class ReqNationValue extends Constraint{ protected $reqVal; protected $comp; protected $errMsg; + protected $isPercent; public function checkInputValues(bool $throwExeception=true):bool{ if(!parent::checkInputValues($throwExeception) && !$throwExeception){ diff --git a/hwe/sammo/Event/Action/InvaderEnding.php b/hwe/sammo/Event/Action/InvaderEnding.php index d39bd9c5..ebe66833 100644 --- a/hwe/sammo/Event/Action/InvaderEnding.php +++ b/hwe/sammo/Event/Action/InvaderEnding.php @@ -1,8 +1,6 @@ npc=(new \sammo\Scenario\GeneralBuilder( $name, - 0, + false, $picturePath, $nationID )) diff --git a/hwe/sammo/Event/Action/RegNeutralNPC.php b/hwe/sammo/Event/Action/RegNeutralNPC.php index d0b7b086..46e857dc 100644 --- a/hwe/sammo/Event/Action/RegNeutralNPC.php +++ b/hwe/sammo/Event/Action/RegNeutralNPC.php @@ -23,7 +23,7 @@ class RegNeutralNPC extends \sammo\Event\Action{ ){ $this->npc=(new \sammo\Scenario\GeneralBuilder( $name, - 0, + false, $picturePath, $nationID )) diff --git a/hwe/sammo/Event/Condition/Logic.php b/hwe/sammo/Event/Condition/Logic.php index 9e042606..b7f5c6f5 100644 --- a/hwe/sammo/Event/Condition/Logic.php +++ b/hwe/sammo/Event/Condition/Logic.php @@ -98,7 +98,7 @@ class Logic extends \sammo\Event\Condition{ foreach($this->conditions as $cond){ $sub = self::_eval($cond, $env); $chain[] = $sub['chain']; - $value ^= $sub['value']; + $value = ($value != $sub['value']); } return [ diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index b4dd458d..b02df648 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -148,7 +148,7 @@ class GameConstBase 'che_도적', 'che_명가', 'che_음양가', 'che_종횡가', 'che_불가', 'che_오두미도', 'che_태평도', 'che_도가', 'che_묵가', 'che_덕가', 'che_병가', 'che_유가', 'che_법가' ]; - /** @var array 기본 국가 성향 */ + /** @var string 기본 국가 성향 */ public static $neutralNationType = 'che_중립'; /** @var string 기본 내정 특기 */ diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index a957a811..0adfb822 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -708,7 +708,7 @@ class General implements iAction{ if($updateVals){ $db->update('general', $updateVals, 'no=%i', $generalID); - $result |= $db->affectedRows() > 0; + $result = $result || $db->affectedRows() > 0; if(key_exists('nation', $updateVals)){ $db->update('rank_data', [ 'nation_id'=>$updateVals['nation'] diff --git a/hwe/sammo/GeneralPool/RandomNameGeneral.php b/hwe/sammo/GeneralPool/RandomNameGeneral.php index 45ba4086..fcd15979 100644 --- a/hwe/sammo/GeneralPool/RandomNameGeneral.php +++ b/hwe/sammo/GeneralPool/RandomNameGeneral.php @@ -74,7 +74,7 @@ class RandomNameGeneral extends AbsGeneralPool{ $builder = $this->getGeneralBuilder(); $builder->setStat($leadership, $strength, $intel); $builder->setDex($dexVal[0], $dexVal[1], $dexVal[2], $dexVal[3], $avgGen['dex5']); - $builder->Util::choiceRandom(array_keys(\sammo\CityConst::all())); + $builder->setCityID(Util::choiceRandom(array_keys(\sammo\CityConst::all()))); $builder->setExpDed($avgGen['exp'], $avgGen['ded']); } diff --git a/hwe/sammo/Scenario.php b/hwe/sammo/Scenario.php index cc56538b..18872702 100644 --- a/hwe/sammo/Scenario.php +++ b/hwe/sammo/Scenario.php @@ -44,6 +44,8 @@ class Scenario{ private $gameConf = null; + private $tmpEnv; + public function generateGeneral($rawGeneral, $initFull, $npcType=2): GeneralBuilder{ while(count($rawGeneral) < 14){ $rawGeneral[] = null; diff --git a/hwe/sammo/Scenario/GeneralBuilder.php b/hwe/sammo/Scenario/GeneralBuilder.php index e2da863e..59d26349 100644 --- a/hwe/sammo/Scenario/GeneralBuilder.php +++ b/hwe/sammo/Scenario/GeneralBuilder.php @@ -9,9 +9,6 @@ use \sammo\CityConst; use \sammo\GameConst; use \sammo\SpecialityHelper; use sammo\TimeUtil; - -use function sammo\buildGeneralSpecialClass; - class GeneralBuilder{ protected $generalID = null; -- 2.54.0