병종 가격 계산 버그, 접경 계산 버그, 긴급 천도 버그 수정

This commit is contained in:
2018-04-10 21:11:56 +09:00
parent 1412834b60
commit 9831685bb9
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -398,7 +398,8 @@ function getBill(int $dedication) : int{
function getCost(int $armtype) : int {
//FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함.
//TODO: 병종 값이 column으로 들어있는건 전혀 옳지 않음. key->value 형태로 바꿔야함
return DB::db()->queryFirstColumn('select %b from game limit 1', sprintf('cst%d', $armtype));
return GameUnitConst::byID($armtype)->cost;
}
function TechLimit($startyear, $year, $tech) : int {
+1 -1
View File
@@ -237,7 +237,7 @@ function SetNationFront($nationNo) {
if($adj){
$db->update('city', [
'front'=>0
'front'=>1
], 'nation=%i and city in %li', $nationNo, array_keys($adj));
}
}
+1 -1
View File
@@ -1862,7 +1862,7 @@ function ConquerCity($game, $general, $city, $nation, $destnation) {
$cities = [];
foreach(
DB::db()->query(
'SELECT city, pop FROM city WHERE nation=%i and city!=%i',
'SELECT nation, city, pop FROM city WHERE nation=%i and city!=%i',
$destnation['nation'],
$city['city']
) as $row