fix: 모든 내특/전특 사용시 에러나는 문제 수정
This commit is contained in:
@@ -198,6 +198,7 @@ class SpecialityHelper{
|
|||||||
public static function pickSpecialDomestic(RandUtil $rng, array $general, array $prevSpecials=[]) : string{
|
public static function pickSpecialDomestic(RandUtil $rng, array $general, array $prevSpecials=[]) : string{
|
||||||
$pAbs = [];
|
$pAbs = [];
|
||||||
$pRel = [];
|
$pRel = [];
|
||||||
|
$id = null;
|
||||||
|
|
||||||
$myCond = static::calcCondGeneric($general);
|
$myCond = static::calcCondGeneric($general);
|
||||||
|
|
||||||
@@ -240,7 +241,10 @@ class SpecialityHelper{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = $rng->choiceUsingWeight($pRel);
|
if($pRel){
|
||||||
|
$id = $rng->choiceUsingWeight($pRel);
|
||||||
|
}
|
||||||
|
|
||||||
if($id){
|
if($id){
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
@@ -256,6 +260,7 @@ class SpecialityHelper{
|
|||||||
$reqDex = [];
|
$reqDex = [];
|
||||||
$pAbs = [];
|
$pAbs = [];
|
||||||
$pRel = [];
|
$pRel = [];
|
||||||
|
$id = null;
|
||||||
|
|
||||||
$myCond = static::calcCondGeneric($general);
|
$myCond = static::calcCondGeneric($general);
|
||||||
$myCond |= static::calcCondDexterity($rng, $general);
|
$myCond |= static::calcCondDexterity($rng, $general);
|
||||||
@@ -307,7 +312,10 @@ class SpecialityHelper{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = $rng->choiceUsingWeight($pRel);
|
if($pRel){
|
||||||
|
$id = $rng->choiceUsingWeight($pRel);
|
||||||
|
}
|
||||||
|
|
||||||
if($id){
|
if($id){
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user