forked from devsam/core
fix: 도시 주둔 장수 중 해당 국가 소속만 계략 확률 감소에 영향을 주도록 수정
This commit is contained in:
@@ -74,12 +74,15 @@ class che_화계 extends Command\GeneralCommand
|
||||
|
||||
$maxGenScore = 0;
|
||||
$probCorrection = 0;
|
||||
$affectGeneralCount = 0;
|
||||
foreach ($destCityGeneralList as $destGeneral) {
|
||||
/** @var General $destGeneral */
|
||||
if ($destGeneral->getNationID() != $destNationID) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$affectGeneralCount++;
|
||||
|
||||
if ($statType === 'leadership') {
|
||||
$genScore = $destGeneral->getLeadership();
|
||||
} else if ($statType === 'strength') {
|
||||
@@ -95,7 +98,7 @@ class che_화계 extends Command\GeneralCommand
|
||||
|
||||
$prob = $maxGenScore / GameConst::$sabotageProbCoefByStat;
|
||||
$prob += $probCorrection;
|
||||
$prob += (log(count($destCityGeneralList) + 1, 2) - 1.25) * GameConst::$sabotageDefenceCoefByGeneralCnt;
|
||||
$prob += (log($affectGeneralCount + 1, 2) - 1.25) * GameConst::$sabotageDefenceCoefByGeneralCnt;
|
||||
|
||||
$prob += $destCity['secu'] / $destCity['secu_max'] / 5; //최대 20%p
|
||||
$prob += $destCity['supply'] ? 0.1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user