diff --git a/hwe/sammo/AutorunGeneralPolicy.php b/hwe/sammo/AutorunGeneralPolicy.php index 65bfd084..9b787c90 100644 --- a/hwe/sammo/AutorunGeneralPolicy.php +++ b/hwe/sammo/AutorunGeneralPolicy.php @@ -69,7 +69,7 @@ class AutorunGeneralPolicy{ public $can징병 = true; public $can모병 = false; public $can한계징병 = true; - public $can고급병종 = true; + public $can고급병종 = true;//TODO: false로 전환 public $can전투준비 = true; public $can소집해제 = true; diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 5ba3cc95..592beb4d 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -2170,12 +2170,12 @@ class GeneralAI foreach (GameUnitConst::byType($armType) as $crewtype) { if ($crewtype->isValid($cities, $regions, $relYear, $tech)) { $score = $crewtype->pickScore($tech); - $types[] = [$crewtype->id, $score]; + $types[$crewtype->id] = $score; } } if ($types) { - $type = Util::choiceRandomUsingWeightPair($types); + $type = Util::choiceRandomUsingWeight($types); } else { throw new MustNotBeReachedException('에러:'.var_dump([$general->getName(), $general->getAuxVar('armType'), $armType, $cities, $regions, $relYear, $tech], true)); } @@ -2184,7 +2184,7 @@ class GeneralAI $currCrewType = $general->getCrewTypeObj(); if ($currCrewType->isValid($cities, $regions, $relYear, $tech)) { $currScore = $crewtype->pickScore($tech); - if($types[$type][1] * 0.8 < $currScore){ + if($types[$type] * 0.8 < $currScore){ $type = $currCrewType->id; } }