버그 수정
This commit is contained in:
@@ -123,7 +123,7 @@ function pullNationCommand(int $nationID, int $level, int $turnCnt=1){
|
|||||||
'action'=>'휴식',
|
'action'=>'휴식',
|
||||||
'arg'=>'{}'
|
'arg'=>'{}'
|
||||||
], 'nation_id=%i AND level=%i AND turn_idx < %i', $nationID, $level, $turnCnt);
|
], 'nation_id=%i AND level=%i AND turn_idx < %i', $nationID, $level, $turnCnt);
|
||||||
$db->update('general_turn', [
|
$db->update('nation_turn', [
|
||||||
'turn_idx'=>$db->sqleval('turn_idx - %i', $turnCnt)
|
'turn_idx'=>$db->sqleval('turn_idx - %i', $turnCnt)
|
||||||
], 'nation_id=%i AND level=%i', $nationID, $level);
|
], 'nation_id=%i AND level=%i', $nationID, $level);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use \sammo\{
|
|||||||
GameConst,
|
GameConst,
|
||||||
LastTurn,
|
LastTurn,
|
||||||
GameUnitConst,
|
GameUnitConst,
|
||||||
|
CityConst,
|
||||||
Command
|
Command
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1735,6 +1735,7 @@ class GeneralAI{
|
|||||||
|
|
||||||
while(key_exists($candidate, $promoted)){
|
while(key_exists($candidate, $promoted)){
|
||||||
$iterCurrentType->next();
|
$iterCurrentType->next();
|
||||||
|
$candidate = $iterCurrentType->current();
|
||||||
}
|
}
|
||||||
|
|
||||||
$chiefCandidate[$cheifLevel] = $candidate;
|
$chiefCandidate[$cheifLevel] = $candidate;
|
||||||
@@ -1779,7 +1780,7 @@ class GeneralAI{
|
|||||||
$db->update('nation', [
|
$db->update('nation', [
|
||||||
'war'=>0,
|
'war'=>0,
|
||||||
'rate'=>$rate
|
'rate'=>$rate
|
||||||
]);
|
], 'nation=%i', $nationID);
|
||||||
return $rate;
|
return $rate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1806,7 +1807,7 @@ class GeneralAI{
|
|||||||
return $bill;
|
return $bill;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function caclRiceBillRate():int{
|
protected function calcRiceBillRate():int{
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$nation = $this->nation;
|
$nation = $this->nation;
|
||||||
$env = $this->env;
|
$env = $this->env;
|
||||||
|
|||||||
@@ -153,15 +153,15 @@ class Nation{
|
|||||||
foreach(range(getNationChiefLevel(0) - 1, getNationChiefLevel($this->nationLevel), -1) as $chiefLevel){
|
foreach(range(getNationChiefLevel(0) - 1, getNationChiefLevel($this->nationLevel), -1) as $chiefLevel){
|
||||||
foreach(range(0, GameConst::$maxChiefTurn - 1) as $turnIdx){
|
foreach(range(0, GameConst::$maxChiefTurn - 1) as $turnIdx){
|
||||||
$turnRows[] = [
|
$turnRows[] = [
|
||||||
'nation_id'=>$nation['nation'],
|
'nation_id'=>$this->id,
|
||||||
'level'=>$chiefLevel,
|
'level'=>$chiefLevel,
|
||||||
'turn_idx'=>$turnIdx,
|
'turn_idx'=>$turnIdx,
|
||||||
'action'=>'휴식',
|
'action'=>'휴식',
|
||||||
'arg'=>null,
|
'arg'=>'{}',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->insertIgnore('nation_turn', $turnRows);
|
$db->insert('nation_turn', $turnRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBrief(){
|
public function getBrief(){
|
||||||
|
|||||||
Reference in New Issue
Block a user