멸망시 임관 확률을 변경 가능하도록 설정
This commit is contained in:
+7
-3
@@ -558,13 +558,17 @@ function ConquerCity(array $admin, General $general, array $city) {
|
||||
}
|
||||
}
|
||||
|
||||
//NPC인 경우 10% 확률로 임관(엔장, 인재, 의병)
|
||||
//NPC인 경우 일정 확률로 임관(엔장, 인재, 의병)
|
||||
$npcType = $oldGeneral->getNPCType();
|
||||
if($admin['join_mode'] != 'onlyRandom' && 2 <= $npcType && $npcType <= 8 && $npcType != 5 && Util::randBool(0.1)) {
|
||||
if($admin['join_mode'] != 'onlyRandom' && 2 <= $npcType && $npcType <= 8 && $npcType != 5 && Util::randBool(GameConst::$joinRuinedNPCProp)) {
|
||||
$cmd = buildGeneralCommandClass('che_임관', $oldGeneral, $admin, [
|
||||
'destNationID'=>$attackerNationID
|
||||
]);
|
||||
_setGeneralCommand($cmd, [0]);
|
||||
$joinTurn = Util::randRangeInt(0, 12);
|
||||
if($joinTurn){
|
||||
_setGeneralCommand(buildGeneralCommandClass('che_견문', $oldGeneral, $admin), iterator_to_array(Util::range($joinTurn)));
|
||||
}
|
||||
_setGeneralCommand($cmd, [$joinTurn]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,9 @@ class GameConstBase
|
||||
/** @var int 초기 시작 년도. 실제 값은 시나리오에서 정해지므로 딱히 의미는 없음. */
|
||||
public static $defaultStartYear = 180;
|
||||
|
||||
/** @var float 멸망한 NPC 장수의 임관 확률 */
|
||||
public static $joinRuinedNPCProp = 0.1;
|
||||
|
||||
/** @var int 시작시 금 */
|
||||
public static $defaultGold = 1000;
|
||||
/** @var int 시작시 쌀 */
|
||||
|
||||
@@ -2,5 +2,8 @@
|
||||
"title":"【공백지】 일반",
|
||||
"startYear":180,
|
||||
"history":[
|
||||
]
|
||||
],
|
||||
"const": {
|
||||
"joinRuinedNPCProp":0
|
||||
}
|
||||
}
|
||||
@@ -5,5 +5,8 @@
|
||||
"mapName":"miniche"
|
||||
},
|
||||
"history":[
|
||||
]
|
||||
],
|
||||
"const": {
|
||||
"joinRuinedNPCProp":0
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
"expandCityPopIncreaseAmount": 80000,
|
||||
"expandCityDevelIncreaseAmount": 1350,
|
||||
"expandCityWallIncreaseAmount": 1600,
|
||||
"defaultMaxGeneral":300
|
||||
"defaultMaxGeneral":300,
|
||||
"joinRuinedNPCProp":0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user