천도 버그 수정

This commit is contained in:
2020-04-30 03:16:16 +09:00
parent d3c4dd59d2
commit e2ec3ef532
4 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ class che_감축 extends Command\NationCommand{
[$reqGold, $reqRice] = array_map('number_format', $this->getCost()); [$reqGold, $reqRice] = array_map('number_format', $this->getCost());
$amount = number_format($this->env['develcost'] * 5); $amount = number_format($this->env['develcost'] * 5);
$reqTurn = $this->getPostReqTurn()+1; $reqTurn = $this->getPreReqTurn()+1;
return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice} 회수)"; return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice} 회수)";
} }
+1 -1
View File
@@ -73,7 +73,7 @@ class che_증축 extends Command\NationCommand{
[$reqGold, $reqRice] = array_map('number_format', $this->getCost()); [$reqGold, $reqRice] = array_map('number_format', $this->getCost());
$amount = number_format($this->env['develcost'] * 5); $amount = number_format($this->env['develcost'] * 5);
$reqTurn = $this->getPostReqTurn()+1; $reqTurn = $this->getPreReqTurn()+1;
return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice})"; return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice})";
} }
+2 -2
View File
@@ -75,7 +75,7 @@ class che_천도 extends Command\NationCommand{
ConstraintHelper::BeChief(), ConstraintHelper::BeChief(),
ConstraintHelper::SuppliedCity(), ConstraintHelper::SuppliedCity(),
ConstraintHelper::SuppliedDestCity(), ConstraintHelper::SuppliedDestCity(),
ConstraintHelper::NotSameDestCity(), ConstraintHelper::ReqNationValue('capital', '수도', '!=', $this->destCity['city'], '이미 수도입니다.'),
ConstraintHelper::ReqNationGold(GameConst::$basegold+$reqGold), ConstraintHelper::ReqNationGold(GameConst::$basegold+$reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice+$reqRice), ConstraintHelper::ReqNationRice(GameConst::$baserice+$reqRice),
]; ];
@@ -110,7 +110,7 @@ class che_천도 extends Command\NationCommand{
} }
public function getPreReqTurn():int{ public function getPreReqTurn():int{
return 1 + $this->getDistance()*2; return $this->getDistance()*2;
} }
public function getPostReqTurn():int{ public function getPostReqTurn():int{
+8 -2
View File
@@ -101,7 +101,7 @@ class GeneralAI
'nation' => 0, 'nation' => 0,
'level' => 0, 'level' => 0,
'capital' => 0, 'capital' => 0,
'capset' => false, 'capset' => 0,
'gennum' => 0, 'gennum' => 0,
'tech' => 0, 'tech' => 0,
'gold' => 0, 'gold' => 0,
@@ -3089,10 +3089,16 @@ class GeneralAI
} }
} }
if(!($reservedCommand instanceof Command\Nation\휴식) && $reservedCommand->isRunnable()){ if(!($reservedCommand instanceof Command\Nation\휴식)){
if($reservedCommand->isRunnable()){
$reservedCommand->reason = 'reserved'; $reservedCommand->reason = 'reserved';
return $reservedCommand; return $reservedCommand;
} }
$date = $general->getTurnTime($general::TURNTIME_HM);
$failString = $reservedCommand->getFailString();
$text = "{$failString} <1>{$date}</>";
$general->getLogger()->pushGeneralActionLog($text);
}
foreach($this->nationPolicy->priority as $actionName){ foreach($this->nationPolicy->priority as $actionName){