버그 수정

This commit is contained in:
2020-04-27 14:12:51 +09:00
parent 751336e5d1
commit f7a041d9fc
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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;
}
}