diff --git a/hwe/sammo/Event/Action/RegNPC.php b/hwe/sammo/Event/Action/RegNPC.php index 9d8c71a1..611f79df 100644 --- a/hwe/sammo/Event/Action/RegNPC.php +++ b/hwe/sammo/Event/Action/RegNPC.php @@ -35,12 +35,11 @@ class RegNPC extends \sammo\Event\Action{ ->setSpecialSingle($char) ->setNPCText($text?:'') ->setAffinity($affinity) - ->setLifeSpan($birth, $death) - ->fillRemainSpecAsZero(); + ->setLifeSpan($birth, $death); } public function run($env=null){ - $result = $this->npc->build($env); + $result = $this->npc->fillRemainSpecAsZero($env)->build($env); return [__CLASS__, $result]; } diff --git a/hwe/sammo/Event/Action/RegNeutralNPC.php b/hwe/sammo/Event/Action/RegNeutralNPC.php index 39035db1..b38e5ef9 100644 --- a/hwe/sammo/Event/Action/RegNeutralNPC.php +++ b/hwe/sammo/Event/Action/RegNeutralNPC.php @@ -3,6 +3,7 @@ namespace sammo\Event\Action; class RegNeutralNPC extends \sammo\Event\Action{ + /** @var \sammo\Scenario\GeneralBuilder */ private $npc; public function __construct( @@ -33,12 +34,11 @@ class RegNeutralNPC extends \sammo\Event\Action{ ->setNPCText($text?:'') ->setAffinity($affinity) ->setLifeSpan($birth, $death) - ->setNPCType(6) - ->fillRemainSpecAsZero(); + ->setNPCType(6); } public function run($env=null){ - $result = $this->npc->build($env); + $result = $this->npc->fillRemainSpecAsZero($env)->build($env); return [__CLASS__, $result]; } diff --git a/hwe/sammo/GeneralPool/RandomNameGeneral.php b/hwe/sammo/GeneralPool/RandomNameGeneral.php index 3d31d499..45ba4086 100644 --- a/hwe/sammo/GeneralPool/RandomNameGeneral.php +++ b/hwe/sammo/GeneralPool/RandomNameGeneral.php @@ -26,7 +26,7 @@ class RandomNameGeneral extends AbsGeneralPool{ return $db->affectedRows()!=0; } - public function giveGeneralSpec(array $pickTypeList, array $avgGen, array $env=[]){ + public function giveGeneralSpec(array $pickTypeList, array $avgGen, array $env){ //do Nothing $dexTotal = $avgGen['dex_t']; diff --git a/hwe/sammo/Scenario.php b/hwe/sammo/Scenario.php index 9e09fa9f..cc56538b 100644 --- a/hwe/sammo/Scenario.php +++ b/hwe/sammo/Scenario.php @@ -482,7 +482,7 @@ class Scenario{ copy("$unitPath/$unitSet.php", $path.'/GameUnitConst.php'); } - public function build($env=[]){ + public function build($env){ $db = DB::db(); getGeneralPoolClass(GameConst::$targetGeneralPool)::initPool($db); diff --git a/hwe/sammo/Scenario/GeneralBuilder.php b/hwe/sammo/Scenario/GeneralBuilder.php index 8decfe65..e2da863e 100644 --- a/hwe/sammo/Scenario/GeneralBuilder.php +++ b/hwe/sammo/Scenario/GeneralBuilder.php @@ -337,7 +337,7 @@ class GeneralBuilder{ return $this; } - public function fillRemainSpecAsZero(array $env=[]):self{ + public function fillRemainSpecAsZero(array $env):self{ if($this->leadership===null){ throw new \RuntimeException('stat이 설정되어 있지 않음'); } @@ -390,7 +390,7 @@ class GeneralBuilder{ return $this; } - public function fillRemainSpecAsRandom(array $pickTypeList, array $avgGen, array $env=[]):self{ + public function fillRemainSpecAsRandom(array $pickTypeList, array $avgGen, array $env):self{ $isFictionMode = (Util::array_get($env['fiction'], 0)!=0); @@ -532,7 +532,7 @@ class GeneralBuilder{ return $this->death; } - public function build($env=[]){ + public function build($env){ //scenario에 life==1인 경우 수명 제한이 없어지는 모양. diff --git a/hwe/sammo/Scenario/Nation.php b/hwe/sammo/Scenario/Nation.php index f2caca1d..b8a8ad95 100644 --- a/hwe/sammo/Scenario/Nation.php +++ b/hwe/sammo/Scenario/Nation.php @@ -64,7 +64,7 @@ class Nation{ return $this->name; } - public function build($env=[]){ + public function build($env){ //NOTE: NPC의 숫자는 아직 확정된 것이 아니다. $cities = array_map(function($cityName){ return \sammo\CityHelper::getCityByName($cityName)['id']; @@ -147,7 +147,7 @@ class Nation{ $this->generals[] = $general; } - public function postBuild($env=[]){ + public function postBuild($env){ $npc_cnt = count($this->generals); $db = DB::db();