From 34623fca947d300cf6ff07e8a6e0df333394dd0c Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 8 Aug 2018 02:31:49 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=AF=BC=EC=A1=B1=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=EB=A5=BC=205=EC=97=90=EC=84=9C=209=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99.=20=EA=B7=B8=EC=97=90=EB=94=B0=EB=A5=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EC=BD=94=EB=93=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 2 +- hwe/func_npc.php | 8 ++++---- hwe/func_process_personnel.php | 4 ++-- hwe/process_war.php | 2 +- hwe/sammo/Event/Action/RaiseInvader.php | 4 ++-- hwe/sammo/Scenario/NPC.php | 5 +++-- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index db47ff76..4a3d7812 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -2017,7 +2017,7 @@ function updateTurntime($no) { default: $alllog[0] = "●{$admin['month']}월:{$general['name']}{$josaYi} 사망했습니다."; break; } // 엔피씨,엠피씨,의병 사망로그 - if($general['npc'] == 2) { + if($general['npc'] == 2 || $general['npc'] == 6) { $alllog[0] = "●{$admin['month']}월:{$general['name']}{$josaYi} 사망했습니다."; } elseif($general['npc'] >= 3) { switch(rand()%10) { diff --git a/hwe/func_npc.php b/hwe/func_npc.php index 1782d4c4..d3c53d3e 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -302,10 +302,10 @@ function processAI($no) { } //재야인경우 - if($general['npc'] == 5 && $general['level'] == 0) { + if($general['npc'] == 9 && $general['level'] == 0) { // 오랑캐는 바로 임관 - $rulerNation = $db->queryFirstField('SELECT nation FROM general WHERE `level`=12 AND npc=5 and nation not in %li ORDER BY RAND() limit 1', Json::decode($general['nations'])); + $rulerNation = $db->queryFirstField('SELECT nation FROM general WHERE `level`=12 AND npc=9 and nation not in %li ORDER BY RAND() limit 1', Json::decode($general['nations'])); if($ruler) { $command = EncodeCommand(0, 0, $rulerNation, 25); //임관 @@ -315,7 +315,7 @@ function processAI($no) { $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); return; - } elseif($general['npc'] < 5 && $general['level'] == 0) { + } elseif($general['npc'] != 9 && $general['level'] == 0) { switch(Util::choiceRandomUsingWeight([11.4, 40, 20, 28.6])) { //임관 10% case 0: @@ -372,7 +372,7 @@ function processAI($no) { //군주가 할일 if($general['level'] == 12) { //오랑캐인데 공격 못하면 바로 방랑/해산 - if($general['npc'] == 5 && $dipState == 0 && !$attackable) { + if($general['npc'] == 9 && $dipState == 0 && !$attackable) { //방랑군이냐 아니냐 if($nation['level'] == 0) { // 해산 diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index 7198e515..51926882 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -172,9 +172,9 @@ function process_25(&$general) { $log[] = "●{$admin['month']}월:현재 {$nation['name']}{$josaUn} 임관이 제한되고 있습니다. 임관 실패."; } elseif($admin['year'] < $admin['startyear']+3 && $gencount >= GameConst::$initialNationGenLimit) { $log[] = "●{$admin['month']}월:현재 {$nation['name']}{$josaUn} 임관이 제한되고 있습니다. 임관 실패."; - } elseif($nation['scout'] == 1 && $general['npc'] < 5) { + } elseif($nation['scout'] == 1 && $general['npc'] != 9) { $log[] = "●{$admin['month']}월:현재 {$nation['name']}{$josaUn} 임관이 금지되어 있습니다. 임관 실패."; - } elseif($general['makelimit'] > 0 && $general['npc'] < 5) { + } elseif($general['makelimit'] > 0 && $general['npc'] != 9) { $log[] = "●{$admin['month']}월:재야가 된지 12턴이 지나야 합니다. 임관 실패. <1>$date"; } elseif(in_array($nation['nation'], $joinedNations)) { $log[] = "●{$admin['month']}월:이미 임관했었던 국가입니다. 임관 실패. <1>$date"; diff --git a/hwe/process_war.php b/hwe/process_war.php index 2b0971ed..8961d398 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -1665,7 +1665,7 @@ function ConquerCity($admin, $general, $city, $nation, $destnation) { } //NPC인 경우 10% 확률로 임관(엔장, 인재, 의병) - if($gen['npc'] >= 2 && $gen['npc'] <= 4 && rand() % 100 < 10) { + if($gen['npc'] >= 2 && $gen['npc'] <= 8 && rand() % 100 < 10) { $commissionCommand = EncodeCommand(0, 0, $nation['nation'], 25); //임관 $query = "update general set turn0='$commissionCommand' where no={$gen['no']}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/hwe/sammo/Event/Action/RaiseInvader.php b/hwe/sammo/Event/Action/RaiseInvader.php index aff8b8c3..fb8cec80 100644 --- a/hwe/sammo/Event/Action/RaiseInvader.php +++ b/hwe/sammo/Event/Action/RaiseInvader.php @@ -90,13 +90,13 @@ class RaiseInvader extends \sammo\Event\Action{ if($npcEachCount < 0){ $npcEachCount = - $db->queryFirstField('SELECT count(no) from general where npc<5') / count(self::INVADER_LIST); + $db->queryFirstField('SELECT count(no) from general where npc < 9') / count(self::INVADER_LIST); $npcEachCount /= -1 * $this->npcEachCount; } $specAvg = $this->specAvg; if($specAvg < 0){ - $specAvg = $db->queryFirstField('SELECT avg(sum(`leader` + `power` + `intel`)) from general where npc<5'); + $specAvg = $db->queryFirstField('SELECT avg(sum(`leader` + `power` + `intel`)) from general where npc < 9'); $specAvg /= -1 * $this->specAvg; } diff --git a/hwe/sammo/Scenario/NPC.php b/hwe/sammo/Scenario/NPC.php index d23f8d3c..b8ff50f7 100644 --- a/hwe/sammo/Scenario/NPC.php +++ b/hwe/sammo/Scenario/NPC.php @@ -22,6 +22,7 @@ class NPC{ public $ego; public $charDomestic = 0; public $charWar = 0; + public $npc = 2; public $text; //[ 1, "헌제",1002, 1, null, 17, 13, 61, 0, 170, 250, "안전", null, "산 넘어 산이로구나..."], @@ -211,8 +212,8 @@ class NPC{ $db->insert('general',[ 'npcid'=>$npcID, - 'npc'=>2, - 'npc_org'=>2, + 'npc'=>$this->npc, + 'npc_org'=>$this->npc, 'affinity'=>$affinity, 'name'=>$name, 'picture'=>$picturePath,