디버그 코드 추가, 버그 수정
This commit is contained in:
+11
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user