From a9435f8f321b6f0ff35ebac901749b8bc4ed53c0 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 22 Mar 2020 02:47:44 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EB=A0=B9=ED=84=B4=20=EC=BB=A4?= =?UTF-8?q?=EB=A7=A8=EB=93=9C=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Command/Nation/che_백성동원.php | 23 ++++++++++++++++++++++- hwe/sammo/Command/Nation/che_수몰.php | 8 ++++++++ hwe/sammo/Command/Nation/che_피장파장.php | 4 +--- hwe/sammo/Command/Nation/che_허보.php | 13 ++++++++++--- hwe/sammo/Constraint/ConstraintHelper.php | 2 +- hwe/sammo/GameConstBase.php | 11 +++++++---- 6 files changed, 49 insertions(+), 12 deletions(-) diff --git a/hwe/sammo/Command/Nation/che_백성동원.php b/hwe/sammo/Command/Nation/che_백성동원.php index 60a6fb17..d183bf06 100644 --- a/hwe/sammo/Command/Nation/che_백성동원.php +++ b/hwe/sammo/Command/Nation/che_백성동원.php @@ -31,8 +31,21 @@ class che_백성동원 extends Command\NationCommand{ static public $reqArg = true; protected function argTest():bool{ - $this->arg = []; + if($this->arg === null){ + return false; + } + if(!key_exists('destCityID', $this->arg)){ + return false; + } + if(CityConst::byID($this->arg['destCityID']) === null){ + return false; + } + $destCityID = $this->arg['destCityID']; + + $this->arg = [ + 'destCityID'=>$destCityID, + ]; return true; } @@ -145,6 +158,14 @@ class che_백성동원 extends Command\NationCommand{ return true; } + public function getJSFiles(): array + { + return [ + 'js/defaultSelectCityByMap.js' + ]; + } + + public function getForm(): string { ob_start(); diff --git a/hwe/sammo/Command/Nation/che_수몰.php b/hwe/sammo/Command/Nation/che_수몰.php index 3744e05d..22f9385c 100644 --- a/hwe/sammo/Command/Nation/che_수몰.php +++ b/hwe/sammo/Command/Nation/che_수몰.php @@ -174,6 +174,14 @@ class che_수몰 extends Command\NationCommand{ return true; } + public function getJSFiles(): array + { + return [ + 'js/defaultSelectCityByMap.js' + ]; + } + + public function getForm(): string { ob_start(); diff --git a/hwe/sammo/Command/Nation/che_피장파장.php b/hwe/sammo/Command/Nation/che_피장파장.php index af3e5b7b..ec2c5ca4 100644 --- a/hwe/sammo/Command/Nation/che_피장파장.php +++ b/hwe/sammo/Command/Nation/che_피장파장.php @@ -65,9 +65,7 @@ class che_피장파장 extends Command\NationCommand{ $this->runnableConstraints=[ ConstraintHelper::OccupiedCity(), ConstraintHelper::BeChief(), - ConstraintHelper::NotNeutralDestCity(), - ConstraintHelper::NotOccupiedDestCity(), - ConstraintHelper::DisallowDiplomacyBetweenStatus( + ConstraintHelper::AllowDiplomacyBetweenStatus( [0, 1], '선포, 전쟁중인 상대국에게만 가능합니다.' ), diff --git a/hwe/sammo/Command/Nation/che_허보.php b/hwe/sammo/Command/Nation/che_허보.php index 19e62238..498a7608 100644 --- a/hwe/sammo/Command/Nation/che_허보.php +++ b/hwe/sammo/Command/Nation/che_허보.php @@ -61,7 +61,7 @@ class che_허보 extends Command\NationCommand{ ConstraintHelper::BeChief(), ConstraintHelper::NotNeutralDestCity(), ConstraintHelper::NotOccupiedDestCity(), - ConstraintHelper::DisallowDiplomacyBetweenStatus( + ConstraintHelper::AllowDiplomacyBetweenStatus( [0, 1], '선포, 전쟁중인 상대국에게만 가능합니다.' ), @@ -88,8 +88,7 @@ class che_허보 extends Command\NationCommand{ public function getBrief():string{ $commandName = $this->getName(); $destCityName = CityConst::byID($this->arg['destCityID'])->name; - $josaUl = JosaUtil::pick($destCityName, '을'); - return "【{$destCityName}】{$josaUl} {$commandName}"; + return "【{$destCityName}】에 {$commandName}"; } public function run():bool{ @@ -186,6 +185,14 @@ class che_허보 extends Command\NationCommand{ return true; } + public function getJSFiles(): array + { + return [ + 'js/defaultSelectCityByMap.js' + ]; + } + + public function getForm(): string { ob_start(); diff --git a/hwe/sammo/Constraint/ConstraintHelper.php b/hwe/sammo/Constraint/ConstraintHelper.php index 162f0880..19af96e9 100644 --- a/hwe/sammo/Constraint/ConstraintHelper.php +++ b/hwe/sammo/Constraint/ConstraintHelper.php @@ -13,7 +13,7 @@ class ConstraintHelper{ } static function AllowDiplomacyBetweenStatus(array $allowDipCodeList, string $errMsg):array{ - return [__FUNCTION__, $allowDipCodeList, $errMsg]; + return [__FUNCTION__, [$allowDipCodeList, $errMsg]]; } static function AllowJoinAction():array{ diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index e4300752..3aec8f7c 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -239,7 +239,10 @@ class GameConstBase 'che_선동', ], '개인'=>[ + //'che_내정특기초기화', + //'che_전투특기초기화', 'che_단련', + //'che_숙련전환', 'che_견문', 'che_장비매매', 'che_군량매매', @@ -281,10 +284,10 @@ class GameConstBase ], '전략'=>[ 'che_필사즉생', - //'che_백성동원', - //'che_수몰', - //'che_허보', - //'che_피장파장', + 'che_백성동원', + 'che_수몰', + 'che_허보', + 'che_피장파장', //'che_의병모집', //'che_이호경식', //'che_급습',