diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index ea6b2965..f9b122e1 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -1163,7 +1163,7 @@ function checkStatistic() { $crewtypeHistsStr = join(', ', array_map(function($histPair){ [$histKey, $cnt] = $histPair; - return GameUnitConst::byID($hisKey)->getShortName().'('.$cnt.')'; + return GameUnitConst::byID($histKey)->getShortName().'('.$cnt.')'; }, Util::convertDictToArray($crewtypeHists))); $db->insert('statistic', [ diff --git a/hwe/func_template.php b/hwe/func_template.php index a31de307..d50c1cb4 100644 --- a/hwe/func_template.php +++ b/hwe/func_template.php @@ -88,9 +88,8 @@ function displaySpecialDomesticInfo(?string $type):string{ ]); } -function displayItemInfo(?int $type):string{ - $info = getItemInfo($type); - $text = getItemName($type); +function displayItemInfo(?string $type):string{ + [$text, $info] = getItemInfo($type); $templates = new \League\Plates\Engine(__dir__.'/templates'); diff --git a/hwe/sammo/Command/General/che_기술연구.php b/hwe/sammo/Command/General/che_기술연구.php index 6ebb903d..86701755 100644 --- a/hwe/sammo/Command/General/che_기술연구.php +++ b/hwe/sammo/Command/General/che_기술연구.php @@ -36,7 +36,7 @@ class che_기술연구 extends che_상업투자{ $general = $this->generalObj; $this->setCity(); - $this->setNation(); + $this->setNation(['tech']); [$reqGold, $reqRice] = $this->getCost(); diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index 295d094b..0132565b 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -252,7 +252,7 @@ class General implements iAction{ } function getLeadership($withInjury = true, $withItem = true, $withStatAdjust = true, $useFloor = true):float{ - return $this->getStatValue('leadership', $withInjury, $withItem, $withStatAdjust, $useFloor); + return $this->getStatValue('leader', $withInjury, $withItem, $withStatAdjust, $useFloor); } function getPower($withInjury = true, $withItem = true, $withStatAdjust = true, $useFloor = true):float{ diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 09c7abc5..4f6fe223 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -147,7 +147,11 @@ class GeneralAI{ $this->dipState = self::d직전; } - if(in_array($this->dipState, [self::d평화, self::d선포]) && $env['startyear'] + 2 == $env['year'] && $env['month'] > 5){ + if( + in_array($this->dipState, [self::d평화, self::d선포]) || + $env['year'] >= $env['startyear'] + 3 || + ($env['year'] && $env['startyear'] + 2 && $env['month'] > 5) + ){ $this->dipState = self::d징병; } @@ -881,7 +885,7 @@ class GeneralAI{ if($nationGeneral->rice < 700 * $tech){ continue; } - if($generalCity->front){ + if($generalCity['front']){ continue; } if($nationGeneral->train * $nationGeneral->atmos < 75 * 75){