포상 조건 재 수정. 무지장이라도 금쌀이 너무 적으면 주긴 함
This commit is contained in:
+8
-5
@@ -261,6 +261,7 @@ function processAI($no) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tech = getTechCost($nation['tech']);
|
$tech = getTechCost($nation['tech']);
|
||||||
|
$resrc = $tech * 700;//XXX: 왜 700이지?
|
||||||
|
|
||||||
if($general['atmos'] >= 90 && $general['train'] >= 90) {
|
if($general['atmos'] >= 90 && $general['train'] >= 90) {
|
||||||
if($general['mode'] == 0) {
|
if($general['mode'] == 0) {
|
||||||
@@ -626,12 +627,13 @@ function processAI($no) {
|
|||||||
}
|
}
|
||||||
} else { // 포상
|
} else { // 포상
|
||||||
// 포상 대상
|
// 포상 대상
|
||||||
list($npcGenID, $npcGenValue) = $db->queryFirstList(
|
list($npcGenID, $npcGenValue, $npcLeadership) = $db->queryFirstList(
|
||||||
'SELECT `no`, %b FROM general WHERE nation=%i AND `no`!=%i AND npc >= 2 AND killturn > 5 AND leader >= 40 ORDER BY %b ASC LIMIT 1',
|
'SELECT `no`, %b, leader FROM general WHERE nation=%i AND `no`!=%i AND npc >= 2 AND killturn > 5 AND (leader >= 40 OR %b < %i) ORDER BY %b ASC LIMIT 1',
|
||||||
$type,
|
$type,
|
||||||
$general['nation'],
|
$general['nation'],
|
||||||
$general['no'],
|
$general['no'],
|
||||||
$type,
|
$type,
|
||||||
|
$resrc,
|
||||||
$type
|
$type
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -640,7 +642,6 @@ function processAI($no) {
|
|||||||
$type,
|
$type,
|
||||||
$general['nation'],
|
$general['nation'],
|
||||||
$general['no'],
|
$general['no'],
|
||||||
$type,
|
|
||||||
$type
|
$type
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -657,6 +658,10 @@ function processAI($no) {
|
|||||||
if ($genID) {
|
if ($genID) {
|
||||||
if($genID === $npcGenID){
|
if($genID === $npcGenID){
|
||||||
$amount = min(100, intdiv(($nation[$type]-GameConst::$baserice), 5000)*10 + 10);
|
$amount = min(100, intdiv(($nation[$type]-GameConst::$baserice), 5000)*10 + 10);
|
||||||
|
if($npcLeadership < 40){
|
||||||
|
$amount = min($amount, intdiv($resrc, 1000)*10 + 10);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$amount = min(100, intdiv(($nation[$type]-GameConst::$baserice), 2000)*10 + 10);
|
$amount = min(100, intdiv(($nation[$type]-GameConst::$baserice), 2000)*10 + 10);
|
||||||
@@ -710,8 +715,6 @@ function processAI($no) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$resrc = $tech * 700;//XXX: 왜 700이지?
|
|
||||||
|
|
||||||
if($general['leader'] < 40){
|
if($general['leader'] < 40){
|
||||||
//무지장인데
|
//무지장인데
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user