특기 획득 구조 변경

This commit is contained in:
2020-04-26 22:31:49 +09:00
parent 2bb6ef8efb
commit 724c7388af
50 changed files with 545 additions and 543 deletions
+14 -4
View File
@@ -9,12 +9,22 @@ namespace sammo;
* (단, autoload, 정적 변수 초기화는 허용)
*/
function getCharacterList(){
function getCharacterList(bool $onlyAvailable=true){
$infoText = [];
foreach(GameConst::$allPersonality as $personalityID){
if(!$onlyAvailable){
$class = buildPersonalityClass(GameConst::$neutralPersonality);
$infoText[GameConst::$neutralPersonality] = [$class->getName(), $class->getInfo()];
}
foreach(GameConst::$availablePersonality as $personalityID){
$class = buildPersonalityClass($personalityID);
$infoText[$personalityID] = [$class->getName(), $class->getInfo()];
}
if(!$onlyAvailable){
foreach(GameConst::$optionalPersonality as $personalityID){
$class = buildPersonalityClass($personalityID);
$infoText[$personalityID] = [$class->getName(), $class->getInfo()];
}
}
return $infoText;
}
@@ -247,7 +257,7 @@ function getGeneralSpecialDomesticClass(?string $type){
throw new \InvalidArgumentException("{$type}은 올바른 내정 특기가 아님");
}
function buildGeneralSpecialDomesticClass(?string $type):iAction{
function buildGeneralSpecialDomesticClass(?string $type):BaseSpecial{
static $cache = [];
if($type === null){
$type = 'None';
@@ -282,7 +292,7 @@ function getGeneralSpecialWarClass(?string $type){
throw new \InvalidArgumentException("{$type}은 올바른 전투 특기가 아님");
}
function buildGeneralSpecialWarClass(?string $type):iAction{
function buildGeneralSpecialWarClass(?string $type):BaseSpecial{
static $cache = [];
if($type === null){
$type = 'None';