forked from devsam/core
fix: 1인국 n장 군주일때 발생하는 버그 수정
- 12월, 6월 지급률 계산 시
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user