전투 특기 클래스 추가,

This commit is contained in:
2018-09-17 03:31:36 +09:00
parent 6eb67b1a3c
commit b79045eddb
34 changed files with 487 additions and 41 deletions
+21 -1
View File
@@ -260,7 +260,7 @@ function getPersonalityClass(?string $type){
function getGeneralSpecialDomesticClass(?string $type){
if($type === null){
$type = GameConst::$defaultSpecial;
$type = GameConst::$defaultSpecialDomestic;
}
static $basePath = __NAMESPACE__.'\\TriggerSpecialDomestic\\';
@@ -278,6 +278,26 @@ function getGeneralSpecialDomesticClass(?string $type){
new \InvalidArgumentException("{$type}은 올바른 내정 특기가 아님");
}
function getGeneralSpecialWarClass(?string $type){
if($type === null){
$type = GameConst::$defaultSpecialWar;
}
static $basePath = __NAMESPACE__.'\\TriggerSpecialWar\\';
$classPath = ($basePath.$type);
if(class_exists($classPath)){
return $classPath;
}
$classPath = ($basePath.'che_'.$type);
if(class_exists($classPath)){
return $classPath;
}
new \InvalidArgumentException("{$type}은 올바른 전투 특기가 아님");
}
function getLevel($level, $nlevel=8) {
if($level >= 0 && $level <= 4) { $nlevel = 0; }
$code = $nlevel * 100 + $level;