forked from devsam/core
관직 임명 보정
This commit is contained in:
@@ -99,7 +99,7 @@ foreach ($nations as $nation) {
|
||||
<td width=80 align=center id=bg1>국 력</td>
|
||||
<td width=170 align=center>{$nation['power']}</td>
|
||||
<td width=80 align=center id=bg1>장수 / 속령</td>
|
||||
<td width=170 align=center>".count($generals)." / ".count($nation['cities'])."</td>
|
||||
<td width=170 align=center>".count($generals??[])." / ".count($nation['cities']??[])."</td>
|
||||
";
|
||||
for($chiefLevel = 12; $chiefLevel >= 5; $chiefLevel--){
|
||||
if($chiefLevel % 4 == 0){
|
||||
|
||||
+30
-12
@@ -3048,19 +3048,21 @@ class GeneralAI
|
||||
$this->categorizeNationCities();
|
||||
|
||||
$month = $this->env['month'];
|
||||
if($npcType >= 2 && $general->getVar('officer_level') == 12){
|
||||
if (in_array($month, [1, 4, 7, 10])) {
|
||||
$this->choosePromotion();
|
||||
} else if ($month == 12) {
|
||||
$this->chooseTexRate();
|
||||
$this->chooseGoldBillRate();
|
||||
} else if ($month == 6) {
|
||||
$this->chooseTexRate();
|
||||
$this->chooseRiceBillRate();
|
||||
if($npcType >= 2){
|
||||
if($general->getVar('officer_level') == 12){
|
||||
if (in_array($month, [1, 4, 7, 10])) {
|
||||
$this->choosePromotion();
|
||||
} else if ($month == 12) {
|
||||
$this->chooseTexRate();
|
||||
$this->chooseGoldBillRate();
|
||||
} else if ($month == 6) {
|
||||
$this->chooseTexRate();
|
||||
$this->chooseRiceBillRate();
|
||||
}
|
||||
}
|
||||
else if(in_array($month, [3, 6, 9, 12])){
|
||||
$this->chooseNonLordPromotion();
|
||||
}
|
||||
}
|
||||
else if(in_array($month, [3, 6, 9, 12])){
|
||||
$this->chooseNonLordPromotion();
|
||||
}
|
||||
|
||||
if(!($reservedCommand instanceof Command\Nation\휴식) && $reservedCommand->isRunnable()){
|
||||
@@ -3383,6 +3385,7 @@ class GeneralAI
|
||||
$general->setVar('officer_city', 0);
|
||||
$nation['l11set'] = true;
|
||||
$updatedNationVar['l11set'] = 1;
|
||||
$userChiefCnt += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3408,6 +3411,13 @@ class GeneralAI
|
||||
if($this->general->getVar('officer_level') === $chiefLevel){
|
||||
continue;
|
||||
}
|
||||
|
||||
if(key_exists($chiefLevel, $this->chiefGenerals)){
|
||||
$oldChief = $this->chiefGenerals[$chiefLevel];
|
||||
if($oldChief->getVar('npc') < 2 && $oldChief->getVar('killturn') >= $minChiefLevel){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!key_exists($chiefLevel, $this->chiefGenerals) && !key_exists($chiefLevel, $nextChiefs)){
|
||||
$newChiefProb = 1;
|
||||
@@ -3442,6 +3452,10 @@ class GeneralAI
|
||||
continue;
|
||||
}
|
||||
|
||||
if($general->getVar('npc') < 2 && $userChiefCnt >= 3){
|
||||
continue;
|
||||
}
|
||||
|
||||
$newChief = $general;
|
||||
break;
|
||||
}
|
||||
@@ -3450,6 +3464,10 @@ class GeneralAI
|
||||
continue;
|
||||
}
|
||||
|
||||
if($newChief->getVar('npc') < 2){
|
||||
$userChiefCnt += 1;
|
||||
}
|
||||
|
||||
$nextChiefs[$chiefLevel] = $newChief;
|
||||
$newChief->setVar('officer_level', $chiefLevel);
|
||||
$newChief->setVar('officer_city', 0);
|
||||
|
||||
Reference in New Issue
Block a user