diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index b26a4925..5bc6f3c1 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -187,24 +187,28 @@ class GeneralAI $this->attackable = !!$frontStatus; $warTarget = $db->queryAllLists( - 'SELECT you, state FROM diplomacy WHERE me = %i AND (state = 0 OR (state = 1 AND term < 5))', + 'SELECT you, state, term FROM diplomacy WHERE me = %i AND state IN (0, 1)', $nationID ); $onWar = 0; $onWarReady = 0; + $onWarYet = 0; $warTargetNation = []; - foreach ($warTarget as [$warNationID, $warState]) { + foreach ($warTarget as [$warNationID, $warState, $warTerm]) { if ($warState == 0) { $onWar += 1; $warTargetNation[$warNationID] = 2; - } else { + } else if($warState == 1 && $warTerm < 5){ $onWarReady += 1; $warTargetNation[$warNationID] = 1; } + else{ + $onWarYet += 1; + } } - if(!$onWar){ + if(!$onWar && !$onWarReady && !$onWarYet){ $warTargetNation[0] = 1; } @@ -224,7 +228,7 @@ class GeneralAI if ($this->attackable) { //전쟁으로 인한 attackable인가? - if ($onWar || !$onWarReady) { + if ($onWar || (!$onWarReady && !$onWarYet)) { $this->dipState = self::d전쟁; } } @@ -1586,8 +1590,8 @@ class GeneralAI $avgGold /= $genCnt; $avgRice /= $genCnt; - $trialProp = $avgGold / max($this->nationPolicy->reqNPCWarGold, 2000); - $trialProp += $avgRice / max($this->nationPolicy->reqNPCWarRice, 2000); + $trialProp = $avgGold / max($this->nationPolicy->reqNPCWarGold * 1.5, 2000); + $trialProp += $avgRice / max($this->nationPolicy->reqNPCWarRice * 1.5, 2000); $devRate = $this->calcNationDevelopedRate(); diff --git a/hwe/sammo/WarUnitTrigger/che_저격발동.php b/hwe/sammo/WarUnitTrigger/che_저격발동.php index f4d1abf6..db1e4928 100644 --- a/hwe/sammo/WarUnitTrigger/che_저격발동.php +++ b/hwe/sammo/WarUnitTrigger/che_저격발동.php @@ -30,7 +30,7 @@ class che_저격발동 extends BaseWarUnitTrigger{ $oppose->getLogger()->pushGeneralActionLog("상대에게 저격당했다!", ActionLogger::PLAIN); $oppose->getLogger()->pushGeneralBattleDetailLog("상대에게 저격당했다!", ActionLogger::PLAIN); - $general->increaseVarWithLimit('atmos', 10, GameConst::$maxAtmosByWar); + $general->increaseVarWithLimit('atmos', 10, 0, GameConst::$maxAtmosByWar); $oppose->getGeneral()->increaseVarWithLimit('injury', Util::randRangeInt($selfEnv['woundMin'], $selfEnv['woundMax']), null, 80); $this->processConsumableItem();