fix: 1인국 n장 군주일때 발생하는 버그 수정

- 12월, 6월 지급률 계산 시
This commit is contained in:
2022-03-28 01:11:05 +09:00
parent 2b2a328062
commit 39d7b6d55c
+9 -7
View File
@@ -4095,17 +4095,18 @@ class GeneralAI
return 20;
}
$nationGenerals = $this->nationGenerals;
$nationGenerals[] = $this->general;
$dedicationList = array_map(function (General $general) {
return $general->getRaw();
}, array_filter($this->nationGenerals, function (General $rawGeneral) {
return $rawGeneral->getVar('officer_level') != 5;
}));
}, $nationGenerals);
$goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
$warIncome = getWarGoldIncome($nation['type'], $cityList);
$income = $goldIncome + $warIncome;
$outcome = getOutcome(100, $dedicationList);
$outcome = Util::valueFit(getOutcome(100, $dedicationList), 1);
$bill = intval($income / $outcome * 90); // 수입의 90% 만 지급
if ($nation['gold'] + $income - $outcome > $this->nationPolicy->reqNationGold * 2) {
@@ -4138,11 +4139,12 @@ class GeneralAI
return 20;
}
$nationGenerals = $this->nationGenerals;
$nationGenerals[] = $this->general;
$dedicationList = array_map(function (General $general) {
return $general->getRaw();
}, array_filter($this->nationGenerals, function (General $rawGeneral) {
return $rawGeneral->getVar('npc') != 5;
}));
}, $nationGenerals);
$riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);
$wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList);