fix: 모든 내특/전특 사용시 에러나는 문제 수정

This commit is contained in:
2023-03-28 09:54:24 +09:00
parent 64aa5d041f
commit 1780122936
+10 -2
View File
@@ -198,6 +198,7 @@ class SpecialityHelper{
public static function pickSpecialDomestic(RandUtil $rng, array $general, array $prevSpecials=[]) : string{
$pAbs = [];
$pRel = [];
$id = null;
$myCond = static::calcCondGeneric($general);
@@ -240,7 +241,10 @@ class SpecialityHelper{
}
}
$id = $rng->choiceUsingWeight($pRel);
if($pRel){
$id = $rng->choiceUsingWeight($pRel);
}
if($id){
return $id;
}
@@ -256,6 +260,7 @@ class SpecialityHelper{
$reqDex = [];
$pAbs = [];
$pRel = [];
$id = null;
$myCond = static::calcCondGeneric($general);
$myCond |= static::calcCondDexterity($rng, $general);
@@ -307,7 +312,10 @@ class SpecialityHelper{
}
}
$id = $rng->choiceUsingWeight($pRel);
if($pRel){
$id = $rng->choiceUsingWeight($pRel);
}
if($id){
return $id;
}