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