병종값 변경

This commit is contained in:
2018-07-13 00:41:56 +09:00
parent 0ca7a8ab8a
commit b4529c9338
2 changed files with 74 additions and 72 deletions
+40 -38
View File
@@ -21,42 +21,42 @@ class GameUnitConstBase{
protected static $constType = null;
protected static $_buildData = [
[ 0, T_FOOTMAN, '보병', 100, 150, 7, 10, 9, 9, 0, 0, true, ['표준적인 보병입니다.','보병은 방어특화입니다.']],
[ 1, T_FOOTMAN, '청주병', 100, 200, 7, 10, 10, 11, 1, '중원', true, ['저렴하고 튼튼합니다.']],
[ 2, T_FOOTMAN, '수병', 150, 150, 7, 10, 11, 10, 1, '오월', true, ['저렴하고 강력합니다.']],
[ 3, T_FOOTMAN, '자객병', 100, 150, 7, 20, 10, 10, 2, '저', true, ['은밀하고 날쌥니다.']],
[ 4, T_FOOTMAN, '근위병', 150, 200, 7, 10, 12, 12, 2, '낙양', true, ['최강의 보병입니다.']],
[ 5, T_FOOTMAN, '등갑병', 100, 250, 7, 5, 13, 10, 1, '남중', true, ['등갑을 두른 보병입니다.']],
[ 0, GameUnitConstBase::T_FOOTMAN, '보병', 100, 150, 7, 10, 9, 9, 0, null, null, 0, ['표준적인 보병입니다.','보병은 방어특화입니다.']],
[ 1, GameUnitConstBase::T_FOOTMAN, '청주병', 100, 200, 7, 10, 10, 11, 1000, null, ['중원'], 0, ['저렴하고 튼튼합니다.']],
[ 2, GameUnitConstBase::T_FOOTMAN, '수병', 150, 150, 7, 10, 11, 10, 1000, null, ['오월'], 0, ['저렴하고 강력합니다.']],
[ 3, GameUnitConstBase::T_FOOTMAN, '자객병', 100, 150, 7, 20, 10, 10, 2000, ['저'], null, 0, ['은밀하고 날쌥니다.']],
[ 4, GameUnitConstBase::T_FOOTMAN, '근위병', 150, 200, 7, 10, 12, 12, 3000, ['낙양'], null, 0, ['최강의 보병입니다.']],
[ 5, GameUnitConstBase::T_FOOTMAN, '등갑병', 100, 250, 7, 5, 13, 10, 1000, null, ['남중'], 0, ['등갑을 두른 보병입니다.']],
[10, T_ARCHER, '궁병', 100, 100, 7, 20, 10, 10, 0, 0, true, ['표준적인 궁병입니다.','궁병은 회피특화입니다.']],
[11, T_ARCHER, '궁기병', 100, 100, 8, 30, 11, 12, 1, '동이', true, ['말을 타고 잘 피합니다.']],
[12, T_ARCHER, '연노병', 150, 100, 8, 20, 12, 11, 1, '서촉', true, ['화살을 연사합니다.']],
[13, T_ARCHER, '강궁병', 150, 150, 7, 20, 13, 13, 2, '양양', true, ['강건한 궁병입니다.']],
[14, T_ARCHER, '석궁병', 200, 100, 7, 20, 13, 13, 2, '건업', true, ['강력한 화살을 쏩니다.']],
[10, GameUnitConstBase::T_ARCHER, '궁병', 100, 100, 7, 20, 10, 10, 0, null, null, 0, ['표준적인 궁병입니다.','궁병은 회피특화입니다.']],
[11, GameUnitConstBase::T_ARCHER, '궁기병', 100, 100, 8, 30, 11, 12, 1000, null, ['동이'], 0, ['말을 타고 잘 피합니다.']],
[12, GameUnitConstBase::T_ARCHER, '연노병', 150, 100, 8, 20, 12, 11, 1000, null, ['서촉'], 0, ['화살을 연사합니다.']],
[13, GameUnitConstBase::T_ARCHER, '강궁병', 150, 150, 7, 20, 13, 13, 3000, ['양양'], null, 0, ['강건한 궁병입니다.']],
[14, GameUnitConstBase::T_ARCHER, '석궁병', 200, 100, 7, 20, 13, 13, 3000, ['건업'], null, 0, ['강력한 화살을 쏩니다.']],
[20, T_CAVALRY, '기병', 150, 100, 7, 5, 11, 11, 0, 0, true, ['표준적인 기병입니다.','기병은 공격특화입니다.']],
[21, T_CAVALRY, '백마병', 200, 100, 7, 5, 12, 13, 1, '하북', true, ['백마의 위용을 보여줍니다.']],
[22, T_CAVALRY, '중장기병', 150, 150, 7, 5, 13, 12, 1, '서북', true, ['갑주를 두른 기병입니다.']],
[23, T_CAVALRY, '돌격기병', 200, 100, 8, 5, 13, 11, 2,'흉노', true, ['저돌적으로 공격합니다.']],
[24, T_CAVALRY, '철기병', 100, 200, 7, 5, 11, 13, 2, '강', true, ['철갑을 두른 기병입니다.']],
[25, T_CAVALRY, '수렵기병', 150, 100, 8, 15, 12, 12, 2, '산월', true, ['날쎄고 빠른 기병입니다.']],
[26, T_CAVALRY, '맹수병', 250, 200, 6, 0, 16, 16, 2, '남만', true, ['어느 누구보다 강력합니다.']],
[27, T_CAVALRY, '호표기병', 200, 150, 7, 5, 14, 14, 2, '허창', true, ['정예 기병입니다.']],
[20, GameUnitConstBase::T_CAVALRY, '기병', 150, 100, 7, 5, 11, 11, 0, null, null, 0, ['표준적인 기병입니다.','기병은 공격특화입니다.']],
[21, GameUnitConstBase::T_CAVALRY, '백마병', 200, 100, 7, 5, 12, 13, 1000, null, ['하북'], 0, ['백마의 위용을 보여줍니다.']],
[22, GameUnitConstBase::T_CAVALRY, '중장기병', 150, 150, 7, 5, 13, 12, 1000, null, ['서북'], 0, ['갑주를 두른 기병입니다.']],
[23, GameUnitConstBase::T_CAVALRY, '돌격기병', 200, 100, 8, 5, 13, 11, 2000, ['흉노'], null, 0, ['저돌적으로 공격합니다.']],
[24, GameUnitConstBase::T_CAVALRY, '철기병', 100, 200, 7, 5, 11, 13, 2000, ['강'], null, 0, ['철갑을 두른 기병입니다.']],
[25, GameUnitConstBase::T_CAVALRY, '수렵기병', 150, 100, 8, 15, 12, 12, 2000, ['산월'], null, 0, ['날쎄고 빠른 기병입니다.']],
[26, GameUnitConstBase::T_CAVALRY, '맹수병', 250, 200, 6, 0, 16, 16, 2000, ['남만'], null, 0, ['어느 누구보다 강력합니다.']],
[27, GameUnitConstBase::T_CAVALRY, '호표기병', 200, 150, 7, 5, 14, 14, 3000, ['허창'], null, 0, ['정예 기병입니다.']],
[30, T_WIZARD, '귀병', 80, 80, 7, 5, 9, 9, 0, 0, true, ['계략을 사용하는 병종입니다.']],
[31, T_WIZARD, '신귀병', 80, 80, 7, 20, 10, 10, 1,'초', true, ['신출귀몰한 귀병입니다.']],
[32, T_WIZARD, '백귀병', 80, 130, 7, 5, 9, 11, 2, '오환', true, ['저렴하고 튼튼합니다.']],
[33, T_WIZARD, '흑귀병', 130, 80, 7, 5, 11, 9, 2, '왜', true, ['저렴하고 강력합니다.']],
[34, T_WIZARD, '악귀병', 130, 130, 7, 0, 12, 12, 2, '장안', true, ['백병전에도 능숙합니다.']],
[35, T_WIZARD, '남귀병', 60, 60, 7, 10, 8, 8, 0, 1000, false, ['전투를 포기하고 계략에 몰두합니다.']],
[36, T_WIZARD, '황귀병', 110, 110, 7, 0, 13, 10, 2, '낙양', true, ['고도로 훈련된 귀병입니다.']],
[37, T_WIZARD, '천귀병', 80, 130, 7, 15, 11, 12, 2, '성도', true, ['갑주를 두른 귀병입니다.']],
[38, T_WIZARD, '마귀병', 130, 80, 7, 15, 12, 11, 2, '업', true, ['날카로운 무기를 가진 귀병입니다.']],
[30, GameUnitConstBase::T_WIZARD, '귀병', 80, 80, 7, 5, 9, 9, 0, null, null, 0, ['계략을 사용하는 병종입니다.']],
[31, GameUnitConstBase::T_WIZARD, '신귀병', 80, 80, 7, 20, 10, 10, 1000, null, ['초'], 0, ['신출귀몰한 귀병입니다.']],
[32, GameUnitConstBase::T_WIZARD, '백귀병', 80, 130, 7, 5, 9, 11, 2000, ['오환'], null, 0, ['저렴하고 튼튼합니다.']],
[33, GameUnitConstBase::T_WIZARD, '흑귀병', 130, 80, 7, 5, 11, 9, 2000, ['왜'], null, 0, ['저렴하고 강력합니다.']],
[34, GameUnitConstBase::T_WIZARD, '악귀병', 130, 130, 7, 0, 12, 12, 3000, ['장안'], null, 0, ['백병전에도 능숙합니다.']],
[35, GameUnitConstBase::T_WIZARD, '남귀병', 60, 60, 7, 10, 8, 8, 1000, null, null, 0, ['전투를 포기하고 계략에 몰두합니다.']],
[36, GameUnitConstBase::T_WIZARD, '황귀병', 110, 110, 7, 0, 13, 10, 3000, ['낙양'], null, 0, ['고도로 훈련된 귀병입니다.']],
[37, GameUnitConstBase::T_WIZARD, '천귀병', 80, 130, 7, 15, 11, 12, 3000, ['성도'], null, 0, ['갑주를 두른 귀병입니다.']],
[38, GameUnitConstBase::T_WIZARD, '마귀병', 130, 80, 7, 15, 12, 11, 3000, ['업'], null, 0, ['날카로운 무기를 가진 귀병입니다.']],
[40, T_SIEGE, '정란', 100, 100, 6, 0, 15, 5, 0, 0, false, ['높은 구조물 위에서 공격합니다.']],
[41, T_SIEGE, '충차', 150, 100, 6, 0, 20, 5, 0, 1000, false, ['엄청난 위력으로 성벽을 부수어버립니다.']],
[42, T_SIEGE, '벽력거', 200, 100, 6, 0, 25, 5, 2, '업', true, ['상대에게 돌덩이를 날립니다.']],
[43, T_SIEGE, '목우', 50, 200, 5, 0, 30, 5, 2, '성도', true, ['상대를 저지하는 특수병기입니다.']]
[40, GameUnitConstBase::T_SIEGE, '정란', 100, 100, 6, 0, 15, 5, 0, null, null, 3, ['높은 구조물 위에서 공격합니다.']],
[41, GameUnitConstBase::T_SIEGE, '충차', 150, 100, 6, 0, 20, 5, 1000, null, null, 0, ['엄청난 위력으로 성벽을 부수어버립니다.']],
[42, GameUnitConstBase::T_SIEGE, '벽력거', 200, 100, 6, 0, 25, 5, 3000, ['업'], null, 0, ['상대에게 돌덩이를 날립니다.']],
[43, GameUnitConstBase::T_SIEGE, '목우', 50, 200, 5, 0, 30, 5, 3000, ['성도'], null, 0, ['상대를 저지하는 특수병기입니다.']]
];
/**
@@ -118,9 +118,10 @@ class GameUnitConstBase{
$avoid,
$cost,
$rice,
$recruitType,
$recruitCondition,
$recruitFirst,
$reqTech,
$reqCities,
$reqRegions,
$reqYear,
$info
] = $rawUnit;
@@ -150,9 +151,10 @@ class GameUnitConstBase{
$avoid,
$cost,
$rice,
$recruitType,
$recruitCondition,
$recruitFirst,
$reqTech,
$reqCities,
$reqRegions,
$reqYear,
$info
);
+34 -34
View File
@@ -11,9 +11,10 @@ class GameUnitDetail{
public $avoid;
public $cost;
public $rice;
public $recruitType;
public $recruitCondition;
public $recruitFirst;
public $reqTech;
public $reqCities;
public $reqRegions;
public $reqYear;
public $info;
public function __construct(
@@ -26,9 +27,10 @@ class GameUnitDetail{
int $avoid,
int $cost,
int $rice,
int $recruitType,
int $recruitCondition,
bool $recruitFirst,
int $reqTech,
?array $reqCities,
?array $reqRegions,
int $reqYear,
array $info
){
$this->name = $name;
@@ -39,47 +41,45 @@ class GameUnitDetail{
$this->avoid = $avoid;
$this->cost = $cost;
$this->rice = $rice;
$this->recruitType = $recruitType;
$this->recruitCondition = $recruitCondition;
$this->recruitFirst = $recruitFirst;
$this->reqTech = $reqTech;
$this->reqCities = $reqCities;
$this->reqRegions = $reqRegions;
$this->reqYear = $reqYear;
$this->info = $info;
}
public function isValid($ownCities, $ownRegions, $relativeYear, $tech){
if($relativeYear < 3 && !$this->recruitFirst){
if($relativeYear < $this->reqYear){
return false;
}
if($this->recruitType == 0){
if($tech < $this->recruitCondition){
if($tech < $this->reqTech){
return false;
}
if($this->reqCities !== null){
$valid = false;
foreach($this->reqCities as $reqCity){
if(\key_exists($reqCity, $ownCities)){
$valid = true;
break;
}
}
if(!$valid){
return false;
}
}
if($this->recruitType == 1){
if(!key_exists($this->recruitCondition, $ownRegions)){
return false;
}
if ($tech < 1000) {
return false;
}
}
if($this->recruitType == 2){
$cityLevel = CityConst::byID($this->recruitCondition)->level;
if(!key_exists($this->recruitCondition, $ownCities)){
return false;
}
if($cityLevel == CityConst::$levelMap['특']){
if ($tech < 3000) {
return false;
if($this->reqRegions !== null){
$valid = false;
foreach($this->reqRegions as $reqRegion){
if(\key_exists($reqRegion, $ownRegions)){
$valid = true;
break;
}
}
else{ //if($cityLevel == '이')
if ($tech < 2000) {
return false;
}
if(!$valid){
return false;
}
}