초반 m장 스탯 관련 문제 해결, 장수 선택 term 해결

This commit is contained in:
2021-01-01 21:09:43 +09:00
parent 528d30c317
commit f33e645113
4 changed files with 18 additions and 9 deletions
+11 -4
View File
@@ -260,6 +260,14 @@ class GeneralBuilder{
return $this;
}
public function getStat():array{
return [
$this->leadership,
$this->strength,
$this->intel
];
}
public function setAuxVar(string $key, $value):self{
if($value === null){
unset($this->aux[$key]);
@@ -416,7 +424,9 @@ class GeneralBuilder{
$this->specAge2 = Util::valueFit(Util::round((GameConst::$retirementYear - $age)/6 - $relYear / 2), 3) + $age;
}
if($this->leadership!==null && $this->strength!==null && $this->intel!== null){
if ($this->leadership===null || $this->strength===null || $this->intel === null){
$this->fillRandomStat($pickTypeList, $pickType);
}else{
$leadership = $this->leadership;
$strength = $this->strength;
$intel = $this->intel;
@@ -442,9 +452,6 @@ class GeneralBuilder{
}while(0);
}
else{
$this->fillRandomStat($pickTypeList, $pickType);
}
if($this->officerLevel === null){
if($this->nationID){