From d2f6df270b28e03c73c590fa29949d753a6c956a Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 8 Feb 2020 14:02:18 +0900 Subject: [PATCH] =?UTF-8?q?NPC=EA=B0=80=20=ED=95=A8=EB=B6=80=EB=9F=AC=20?= =?UTF-8?q?=EC=A0=84=EC=9F=81=20=EC=83=81=ED=83=9C=EB=A5=BC=20=EB=B0=94?= =?UTF-8?q?=EA=BE=B8=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_npc.php | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/hwe/func_npc.php b/hwe/func_npc.php index bc29eb77..c52f3f2a 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -58,12 +58,10 @@ class AIAllowedAction{ $this->recruit_high = true; case 'recruit': $this->recruit = true; - $this->changeWarCondition = true; break; case 'train': $this->train = true; $this->atmos = true; - $this->changeWarCondition = true; break; case 'battle': $this->battle = true; @@ -279,7 +277,7 @@ function processAI($no, &$reduce_turn) { } - $query = "select no,turn0,npcid,name,nation,nations,city,level,npcmsg,personal,leader,intel,power,horse,weap,book,item,special,special2,gold,rice,crew,crewtype,train,atmos,troop,npc,affinity,mode,injury,picture,imgsvr,killturn,makelimit,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; + $query = "select no,turn0,npcid,name,nation,nations,city,level,npcmsg,personal,leader,intel,power,horse,weap,book,item,special,special2,gold,rice,crew,crewtype,train,atmos,troop,npc,affinity,injury,picture,imgsvr,killturn,makelimit,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; $result = MYDB_query($query, $connect) or Error("processAI01 ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -458,17 +456,8 @@ function processAI($no, &$reduce_turn) { $resrc = $tech * 700;//XXX: 왜 700이지? if($allowedAction->changeWarCondition){ - if($general['atmos'] >= 90 && $general['train'] >= 90) { - if($general['mode'] == 0) { - $query = "update general set mode=1 where no='{$general['no']}'"; - MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); - } - } else { - if($general['mode'] == 1) { - $query = "update general set mode=0 where no='{$general['no']}'"; - MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); - } - } + $query = "update general set mode=2 where no='{$general['no']}'"; + MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } @@ -952,16 +941,8 @@ function processAI($no, &$reduce_turn) { } } } elseif($general['crew'] >= 1000 && $general['train'] < 90 && $allowedAction->train) { - if($general['atmos'] >= 90 && $general['train'] >= 60 && $general['mode'] == 0) { - $query = "update general set mode=1 where no='{$general['no']}'"; - MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); - } $command = EncodeCommand(0, 0, 0, 13); //훈련 } elseif($general['crew'] >= 1000 && $general['atmos'] < 90 && $allowedAction->atmos) { - if($general['atmos'] >= 60 && $general['train'] >= 90 && $general['mode'] == 0) { - $query = "update general set mode=1 where no='{$general['no']}'"; - MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); - } $command = EncodeCommand(0, 0, 0, 14); //사기진작 } elseif($dipState <= 3) { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); // 준비는 됐으나 아직 선포중이면 내정, 조달