From 25837f6393db34bec17587645e723b6de14acc79 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 8 Oct 2019 02:29:07 +0900 Subject: [PATCH] =?UTF-8?q?=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/func_command.php | 3 +-- hwe/js/processing.js | 6 +++--- hwe/sammo/Command/General/che_강행.php | 20 +++++++++++++++----- hwe/sammo/Command/General/che_건국.php | 24 ++++++++++++------------ hwe/scenario/unit/ludo_rathowm.php | 2 +- 5 files changed, 32 insertions(+), 23 deletions(-) diff --git a/hwe/func_command.php b/hwe/func_command.php index c44c781a..e6d4cd36 100644 --- a/hwe/func_command.php +++ b/hwe/func_command.php @@ -174,7 +174,7 @@ function checkCommandArg(?array $arg):?string{ ],*/ 'integer'=>[ 'crewType', 'destGeneralID', 'destCityID', 'destNationID', - 'amount', 'colorType', 'itemCode' + 'amount', 'colorType', ], 'boolean'=>[ 'isGold', 'buyRice', @@ -184,7 +184,6 @@ function checkCommandArg(?array $arg):?string{ ], 'min'=>[ ['year', 0], - ['itemCode', 0], ['destGeneralID', 1], ['destCityID', 1], ['destNationID', 1], diff --git a/hwe/js/processing.js b/hwe/js/processing.js index 48d0f8b2..4a9d59b8 100644 --- a/hwe/js/processing.js +++ b/hwe/js/processing.js @@ -30,13 +30,13 @@ $('#commonSubmit').click(function(){ //checkCommandArg 참고 var availableArgumentList = { 'string':[ - 'nationName', 'optionText', 'itemType', 'nationType', + 'nationName', 'optionText', 'itemType', 'nationType', 'itemCode', ], 'int':[ 'crewType', 'destGeneralID', 'destCityID', 'destNationID', - 'amount', 'colorType', 'itemCode', + 'amount', 'colorType', 'month', - 'year', 'itemCode', 'destGeneralID', 'destCityID', 'destNationID', 'amount', 'crewType', + 'year', 'destGeneralID', 'destCityID', 'destNationID', 'amount', 'crewType', ], 'boolean':[ 'isGold', 'buyRice', diff --git a/hwe/sammo/Command/General/che_강행.php b/hwe/sammo/Command/General/che_강행.php index 0035a62e..557e4316 100644 --- a/hwe/sammo/Command/General/che_강행.php +++ b/hwe/sammo/Command/General/che_강행.php @@ -88,6 +88,13 @@ class che_강행 extends Command\GeneralCommand{ return 0; } + public function getBrief():string{ + $commandName = $this->getName(); + $destCityName = CityConst::byID($this->arg['destCityID'])->name; + $josaRo = JosaUtil::pick($destCityName, '로'); + return "【{$destCityName}】{$josaRo} {$commandName}"; + } + public function getFailString():string{ $commandName = $this->getName(); $failReason = $this->testRunnable(); @@ -160,21 +167,24 @@ class che_강행 extends Command\GeneralCommand{ public function getForm(): string { + $currentCityID = $this->generalObj->getCityID(); + $form = []; $form[] = \sammo\getMapHtml(); + $currentCityName = CityConst::byID($currentCityID)->name; $form[] = << 최대 3칸내 도시로만 강행이 가능합니다.
목록을 선택하거나 도시를 클릭하세요.
- EOT; $form[] = \sammo\optionsForCities(); - $form[] = ''; - $form[] = ''; - $form[] = printCitiesBasedOnDistance($this->generalObj->getCityID(), 3); + $form[] = ' '; + $form[] = ''; + $form[] = printCitiesBasedOnDistance($currentCityID, 3); - return join("\n",$form); + return join("
\n",$form); } diff --git a/hwe/sammo/Command/General/che_건국.php b/hwe/sammo/Command/General/che_건국.php index cf432927..ed0d748f 100644 --- a/hwe/sammo/Command/General/che_건국.php +++ b/hwe/sammo/Command/General/che_건국.php @@ -35,13 +35,13 @@ class che_건국 extends Command\GeneralCommand{ } $nationName = $this->arg['nationName']??null; $nationType = $this->arg['nationType']??null; - $nationColor = $this->arg['nationColor']??null; + $colorType = $this->arg['colorType']??null; - if($nationName === null || $nationType === null || $nationColor === null){ + if($nationName === null || $nationType === null || $colorType === null){ return false; } - if(!is_string($nationName) || !is_string($nationType) || !is_int($nationColor)){ + if(!is_string($nationName) || !is_string($nationType) || !is_int($colorType)){ return false; } @@ -49,7 +49,7 @@ class che_건국 extends Command\GeneralCommand{ return false; } - if(!key_exists($nationColor, GetNationColors())){ + if(!key_exists($colorType, GetNationColors())){ return false; } @@ -63,7 +63,7 @@ class che_건국 extends Command\GeneralCommand{ $this->arg = [ 'nationName'=>$nationName, 'nationType'=>$nationType, - 'nationColor'=>$nationColor + 'colorType'=>$colorType ]; return true; @@ -76,7 +76,7 @@ class che_건국 extends Command\GeneralCommand{ $nationName = $this->arg['nationName']; $nationType = $this->arg['nationType']; - $nationColor = $this->arg['nationColor']; + $colorType = $this->arg['colorType']; $this->setCity(); $this->setNation(['gennum']); @@ -84,11 +84,11 @@ class che_건국 extends Command\GeneralCommand{ $relYear = $env['year'] - $env['startyear']; $this->runnableConstraints=[ + ConstraintHelper::BeLord(), + ConstraintHelper::WanderingNation(), ConstraintHelper::ReqNationValue('gennum', '수하 장수', '>=', 2), ConstraintHelper::BeOpeningPart($relYear), - ConstraintHelper::WanderingNation(), ConstraintHelper::CheckNationNameDuplicate($nationName), - ConstraintHelper::BeLord(), ConstraintHelper::AllowJoinAction(), ConstraintHelper::ConstructableCity(), ]; @@ -121,7 +121,7 @@ class che_건국 extends Command\GeneralCommand{ $nationName = $this->arg['nationName']; $nationType = $this->arg['nationType']; - $nationColor = GetNationColors()[$this->arg['nationColor']]; + $colorType = GetNationColors()[$this->arg['colorType']]; $cityName = $this->city['name']; @@ -157,7 +157,7 @@ class che_건국 extends Command\GeneralCommand{ $db->update('nation', [ 'name'=>$nationName, - 'color'=>$nationColor, + 'color'=>$colorType, 'level'=>1, 'type'=>$nationType, 'capital'=>$general->getCityID() @@ -225,7 +225,7 @@ class che_건국 extends Command\GeneralCommand{ $form[] = << 국명 : -색깔 : EOT; foreach(GetNationColors() as $idx=>$color) { /* @@ -247,7 +247,7 @@ EOT; } $form[] = ''; - $form[] = ''; + $form[] = ''; return join("\n",$form); } diff --git a/hwe/scenario/unit/ludo_rathowm.php b/hwe/scenario/unit/ludo_rathowm.php index bb4e26c3..5eb8040d 100644 --- a/hwe/scenario/unit/ludo_rathowm.php +++ b/hwe/scenario/unit/ludo_rathowm.php @@ -85,7 +85,7 @@ class GameUnitConst extends GameUnitConstBase [self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2], [self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8], ["공격을 포기하고 오직 방어에만 집중합니다."], - null + null, null ], [ 217008, self::T_FOOTMAN, '메이드병',