game: 전방 내정시, 수도가 전방이어도 감쇠되도록 설정

- 185년까지는 해당 없음(디버프 * 0%)
- 이후 1년마다 실제 적용량 대비 5%씩 가산 적용됨
- 205년이 되면 수도여도 전방 내정 감쇠가 그대로 적용됨
This commit is contained in:
2023-04-30 00:15:17 +09:00
parent 71a3ffa21c
commit 836adcfe3c
+15 -2
View File
@@ -185,8 +185,21 @@ class che_상업투자 extends Command\GeneralCommand{
$logger->pushGeneralActionLog(static::$actionName."{$josaUl} 하여 <C>$scoreText</> 상승했습니다. <1>$date</>");
}
if(in_array($this->city['front'], [1, 3]) && $this->nation['capital'] != $this->city['city']){
$score *= static::$debuffFront;
if(in_array($this->city['front'], [1, 3])){
$debuffFront = static::$debuffFront;
if($this->nation['capital'] == $this->city['city']){
$gameStor = \sammo\KVStorage::getStorage($db, 'game_env');
[$year, $startYear] = $gameStor->getValuesAsArray(['year', 'startyear']);
$relYear = $year - $startYear;
if($relYear < 25){
$debuffScale = Util::clamp($relYear - 5, 0, 20) * 0.05;
$debuffFront = ($debuffScale * $debuffFront) + (1 - $debuffScale);
}
}
$score *= $debuffFront;
}
//NOTE: 내정량 상승시 초과 가능?