멸망시 임관 확률을 변경 가능하도록 설정

This commit is contained in:
2020-05-30 03:18:23 +09:00
parent 4e962bba09
commit 0867a234c2
5 changed files with 20 additions and 6 deletions
+7 -3
View File
@@ -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]);
}
}