디버그 코드 추가, 버그 수정

This commit is contained in:
2020-04-20 03:08:08 +09:00
parent 7b46a1b9ff
commit 6526653540
5 changed files with 34 additions and 10 deletions
+11 -2
View File
@@ -2932,6 +2932,7 @@ class GeneralAI
}
if(!($reservedCommand instanceof Command\Nation\휴식) && $reservedCommand->isRunnable()){
$reservedCommand->reason = 'reserved';
return $reservedCommand;
}
@@ -2945,10 +2946,13 @@ class GeneralAI
/** @var ?NationCommand */
$result = $this->{'do'.$actionName}($lastTurn);
if($result !== null){
$reservedCommand->reason = 'do'.$actionName;
return $result;
}
}
return buildNationCommandClass(null, $this->general, $this->env, $this->general->getLastTurn());
$cmd = buildNationCommandClass(null, $this->general, $this->env, $this->general->getLastTurn());
$cmd->reason = 'neutral';
return $cmd;
}
public function chooseInstantNationTurn(NationCommand $reservedCommand): ?NationCommand{
@@ -3092,7 +3096,9 @@ class GeneralAI
return $this->devRate;
}
$devRate = [];
$devRate = [
'all'=>0,
];
foreach($this->supplyCities as $city){
@@ -3100,6 +3106,9 @@ class GeneralAI
if($develKey == 'trust'){
continue;
}
if(!key_exists($develKey, $devRate)){
$devRate[$develKey] = 0;
}
$devRate[$develKey] += $devScore;
$devRate['all'] += $devScore;
}