버그 수정

This commit is contained in:
2019-10-04 16:33:00 +09:00
parent 07328847f4
commit 71254e86f4
5 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -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', [
+2 -3
View File
@@ -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');
@@ -36,7 +36,7 @@ class che_기술연구 extends che_상업투자{
$general = $this->generalObj;
$this->setCity();
$this->setNation();
$this->setNation(['tech']);
[$reqGold, $reqRice] = $this->getCost();
+1 -1
View File
@@ -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{
+6 -2
View File
@@ -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){