부대장 수를 많이 늘림
This commit is contained in:
+12
-11
@@ -1100,16 +1100,19 @@ function updateNationState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$maxTroopLeader = [
|
||||||
|
1=>0,
|
||||||
|
2=>2,
|
||||||
|
3=>4,
|
||||||
|
4=>6,
|
||||||
|
5=>8,
|
||||||
|
6=>10,
|
||||||
|
7=>12,
|
||||||
|
][$nationlevel]??0;
|
||||||
$lastAssemblerID = $gameStor->assembler_id??0;
|
$lastAssemblerID = $gameStor->assembler_id??0;
|
||||||
for($levelGen = max(1, $oldLevel) + 1; $levelGen <= $nationlevel; $levelGen+=1){
|
$currentTroopLeaderCnt = $db->queryFirstField('SELECT count(no) FROM general WHERE nation = %i AND npc = 5', $nation['nation']);
|
||||||
if(in_array($levelGen, [3, 5, 7])){
|
while($currentTroopLeaderCnt < $maxTroopLeader){
|
||||||
$genStep = 2;
|
$currentTroopLeaderCnt++;
|
||||||
}
|
|
||||||
else{
|
|
||||||
$genStep = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
while($genStep > 0){
|
|
||||||
$lastAssemblerID += 1;
|
$lastAssemblerID += 1;
|
||||||
$npcObj = new Scenario\NPC(
|
$npcObj = new Scenario\NPC(
|
||||||
999, sprintf('부대장%3d',$lastAssemblerID), null, $nation['nation'], null,
|
999, sprintf('부대장%3d',$lastAssemblerID), null, $nation['nation'], null,
|
||||||
@@ -1137,8 +1140,6 @@ function updateNationState() {
|
|||||||
'turn5'=>$command,
|
'turn5'=>$command,
|
||||||
'killturn'=>80
|
'killturn'=>80
|
||||||
], 'no=%i', $npcID);
|
], 'no=%i', $npcID);
|
||||||
$genStep -= 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$gameStor->assembler_id = $lastAssemblerID;
|
$gameStor->assembler_id = $lastAssemblerID;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user