버그 수정

This commit is contained in:
2019-04-21 21:15:53 +09:00
parent da5fc417c5
commit 0c64b506c2
12 changed files with 67 additions and 42 deletions
+4 -2
View File
@@ -278,7 +278,7 @@ class GeneralAI{
return [Util::choiceRandomUsingWeight($commandList), null];
}
public function chooseRecruitCrewType():array{
public function chooseRecruitCrewType():?array{
$general = $this->getGeneralObj();
$city = $this->city;
$nation = $this->nation;
@@ -374,7 +374,9 @@ class GeneralAI{
$cost = $general->onCalcDomestic('징병', 'cost', $cost);
$crew = intdiv($gold, $cost);
if($leadership < $crew) { $crew = $leadership; }
if($leadership*100 < $crew) { $crew = $leadership; }
$crew *= 100;
$arg = [
'crewType'=>$type,
'amountCrew'=>$crew