feat: NPC정책 최대 포상량 지정
This commit is contained in:
@@ -137,6 +137,7 @@ class AutorunNationPolicy {
|
|||||||
public $reqNPCDevelRice = 500;
|
public $reqNPCDevelRice = 500;
|
||||||
|
|
||||||
public $minimumResourceActionAmount = 1000;
|
public $minimumResourceActionAmount = 1000;
|
||||||
|
public $maximumResourceActionAmount = 10000;
|
||||||
|
|
||||||
public $minNPCWarLeadership = 40;
|
public $minNPCWarLeadership = 40;
|
||||||
public $minWarCrew = 1500;
|
public $minWarCrew = 1500;
|
||||||
@@ -164,6 +165,7 @@ class AutorunNationPolicy {
|
|||||||
'reqNPCDevelRice'=>500,
|
'reqNPCDevelRice'=>500,
|
||||||
|
|
||||||
'minimumResourceActionAmount'=>1000,
|
'minimumResourceActionAmount'=>1000,
|
||||||
|
'maximumResourceActionAmount'=>10000,
|
||||||
|
|
||||||
'minNPCWarLeadership'=>40,
|
'minNPCWarLeadership'=>40,
|
||||||
'minWarCrew'=>1500,
|
'minWarCrew'=>1500,
|
||||||
|
|||||||
@@ -121,14 +121,14 @@ class GeneralAI
|
|||||||
|
|
||||||
$prevIncomeGold = $nationStor->prev_income_gold ?? 1000;
|
$prevIncomeGold = $nationStor->prev_income_gold ?? 1000;
|
||||||
$prevIncomeRice = $nationStor->prev_income_rice ?? 1000;
|
$prevIncomeRice = $nationStor->prev_income_rice ?? 1000;
|
||||||
$this->maxResourceActionAmount = Util::round(max(
|
$this->maxResourceActionAmount = Util::valueFit(Util::round(max(
|
||||||
$this->nationPolicy->minimumResourceActionAmount,
|
$this->nationPolicy->minimumResourceActionAmount,
|
||||||
$prevIncomeGold / 10,
|
$prevIncomeGold / 10,
|
||||||
$prevIncomeRice / 10,
|
$prevIncomeRice / 10,
|
||||||
$this->nation['gold'] / 5,
|
$this->nation['gold'] / 5,
|
||||||
$this->nation['rice'] / 5,
|
$this->nation['rice'] / 5,
|
||||||
($this->env['year'] - $this->env['startyear'] - 3) * 1000
|
($this->env['year'] - $this->env['startyear'] - 3) * 1000
|
||||||
), -2);
|
), -2), null, $this->nationPolicy->maximumResourceActionAmount);
|
||||||
if ($this->maxResourceActionAmount > GameConst::$maxResourceActionAmount) {
|
if ($this->maxResourceActionAmount > GameConst::$maxResourceActionAmount) {
|
||||||
$this->maxResourceActionAmount = GameConst::$maxResourceActionAmount;
|
$this->maxResourceActionAmount = GameConst::$maxResourceActionAmount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,6 +154,14 @@
|
|||||||
title="포상/몰수/헌납/삼/팜 최소 단위"
|
title="포상/몰수/헌납/삼/팜 최소 단위"
|
||||||
>연산결과가 이 단위보다 적다면 수행하지 않습니다.</NumberInputWithInfo
|
>연산결과가 이 단위보다 적다면 수행하지 않습니다.</NumberInputWithInfo
|
||||||
>
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<NumberInputWithInfo
|
||||||
|
v-model="nationPolicy.maximumResourceActionAmount"
|
||||||
|
:step="100"
|
||||||
|
title="포상/몰수/헌납/삼/팜 최대 단위"
|
||||||
|
>연산결과가 이 단위보다 크다면, 이 값에 맞춥니다.</NumberInputWithInfo
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<NumberInputWithInfo
|
<NumberInputWithInfo
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ export type NationPolicy = {
|
|||||||
reqNPCDevelGold: number,
|
reqNPCDevelGold: number,
|
||||||
reqNPCDevelRice: number,
|
reqNPCDevelRice: number,
|
||||||
minimumResourceActionAmount: number,
|
minimumResourceActionAmount: number,
|
||||||
|
maximumResourceActionAmount: number,
|
||||||
minNPCWarLeadership: number,
|
minNPCWarLeadership: number,
|
||||||
minWarCrew: number,
|
minWarCrew: number,
|
||||||
minNPCRecruitCityPopulation: number,
|
minNPCRecruitCityPopulation: number,
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ if ($currentNationPolicy['reqHumanWarUrgentRice'] ?? 0) {
|
|||||||
if ($currentNationPolicy['reqHumanWarUrgentGold'] ?? 0) {
|
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));
|
$zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options']??[], null, null, $nation, $gameStor->getAll(true));
|
||||||
|
|
||||||
$lastSetters = [
|
$lastSetters = [
|
||||||
'policy' => [
|
'policy' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user