diff --git a/hwe/join_post.php b/hwe/join_post.php index 3e343c27..423ecbf6 100644 --- a/hwe/join_post.php +++ b/hwe/join_post.php @@ -185,10 +185,10 @@ if($relYear < 3){ $experience = 0; } else{ - $expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 5'); + $expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 4'); $targetGenOrder = Util::round($expGenCount * 0.2); $experience = $db->queryFirstField( - 'SELECT experience FROM general WHERE nation != 0 AND npc < 5 ORDER BY experience ASC LIMIT %i, 1', + 'SELECT experience FROM general WHERE nation != 0 AND npc < 4 ORDER BY experience ASC LIMIT %i, 1', $targetGenOrder - 1 ); $experience *= 0.8; diff --git a/hwe/sammo/Command/General/che_랜덤임관.php b/hwe/sammo/Command/General/che_랜덤임관.php index cb683ec9..e0dd31f9 100644 --- a/hwe/sammo/Command/General/che_랜덤임관.php +++ b/hwe/sammo/Command/General/che_랜덤임관.php @@ -178,14 +178,14 @@ class che_랜덤임관 extends Command\GeneralCommand{ $generalsCnt = []; if($notIn){ $rawGeneralsCnt = $db->query( - 'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc < 5 AND nation.gennum < %i AND nation.scout=0 AND nation.nation NOT IN %li GROUP BY general.nation, general.npc', + 'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc < 4 AND nation.gennum < %i AND nation.scout=0 AND nation.nation NOT IN %li GROUP BY general.nation, general.npc', $genLimit, $notIn ); } else{ $rawGeneralsCnt = $db->query( - 'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc < 5 AND nation.gennum < %i AND nation.scout=0 GROUP BY general.nation, general.npc', + 'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc < 4 AND nation.gennum < %i AND nation.scout=0 GROUP BY general.nation, general.npc', $genLimit ); } diff --git a/hwe/sammo/Command/General/che_인재탐색.php b/hwe/sammo/Command/General/che_인재탐색.php index 6e943128..7548455c 100644 --- a/hwe/sammo/Command/General/che_인재탐색.php +++ b/hwe/sammo/Command/General/che_인재탐색.php @@ -178,7 +178,7 @@ class che_인재탐색 extends Command\GeneralCommand $avgGen = $db->queryFirstRow( 'SELECT avg(dedication) as ded,avg(experience) as exp, avg(dex1+dex2+dex3+dex4) as dex_t, avg(age) as age, avg(dex5) as dex5 - from general where npc < 5' + from general where npc < 4' ); $pickTypeList = ['무' => 6, '지' => 6, '무지' => 3]; diff --git a/hwe/sammo/Event/Action/RaiseInvader.php b/hwe/sammo/Event/Action/RaiseInvader.php index 3806b678..30ed30d7 100644 --- a/hwe/sammo/Event/Action/RaiseInvader.php +++ b/hwe/sammo/Event/Action/RaiseInvader.php @@ -99,14 +99,14 @@ class RaiseInvader extends \sammo\Event\Action if ($npcEachCount < 0) { $npcEachCount = - $db->queryFirstField('SELECT count(no) from general where npc < 5') / count($cities); + $db->queryFirstField('SELECT count(no) from general where npc < 4') / count($cities); $npcEachCount *= -1 * $this->npcEachCount; } $npcEachCount = max(10, Util::toInt($npcEachCount)); $specAvg = $this->specAvg; if ($specAvg < 0) { - $specAvg = $db->queryFirstField('SELECT avg((`leadership` + `strength` + `intel`)/3) from general where npc < 5'); + $specAvg = $db->queryFirstField('SELECT avg((`leadership` + `strength` + `intel`)/3) from general where npc < 4'); $specAvg *= -1 * $this->specAvg; } $specAvg = Util::toInt($specAvg); @@ -119,7 +119,7 @@ class RaiseInvader extends \sammo\Event\Action $dex = $this->dex; if ($dex < 0) { - $dex = $db->queryFirstField("SELECT avg((dex1 + dex2 + dex3 + dex4 + dex5)/5) from general where npc < 5"); + $dex = $db->queryFirstField("SELECT avg((dex1 + dex2 + dex3 + dex4 + dex5)/5) from general where npc < 4"); $dex *= -1 * $this->dex; } $dex = Util::toInt($dex);