fix: 183년 이전 선포된 경우 공백지 출병을 시도하는 버그 수정

This commit is contained in:
2022-07-08 15:53:37 +09:00
parent 266c1c6a5b
commit be882000ad
+9 -5
View File
@@ -205,9 +205,15 @@ class GeneralAI
$nationID
);
if (!$warTarget && $yearMonth <= Util::joinYearMonth($env['startyear'] + 2, 5)) {
$this->dipState = self::d평화;
$this->attackable = false;
if ($yearMonth <= Util::joinYearMonth($env['startyear'] + 2, 5)) {
if(!$warTarget){
$this->dipState = self::d평화;
$this->attackable = false;
}
else{
$this->dipState = self::d선포;
$this->attackable = false;
}
return;
}
@@ -237,8 +243,6 @@ class GeneralAI
$this->warTargetNation = $warTargetNation;
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$minWarTerm = $db->queryFirstField('SELECT min(term) FROM diplomacy WHERE me = %i AND state=1', $nationID);
if ($minWarTerm === null) {