버그 수정
This commit is contained in:
@@ -40,7 +40,7 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
|
|||||||
><div class='chiefTurnIdxPanel'
|
><div class='chiefTurnIdxPanel'
|
||||||
><div class='bg1 chiefTurnIdx'>.</div
|
><div class='bg1 chiefTurnIdx'>.</div
|
||||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
||||||
><div class='bg0 chiefTurnIdx'><?=$idx?></div
|
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
></div
|
></div
|
||||||
<?php foreach([12, 10, 8, 6] as $chiefIdx): ?>
|
<?php foreach([12, 10, 8, 6] as $chiefIdx): ?>
|
||||||
@@ -57,7 +57,7 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
|
|||||||
><div class='chiefTurnIdxPanel tail'
|
><div class='chiefTurnIdxPanel tail'
|
||||||
><div class='bg1 chiefTurnIdx'>.</div
|
><div class='bg1 chiefTurnIdx'>.</div
|
||||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
||||||
><div class='bg0 chiefTurnIdx'><?=$idx?></div
|
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
></div
|
></div
|
||||||
></div
|
></div
|
||||||
@@ -80,7 +80,7 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
|
|||||||
><div class='chiefTurnIdxPanel'
|
><div class='chiefTurnIdxPanel'
|
||||||
><div class='bg1 chiefTurnIdx'>.</div
|
><div class='bg1 chiefTurnIdx'>.</div
|
||||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
||||||
><div class='bg0 chiefTurnIdx'><?=$idx?></div
|
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
></div
|
></div
|
||||||
<?php foreach([11, 9, 7, 5] as $chiefIdx): ?>
|
<?php foreach([11, 9, 7, 5] as $chiefIdx): ?>
|
||||||
@@ -97,7 +97,7 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
|
|||||||
><div class='chiefTurnIdxPanel tail'
|
><div class='chiefTurnIdxPanel tail'
|
||||||
><div class='bg1 chiefTurnIdx'>.</div
|
><div class='bg1 chiefTurnIdx'>.</div
|
||||||
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
|
||||||
><div class='bg0 chiefTurnIdx'><?=$idx?></div
|
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
></div
|
></div
|
||||||
></div
|
></div
|
||||||
|
|||||||
@@ -184,10 +184,10 @@ class AutorunNationPolicy {
|
|||||||
$reqGold = $defaultCrewType->costWithTech($nation['tech'], GameConst::$defaultStatMax * 100);
|
$reqGold = $defaultCrewType->costWithTech($nation['tech'], GameConst::$defaultStatMax * 100);
|
||||||
$reqRice = $defaultCrewType->riceWithTech($nation['tech'], GameConst::$defaultStatMax * 100);
|
$reqRice = $defaultCrewType->riceWithTech($nation['tech'], GameConst::$defaultStatMax * 100);
|
||||||
if($this->reqHumanWarUrgentGold === 0){
|
if($this->reqHumanWarUrgentGold === 0){
|
||||||
$this->reqHumanWarUrgentGold = Util::round(max(10000, $reqGold * 4 * 2), -2);
|
$this->reqHumanWarUrgentGold = Util::round(max(10000, $reqGold * 3 * 2), -2);
|
||||||
}
|
}
|
||||||
if($this->reqHumanWarUrgentRice === 0){
|
if($this->reqHumanWarUrgentRice === 0){
|
||||||
$this->reqHumanWarUrgentRice = Util::round(max(10000, $reqRice * 4 * 2), -2);
|
$this->reqHumanWarUrgentRice = Util::round(max(10000, $reqRice * 3 * 2), -2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class che_거병 extends Command\GeneralCommand{
|
|||||||
|
|
||||||
$this->runnableConstraints=[
|
$this->runnableConstraints=[
|
||||||
ConstraintHelper::BeNeutral(),
|
ConstraintHelper::BeNeutral(),
|
||||||
ConstraintHelper::BeOpeningPart($relYear),
|
ConstraintHelper::BeOpeningPart($relYear+1),
|
||||||
ConstraintHelper::AllowJoinAction(),
|
ConstraintHelper::AllowJoinAction(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -87,6 +87,8 @@ class che_거병 extends Command\GeneralCommand{
|
|||||||
$nationName = '㉥'.$nationName;
|
$nationName = '㉥'.$nationName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$secretlimit = 3;
|
||||||
|
|
||||||
DB::db()->insert('nation', [
|
DB::db()->insert('nation', [
|
||||||
'name'=>$nationName,
|
'name'=>$nationName,
|
||||||
'color'=>'#330000',
|
'color'=>'#330000',
|
||||||
@@ -96,6 +98,7 @@ class che_거병 extends Command\GeneralCommand{
|
|||||||
'bill'=>100,
|
'bill'=>100,
|
||||||
'strategic_cmd_limit'=>12,
|
'strategic_cmd_limit'=>12,
|
||||||
'surlimit'=>72,
|
'surlimit'=>72,
|
||||||
|
'secretlimit'=>$secretlimit,
|
||||||
'type'=>GameConst::$neutralNationType,
|
'type'=>GameConst::$neutralNationType,
|
||||||
'gennum'=>1
|
'gennum'=>1
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class che_건국 extends Command\GeneralCommand{
|
|||||||
ConstraintHelper::BeLord(),
|
ConstraintHelper::BeLord(),
|
||||||
ConstraintHelper::WanderingNation(),
|
ConstraintHelper::WanderingNation(),
|
||||||
ConstraintHelper::ReqNationValue('gennum', '수하 장수', '>=', 2),
|
ConstraintHelper::ReqNationValue('gennum', '수하 장수', '>=', 2),
|
||||||
ConstraintHelper::BeOpeningPart($relYear),
|
ConstraintHelper::BeOpeningPart($relYear+1),
|
||||||
ConstraintHelper::CheckNationNameDuplicate($nationName),
|
ConstraintHelper::CheckNationNameDuplicate($nationName),
|
||||||
ConstraintHelper::AllowJoinAction(),
|
ConstraintHelper::AllowJoinAction(),
|
||||||
ConstraintHelper::ConstructableCity(),
|
ConstraintHelper::ConstructableCity(),
|
||||||
|
|||||||
+79
-138
@@ -184,7 +184,7 @@ class GeneralAI
|
|||||||
|
|
||||||
$frontStatus = $db->queryFirstField('SELECT max(front) FROM city WHERE nation=%i AND supply=1', $nationID);
|
$frontStatus = $db->queryFirstField('SELECT max(front) FROM city WHERE nation=%i AND supply=1', $nationID);
|
||||||
// 공격가능도시 있으면
|
// 공격가능도시 있으면
|
||||||
$this->attackable = ($frontStatus !== null) ? $frontStatus : false;
|
$this->attackable = !!$frontStatus;
|
||||||
|
|
||||||
$warTarget = $db->queryAllLists(
|
$warTarget = $db->queryAllLists(
|
||||||
'SELECT you, state FROM diplomacy WHERE me = %i AND (state = 0 OR (state = 1 AND term < 5))',
|
'SELECT you, state FROM diplomacy WHERE me = %i AND (state = 0 OR (state = 1 AND term < 5))',
|
||||||
@@ -1570,7 +1570,7 @@ class GeneralAI
|
|||||||
foreach($this->userWarGenerals as $general){
|
foreach($this->userWarGenerals as $general){
|
||||||
$avgGold += $general->getVar('gold');
|
$avgGold += $general->getVar('gold');
|
||||||
$avgRice += $general->getVar('rice');
|
$avgRice += $general->getVar('rice');
|
||||||
$genCnt += 1;
|
$genCnt += 2;
|
||||||
}
|
}
|
||||||
$avgGold += $nation['gold'];
|
$avgGold += $nation['gold'];
|
||||||
$avgRice += $nation['rice'];
|
$avgRice += $nation['rice'];
|
||||||
@@ -2713,7 +2713,7 @@ class GeneralAI
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Util::randBool(1 - 0.014)){
|
if(!Util::randBool(0.014)){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3042,12 +3042,13 @@ class GeneralAI
|
|||||||
//TODO: NationTurn과 InstantNationTurn 구분 필요
|
//TODO: NationTurn과 InstantNationTurn 구분 필요
|
||||||
$lastTurn = $reservedCommand->getLastTurn();
|
$lastTurn = $reservedCommand->getLastTurn();
|
||||||
$general = $this->general;
|
$general = $this->general;
|
||||||
|
$npcType = $general->getVar('npc');
|
||||||
|
|
||||||
$this->categorizeNationGeneral();
|
$this->categorizeNationGeneral();
|
||||||
$this->categorizeNationCities();
|
$this->categorizeNationCities();
|
||||||
|
|
||||||
$month = $this->env['month'];
|
$month = $this->env['month'];
|
||||||
if($general->getVar('officer_level') == 12){
|
if($npcType >= 2 && $general->getVar('officer_level') == 12){
|
||||||
if (in_array($month, [1, 4, 7, 10])) {
|
if (in_array($month, [1, 4, 7, 10])) {
|
||||||
$this->choosePromotion();
|
$this->choosePromotion();
|
||||||
} else if ($month == 12) {
|
} else if ($month == 12) {
|
||||||
@@ -3067,13 +3068,14 @@ class GeneralAI
|
|||||||
return $reservedCommand;
|
return $reservedCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach($this->nationPolicy->priority as $actionName){
|
foreach($this->nationPolicy->priority as $actionName){
|
||||||
|
|
||||||
if(property_exists($this->nationPolicy, 'can'.$actionName) && !$this->nationPolicy->{'can'.$actionName}){
|
if(property_exists($this->nationPolicy, 'can'.$actionName) && !$this->nationPolicy->{'can'.$actionName}){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if($npcType < 2 && !($this->nationPolicy::$availableInstantTurn[$actionName]??false)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/** @var ?NationCommand */
|
/** @var ?NationCommand */
|
||||||
$result = $this->{'do'.$actionName}($lastTurn);
|
$result = $this->{'do'.$actionName}($lastTurn);
|
||||||
if($result !== null){
|
if($result !== null){
|
||||||
@@ -3326,7 +3328,7 @@ class GeneralAI
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function newChoosePromotion(){
|
protected function choosePromotion(){
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|
||||||
$nation = $this->nation;
|
$nation = $this->nation;
|
||||||
@@ -3335,7 +3337,7 @@ class GeneralAI
|
|||||||
|
|
||||||
$userChiefCnt = 0;
|
$userChiefCnt = 0;
|
||||||
|
|
||||||
$minUserKillturn = $this->env['killturn'] - Util::toInt(180 / $this->env['turnterm']);
|
$minUserKillturn = $this->env['killturn'] - Util::toInt(240 / $this->env['turnterm']);
|
||||||
$minNPCKillturn = 36;
|
$minNPCKillturn = 36;
|
||||||
|
|
||||||
foreach(Util::range($minChiefLevel, 12) as $chiefLevel){
|
foreach(Util::range($minChiefLevel, 12) as $chiefLevel){
|
||||||
@@ -3352,8 +3354,8 @@ class GeneralAI
|
|||||||
|
|
||||||
$minBelong = min($this->general->getVar('belong') - 1, 3);
|
$minBelong = min($this->general->getVar('belong') - 1, 3);
|
||||||
|
|
||||||
|
/** @var General[] */
|
||||||
$nextChiefs = [];
|
$nextChiefs = [];
|
||||||
$oldChiefs = [];
|
|
||||||
|
|
||||||
if($userChiefCnt == 0 && $this->userGenerals && !$nation['l11set']){
|
if($userChiefCnt == 0 && $this->userGenerals && !$nation['l11set']){
|
||||||
$userGenerals = $this->userGenerals;
|
$userGenerals = $this->userGenerals;
|
||||||
@@ -3383,152 +3385,91 @@ class GeneralAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$generals = $this->userWarGenerals + $this->npcWarGenerals;
|
$generals = $this->userGenerals;
|
||||||
uasort($generals, function(General $lhs, General $rhs){
|
uasort($generals, function(General $lhs, General $rhs){
|
||||||
return -($lhs->getVar('leadership')<=>$rhs->getVar('leadership'));
|
$lhsStat = $lhs->getLeadership(false, false, false, false) * 2
|
||||||
|
+ $lhs->getStrength(false, false, false, false)
|
||||||
|
+ $lhs->getIntel(false, false, false, false);
|
||||||
|
$rhsStat = $rhs->getLeadership(false, false, false, false) * 2
|
||||||
|
+ $rhs->getStrength(false, false, false, false)
|
||||||
|
+ $rhs->getIntel(false, false, false, false);
|
||||||
|
return -($lhsStat <=> $rhsStat);
|
||||||
});
|
});
|
||||||
|
|
||||||
$strengthSort = $generals;
|
|
||||||
uasort($strengthSort, function(General $lhs, General $rhs){
|
|
||||||
return -($lhs->getVar('strength')<=>$rhs->getVar('strength'));
|
|
||||||
});
|
|
||||||
$intelSort = $generals;
|
|
||||||
uasort($intelSort, function(General $lhs, General $rhs){
|
|
||||||
return -($lhs->getVar('intel')<=>$rhs->getVar('intel'));
|
|
||||||
});
|
|
||||||
|
|
||||||
if(!$nation['l11set']){
|
$updatedNationVar = [];
|
||||||
$new11 = false;
|
foreach(Util::range(11, $minChiefLevel-1, -1) as $chiefLevel) {
|
||||||
if(!key_exists(11, $this->chiefGenerals) && !key_exists(11, $nextChiefs)){
|
$nationKey = "l{$chiefLevel}set";
|
||||||
$new11 = true;
|
if($nation[$nationKey]){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!key_exists($chiefLevel, $this->chiefGenerals) && !key_exists($chiefLevel, $nextChiefs)){
|
||||||
|
$newChiefProb = 1;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$new11 = Util::randF(0.2);
|
$newChiefProb = Util::randF(0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($newChiefProb < 1 && !Util::randF($newChiefProb)){
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$newChief = null;
|
||||||
}
|
foreach($generals as $general){
|
||||||
|
if($general->getVar('officer_level') !== 1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if($general->getVar('npc') < 2 && $general->getVar('killturn') < $minUserKillturn){
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
protected function choosePromotion()
|
if($general->getVar('npc') >= 2 && $general->getVar('killturn') < $minNPCKillturn){
|
||||||
{
|
|
||||||
$db = DB::db();
|
|
||||||
|
|
||||||
$nation = $this->nation;
|
|
||||||
$nationID = $nation['nation'];
|
|
||||||
$minChiefLevel = getNationChiefLevel($nation['level']);
|
|
||||||
|
|
||||||
$minKillturn = $this->env['killturn'] - Util::toInt(180 / $this->env['turnterm']);
|
|
||||||
$chiefCandidate = [];
|
|
||||||
|
|
||||||
//이 함수를 부르는건 군주 AI이므로, 군주는 세지 않아도 됨
|
|
||||||
$userChief = [];
|
|
||||||
|
|
||||||
$db->update('general', [
|
|
||||||
'permission' => 'ambassador',
|
|
||||||
], 'nation=%i AND npc < 2 AND officer_level > 4', $nationID);
|
|
||||||
|
|
||||||
foreach($db->query(
|
|
||||||
'SELECT no, npc, officer_level, killturn FROM general WHERE nation = %i AND 12 > officer_level AND officer_level > 4',
|
|
||||||
$nationID
|
|
||||||
) as $chief) {
|
|
||||||
|
|
||||||
if ($chief['npc'] < 2 && $chief['killturn'] < $minKillturn) {
|
|
||||||
$chiefCandidate[$chief['officer_level']] = $chief['no'];
|
|
||||||
$userChief[$chief['no']] = $chief['officer_level'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->update('general', [
|
|
||||||
'officer_level' => 1
|
|
||||||
], 'officer_level < 12 AND officer_level > 4 AND nation = %i', $nationID);
|
|
||||||
|
|
||||||
$maxBelong = $db->queryFirstField('SELECT max(belong) FROM `general` WHERE nation=%i', $nationID);
|
|
||||||
$maxBelong = min($maxBelong - 1, 3);
|
|
||||||
|
|
||||||
if (!$userChief) {
|
|
||||||
$candUserChief = $db->queryFirstField(
|
|
||||||
'SELECT no FROM general WHERE nation = %i AND officer_level = 1 AND killturn > %i AND npc <= 2 AND belong >= %i ORDER BY leadership DESC LIMIT 1',
|
|
||||||
$nationID,
|
|
||||||
$minKillturn,
|
|
||||||
$maxBelong
|
|
||||||
);
|
|
||||||
if ($candUserChief) {
|
|
||||||
$userChief[$candUserChief] = 11;
|
|
||||||
$chiefCandidate[11] = $candUserChief;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$promoted = $userChief;
|
|
||||||
|
|
||||||
if (!key_exists(11, $chiefCandidate)) {
|
|
||||||
$candChiefHead = $db->queryFirstField(
|
|
||||||
'SELECT no FROM general WHERE nation = %i AND officer_level = 1 AND npc > 2 AND belong >= %i ORDER BY leadership DESC LIMIT 1',
|
|
||||||
$nationID,
|
|
||||||
$maxBelong
|
|
||||||
);
|
|
||||||
if ($candChiefHead) {
|
|
||||||
$chiefCandidate[11] = $candChiefHead;
|
|
||||||
$promoted[$candChiefHead] = 11;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($minChiefLevel < 11) {
|
|
||||||
//무장 수뇌 후보
|
|
||||||
$candChiefStrength = $db->queryFirstColumn(
|
|
||||||
'SELECT no FROM general WHERE nation = %i AND strength >= %i AND officer_level = 1 AND belong >= %i ORDER BY strength DESC LIMIT %i',
|
|
||||||
$nationID,
|
|
||||||
GameConst::$chiefStatMin,
|
|
||||||
$maxBelong,
|
|
||||||
12 - $minChiefLevel
|
|
||||||
);
|
|
||||||
//지장 수뇌 후보
|
|
||||||
$candChiefIntel = $db->queryFirstColumn(
|
|
||||||
'SELECT no FROM general WHERE nation = %i AND intel >= %i AND officer_level = 1 AND belong >= %i ORDER BY intel DESC LIMIT %i',
|
|
||||||
$nationID,
|
|
||||||
GameConst::$chiefStatMin,
|
|
||||||
$maxBelong,
|
|
||||||
12 - $minChiefLevel
|
|
||||||
);
|
|
||||||
//무력, 지력이 모두 높은 장수를 고려하여..
|
|
||||||
|
|
||||||
$iterCandChiefStrength = new \ArrayIterator($candChiefStrength);
|
|
||||||
$iterCandChiefIntel = new \ArrayIterator($candChiefIntel);
|
|
||||||
|
|
||||||
foreach (Util::range(10, $minChiefLevel-1, -1) as $chiefLevel) {
|
|
||||||
if (key_exists($chiefLevel, $chiefCandidate)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var \ArrayIterator $iterCurrentType */
|
if($chiefLevel == 11){
|
||||||
$iterCurrentType = ($chiefLevel % 2 == 0) ? $iterCandChiefStrength : $iterCandChiefIntel;
|
}
|
||||||
$candidate = $iterCurrentType->current();
|
else if($chiefLevel % 2 == 0 && $general->getStrength(false, false, false, false) < GameConst::$chiefStatMin){
|
||||||
|
continue;
|
||||||
while (key_exists($candidate, $promoted)) {
|
}
|
||||||
$iterCurrentType->next();
|
else if($chiefLevel % 2 == 1 && $general->getIntel(false, false, false, false) < GameConst::$chiefStatMin){
|
||||||
if (!$iterCurrentType->valid()) {
|
continue;
|
||||||
break;
|
|
||||||
}
|
|
||||||
$candidate = $iterCurrentType->current();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($candidate) {
|
$newChief = $general;
|
||||||
$chiefCandidate[$chiefLevel] = $candidate;
|
break;
|
||||||
$promoted[$candidate] = $chiefLevel;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($chiefCandidate as $chiefLevel => $chiefID) {
|
if(!$newChief){
|
||||||
$db->update('general', [
|
continue;
|
||||||
'officer_level' => $chiefLevel,
|
|
||||||
'officer_city' => 0,
|
|
||||||
], 'no=%i', $chiefID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$nextChiefs[$chiefLevel] = $newChief;
|
||||||
|
if(key_exists($chiefLevel,$this->chiefGenerals)){
|
||||||
|
$oldChief = $this->chiefGenerals[$chiefLevel];
|
||||||
|
$oldChief->setVar('officer_level', 1);
|
||||||
|
$oldChief->setVar('officer_city', 0);
|
||||||
|
}
|
||||||
|
$newChief->setVar('officer_level', $chiefLevel);
|
||||||
|
$newChief->setVar('officer_city', 0);
|
||||||
|
$nation[$nationKey] = true;
|
||||||
|
$updatedNationVar[$nationKey] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach($this->chiefGenerals as $oldChief){
|
||||||
|
if($oldChief->getVar('officer_level') > 4){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$oldChief->applyDB($db);
|
||||||
|
}
|
||||||
|
foreach($nextChiefs as $chiefLevel=>$chief){
|
||||||
|
$chief->applyDB($db);
|
||||||
|
$this->chiefGenerals[$chiefLevel] = $chief;
|
||||||
|
}
|
||||||
|
if($updatedNationVar){
|
||||||
|
$db->update('nation', $updatedNationVar, 'nation=%i', $nationID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user