feat: NPC 추방,몰수, 고유메시지 빈도를 GameConst에서 조절
This commit is contained in:
@@ -241,7 +241,7 @@ function do추방(General $general, int $myOfficerLevel):?string{
|
|||||||
}
|
}
|
||||||
$general->setVar('troop', 0);
|
$general->setVar('troop', 0);
|
||||||
|
|
||||||
if($general->getNPCType() >= 2 && ($env['scenario'] < 100 || Util::randBool(0.01))) {
|
if($general->getNPCType() >= 2 && Util::randBool(GameConst::$npcBanMessageProb)) {
|
||||||
|
|
||||||
$str = Util::choiceRandom([
|
$str = Util::choiceRandom([
|
||||||
'날 버리다니... 곧 전장에서 복수해주겠다...',
|
'날 버리다니... 곧 전장에서 복수해주겠다...',
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class che_몰수 extends Command\NationCommand
|
|||||||
);
|
);
|
||||||
$amountText = number_format($amount, 0);
|
$amountText = number_format($amount, 0);
|
||||||
|
|
||||||
if ($destGeneral->getNPCType() >= 2 && Util::randBool(0.01)) {
|
if ($destGeneral->getNPCType() >= 2 && Util::randBool(GameConst::$npcSeizureMessageProb)) {
|
||||||
$npcTexts = [
|
$npcTexts = [
|
||||||
'몰수를 하다니... 이것이 윗사람이 할 짓이란 말입니까...',
|
'몰수를 하다니... 이것이 윗사람이 할 짓이란 말입니까...',
|
||||||
'사유재산까지 몰수해가면서 이 나라가 잘 될거라 믿습니까? 정말 이해할 수가 없군요...',
|
'사유재산까지 몰수해가면서 이 나라가 잘 될거라 믿습니까? 정말 이해할 수가 없군요...',
|
||||||
|
|||||||
@@ -394,4 +394,8 @@ class GameConstBase
|
|||||||
'임', '정', '제', '조', '주', '준', '지', '찬', '책', '충', '탁', '택', '통', '패', '평', '포', '합', '해',
|
'임', '정', '제', '조', '주', '준', '지', '찬', '책', '충', '탁', '택', '통', '패', '평', '포', '합', '해',
|
||||||
'혁', '현', '화', '환', '회', '횡', '후', '훈', '휴', '흠', '흥'
|
'혁', '현', '화', '환', '회', '횡', '후', '훈', '휴', '흠', '흥'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public static $npcBanMessageProb = 0.01;
|
||||||
|
public static $npcSeizureMessageProb = 0.01;
|
||||||
|
public static $npcMessageFreqByDay = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2004,6 +2004,7 @@ class GeneralAI
|
|||||||
|
|
||||||
//수도와 연결된 도시 탐색
|
//수도와 연결된 도시 탐색
|
||||||
while (!$queue->isEmpty()) {
|
while (!$queue->isEmpty()) {
|
||||||
|
/** @var int */
|
||||||
$cityID = $queue->dequeue();
|
$cityID = $queue->dequeue();
|
||||||
|
|
||||||
foreach (array_keys(CityConst::byID($cityID)->path) as $nextCityID) {
|
foreach (array_keys(CityConst::byID($cityID)->path) as $nextCityID) {
|
||||||
@@ -3643,9 +3644,9 @@ class GeneralAI
|
|||||||
$npcType = $general->getNPCType();
|
$npcType = $general->getNPCType();
|
||||||
$nationID = $general->getNationID();
|
$nationID = $general->getNationID();
|
||||||
|
|
||||||
//특별 메세지 있는 경우 출력 하루 4번
|
//특별 메세지 있는 경우 출력
|
||||||
$term = $this->env['turnterm'];
|
$term = $this->env['turnterm'];
|
||||||
if ($general->getVar('npcmsg') && Util::randBool($term / (6 * 60))) {
|
if ($general->getVar('npcmsg') && Util::randBool(GameConst::$npcMessageFreqByDay * $term / (60 * 24))) {
|
||||||
$src = new MessageTarget(
|
$src = new MessageTarget(
|
||||||
$general->getID(),
|
$general->getID(),
|
||||||
$general->getVar('name'),
|
$general->getVar('name'),
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"history":[
|
"history":[
|
||||||
],
|
],
|
||||||
"const": {
|
"const": {
|
||||||
"joinRuinedNPCProp":0
|
"joinRuinedNPCProp":0,
|
||||||
|
"npcBanMessageProb":1
|
||||||
},
|
},
|
||||||
"events":[
|
"events":[
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
"history":[
|
"history":[
|
||||||
],
|
],
|
||||||
"const": {
|
"const": {
|
||||||
"joinRuinedNPCProp":0
|
"joinRuinedNPCProp":0,
|
||||||
|
"npcBanMessageProb":1
|
||||||
},
|
},
|
||||||
"events":[
|
"events":[
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
"expandCityDevelIncreaseAmount": 1350,
|
"expandCityDevelIncreaseAmount": 1350,
|
||||||
"expandCityWallIncreaseAmount": 1600,
|
"expandCityWallIncreaseAmount": 1600,
|
||||||
"defaultMaxGeneral":300,
|
"defaultMaxGeneral":300,
|
||||||
"joinRuinedNPCProp":0
|
"joinRuinedNPCProp":0,
|
||||||
|
"npcBanMessageProb":1
|
||||||
},
|
},
|
||||||
"events":[
|
"events":[
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
"history": [
|
"history": [
|
||||||
"<C>●</>180년 1월:<L><b>【이벤트】</b></>병기로 싸운다! 최고의 충차 지휘관을 가린다"
|
"<C>●</>180년 1월:<L><b>【이벤트】</b></>병기로 싸운다! 최고의 충차 지휘관을 가린다"
|
||||||
],
|
],
|
||||||
|
"const": {
|
||||||
|
"npcBanMessageProb":1
|
||||||
|
},
|
||||||
"initialEvents":[
|
"initialEvents":[
|
||||||
[
|
[
|
||||||
true,
|
true,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
],
|
],
|
||||||
"const": {
|
"const": {
|
||||||
"expandCityDefaultCost": 30000,
|
"expandCityDefaultCost": 30000,
|
||||||
"expandCityCostCoef": 250
|
"expandCityCostCoef": 250,
|
||||||
|
"npcBanMessageProb":1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
],
|
],
|
||||||
"const": {
|
"const": {
|
||||||
"joinRuinedNPCProp":0,
|
"joinRuinedNPCProp":0,
|
||||||
|
"npcBanMessageProb":1,
|
||||||
"availableSpecialWar":[
|
"availableSpecialWar":[
|
||||||
"che_귀병", "che_신산", "che_환술", "che_집중", "che_신중", "che_반계",
|
"che_귀병", "che_신산", "che_환술", "che_집중", "che_신중", "che_반계",
|
||||||
"che_보병", "che_궁병", "che_기병", "che_공성",
|
"che_보병", "che_궁병", "che_기병", "che_공성",
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
"history": [
|
"history": [
|
||||||
"<C>●</>180년 1월:<L><b>【이벤트】</b></>29기까지 내로라 하는 모든 장수들이 모였다!"
|
"<C>●</>180년 1월:<L><b>【이벤트】</b></>29기까지 내로라 하는 모든 장수들이 모였다!"
|
||||||
],
|
],
|
||||||
|
"const": {
|
||||||
|
"npcBanMessageProb":1
|
||||||
|
},
|
||||||
"events": [
|
"events": [
|
||||||
[
|
[
|
||||||
"month", 1000,
|
"month", 1000,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
],
|
],
|
||||||
"const": {
|
"const": {
|
||||||
"joinRuinedNPCProp":0,
|
"joinRuinedNPCProp":0,
|
||||||
|
"npcBanMessageProb":1,
|
||||||
"availableGeneralCommand": {
|
"availableGeneralCommand": {
|
||||||
"": [
|
"": [
|
||||||
"휴식",
|
"휴식",
|
||||||
|
|||||||
Reference in New Issue
Block a user