특기 초기화 추가
This commit is contained in:
@@ -179,7 +179,7 @@ class SpecialityHelper{
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function pickSpecialDomestic(array $general) : string{
|
||||
public static function pickSpecialDomestic(array $general, array $prevSpecials=[]) : string{
|
||||
$pAbs = [];
|
||||
$pRel = [];
|
||||
|
||||
@@ -201,6 +201,9 @@ class SpecialityHelper{
|
||||
if(!$valid){
|
||||
continue;
|
||||
}
|
||||
if(in_array($specialID, $prevSpecials)){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if($weightType === static::WEIGHT_PERCENT){
|
||||
@@ -226,10 +229,14 @@ class SpecialityHelper{
|
||||
return $id;
|
||||
}
|
||||
|
||||
if($prevSpecials){
|
||||
return static::pickSpecialDomestic($general, []);
|
||||
}
|
||||
|
||||
throw new MustNotBeReachedException();
|
||||
}
|
||||
|
||||
public static function pickSpecialWar(array $general) : string{
|
||||
public static function pickSpecialWar(array $general, array $prevSpecials=[]) : string{
|
||||
$reqDex = [];
|
||||
$pAbs = [];
|
||||
$pRel = [];
|
||||
@@ -254,6 +261,9 @@ class SpecialityHelper{
|
||||
if(!$valid){
|
||||
continue;
|
||||
}
|
||||
if(in_array($specialID, $prevSpecials)){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if($cond & self::REQ_DEXTERITY){
|
||||
@@ -286,6 +296,10 @@ class SpecialityHelper{
|
||||
return $id;
|
||||
}
|
||||
|
||||
if($prevSpecials){
|
||||
return static::pickSpecialWar($general, []);
|
||||
}
|
||||
|
||||
throw new MustNotBeReachedException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user