NPC 포상룰 변경
This commit is contained in:
@@ -64,6 +64,7 @@ if ($currentNationPolicy['reqHumanWarUrgentGold'] ?? 0) {
|
|||||||
$autoPolicyVariable['reqHumanWarUrgentGold'] = $currentNationPolicy['reqHumanWarUrgentGold'];
|
$autoPolicyVariable['reqHumanWarUrgentGold'] = $currentNationPolicy['reqHumanWarUrgentGold'];
|
||||||
}
|
}
|
||||||
$autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true));
|
$autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true));
|
||||||
|
$zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], null, null, $nation, $gameStor->getAll(true));
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -184,7 +185,7 @@ $autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['optio
|
|||||||
</div>
|
</div>
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">
|
<div style='text-align:right;'><small class="form-text text-muted">
|
||||||
유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.<br>
|
유저장긴급포상시 이보다 금이 적은 장수에게 포상합니다.<br>
|
||||||
0이면 보병 6회 징병(<?= number_format(GameConst::$defaultStatMax * 100) ?> * 6) 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarUrgentGold) ?>입니다.</small></div>
|
0이면 보병 6회 징병(<?= number_format(GameConst::$defaultStatMax * 100) ?> * 6) 가능한 금을 기준으로 하며, 그 수치는 현재 <?= number_format($zeroPolicy->reqHumanWarUrgentGold) ?>입니다.</small></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -193,7 +194,7 @@ $autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['optio
|
|||||||
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentRice" min="0" value="0">
|
<input type="number" class="form-control" data-type="integer" id="reqHumanWarUrgentRice" min="0" value="0">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.<br>0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatMax * 100 * 6) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarUrgentRice) ?>입니다.</small></div>
|
<div style='text-align:right;'><small class="form-text text-muted">유저장긴급포상시 이보다 쌀이 적은 장수에게 포상합니다.<br>0이면 기본 병종으로 <?= number_format(GameConst::$defaultStatMax * 100 * 6) ?>명 사살 가능한 쌀을 기준으로 하며, 그 수치는 현재 <?= number_format($zeroPolicy->reqHumanWarUrgentRice) ?>입니다.</small></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
@@ -205,7 +206,7 @@ $autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['optio
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
|
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 금입니다. 이보다 적으면 포상합니다. <br>
|
||||||
0이면 유저전투장 긴급포상 금의 3배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandGold) ?>입니다.</small></div>
|
0이면 유저전투장 긴급포상 금의 2배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandGold) ?>입니다.</small></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -215,7 +216,7 @@ $autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['optio
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
|
<div style='text-align:right;'><small class="form-text text-muted">유저전투장에게 주는 쌀입니다. 이보다 적으면 포상합니다. <br>
|
||||||
0이면 유저전투장 긴급포상 쌀의 3배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandRice) ?>입니다.</small></div>
|
0이면 유저전투장 긴급포상 쌀의 2배를 기준으로 하며, 그 수치는 현재 <?= number_format($autoPolicy->reqHumanWarRecommandRice) ?>입니다.</small></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
|
|||||||
@@ -240,10 +240,10 @@ class AutorunNationPolicy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($this->reqHumanWarRecommandGold === 0){
|
if($this->reqHumanWarRecommandGold === 0){
|
||||||
$this->reqHumanWarRecommandGold = Util::round($this->reqHumanWarUrgentGold * 3, -2);
|
$this->reqHumanWarRecommandGold = Util::round($this->reqHumanWarUrgentGold * 2, -2);
|
||||||
}
|
}
|
||||||
if($this->reqHumanWarRecommandRice === 0){
|
if($this->reqHumanWarRecommandRice === 0){
|
||||||
$this->reqHumanWarRecommandRice = Util::round($this->reqHumanWarUrgentRice * 3, -2);
|
$this->reqHumanWarRecommandRice = Util::round($this->reqHumanWarUrgentRice * 2, -2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($general->getNPCType() >= 2){
|
if($general->getNPCType() >= 2){
|
||||||
|
|||||||
@@ -1249,7 +1249,7 @@ class GeneralAI
|
|||||||
}
|
}
|
||||||
//국고와 '충분한 금액'의 기하평균
|
//국고와 '충분한 금액'의 기하평균
|
||||||
$payAmount = sqrt(($enoughMoney - $targetUserGeneral->getVar($resName)) * $resVal);
|
$payAmount = sqrt(($enoughMoney - $targetUserGeneral->getVar($resName)) * $resVal);
|
||||||
$payAmount = Util::valueFit($payAmount, $resVal - $reqNationRes * 0.9, $enoughMoney - $targetUserGeneral->getVar($resName));
|
$payAmount = Util::valueFit($payAmount, $resVal - $reqNationRes, $enoughMoney - $targetUserGeneral->getVar($resName));
|
||||||
|
|
||||||
if($payAmount < $this->nationPolicy->minimumResourceActionAmount){
|
if($payAmount < $this->nationPolicy->minimumResourceActionAmount){
|
||||||
continue;
|
continue;
|
||||||
@@ -1298,12 +1298,12 @@ class GeneralAI
|
|||||||
'gold' => [
|
'gold' => [
|
||||||
$this->nationPolicy->reqNationGold,
|
$this->nationPolicy->reqNationGold,
|
||||||
$nation['gold'],
|
$nation['gold'],
|
||||||
$this->nationPolicy->reqNPCWarGold
|
$this->nationPolicy->reqNPCWarGold/2
|
||||||
],
|
],
|
||||||
'rice' => [
|
'rice' => [
|
||||||
$this->nationPolicy->reqNationRice,
|
$this->nationPolicy->reqNationRice,
|
||||||
$nation['rice'],
|
$nation['rice'],
|
||||||
$this->nationPolicy->reqNPCWarRice
|
$this->nationPolicy->reqNPCWarRice/2
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -1335,7 +1335,7 @@ class GeneralAI
|
|||||||
}
|
}
|
||||||
//국고와 '충분한 금액'의 기하평균
|
//국고와 '충분한 금액'의 기하평균
|
||||||
$payAmount = sqrt(($enoughMoney - $targetNPCGeneral->getVar($resName)) * $resVal);
|
$payAmount = sqrt(($enoughMoney - $targetNPCGeneral->getVar($resName)) * $resVal);
|
||||||
$payAmount = Util::valueFit($payAmount, $resVal - $reqNationRes * 0.8, $enoughMoney - $targetNPCGeneral->getVar($resName));
|
$payAmount = Util::valueFit($payAmount, $resVal - $reqNationRes*0.9, $enoughMoney - $targetNPCGeneral->getVar($resName));
|
||||||
|
|
||||||
if($payAmount < $this->nationPolicy->minimumResourceActionAmount){
|
if($payAmount < $this->nationPolicy->minimumResourceActionAmount){
|
||||||
continue;
|
continue;
|
||||||
@@ -1424,7 +1424,7 @@ class GeneralAI
|
|||||||
}
|
}
|
||||||
//국고와 '충분한 금액'의 기하평균
|
//국고와 '충분한 금액'의 기하평균
|
||||||
$payAmount = sqrt(($enoughMoney - $targetNPCGeneral->getVar($resName)) * $resVal);
|
$payAmount = sqrt(($enoughMoney - $targetNPCGeneral->getVar($resName)) * $resVal);
|
||||||
$payAmount = Util::valueFit($payAmount, $resVal - $reqNationRes * 0.9, $enoughMoney - $targetNPCGeneral->getVar($resName));
|
$payAmount = Util::valueFit($payAmount, $resVal - $reqNationRes, $enoughMoney - $targetNPCGeneral->getVar($resName));
|
||||||
|
|
||||||
if ($resVal < $payAmount / 2) {
|
if ($resVal < $payAmount / 2) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user