fix: 장수수 카운트에 "의병장"을 포함하여 계산하는 버그 수정

This commit is contained in:
2021-04-02 14:39:57 +09:00
parent b2dc9dc113
commit 174cef80c0
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -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);