유산 포인트 시스템, 추가 기수 대비 #187
@@ -48,8 +48,9 @@ class RaiseNPCNation extends \sammo\Event\Action
|
||||
}
|
||||
$citySum += $city[$key];
|
||||
}
|
||||
$city['sum'] = $citySum;
|
||||
|
||||
$targetCities[] = [$city, $citySum];
|
||||
$targetCities[] = $city;
|
||||
}
|
||||
|
||||
$cityCnt = count($targetCities);
|
||||
@@ -64,7 +65,7 @@ class RaiseNPCNation extends \sammo\Event\Action
|
||||
}
|
||||
|
||||
usort($targetCities, function (array $lhs, array $rhs) {
|
||||
return $lhs[1] <=> $rhs[1];
|
||||
return $lhs['sum'] <=> $rhs['sum'];
|
||||
});
|
||||
|
||||
|
||||
@@ -152,12 +153,12 @@ class RaiseNPCNation extends \sammo\Event\Action
|
||||
'trust' => 100
|
||||
];
|
||||
foreach (static::CITY_KEYS as $key) {
|
||||
$targetCity[$key] = min($targetCity["{$key}_max"], $avgCity[$key]);
|
||||
$targetCity[$key] = min($baseCity["{$key}_max"], $avgCity[$key]);
|
||||
}
|
||||
|
||||
$pickTypeList = ['무' => 1, '지' => 1];
|
||||
|
||||
$cityID = $baseCity['id'];
|
||||
$cityID = $baseCity['city'];
|
||||
$cityName = $baseCity['name'];
|
||||
$nationName = "ⓤ{$cityName}";
|
||||
|
||||
@@ -224,9 +225,8 @@ class RaiseNPCNation extends \sammo\Event\Action
|
||||
$avgGenCnt = $this->calcAvgNationGeneralCnt();
|
||||
|
||||
$serverID = UniqueConst::$serverID;
|
||||
$existNations = $db->queryFirstColumn("SELECT nation FROM `nation`");
|
||||
$lastNationID = max(
|
||||
max($existNations),
|
||||
$db->queryFirstField("SELECT max(`nation`) FROM `nation`"),
|
||||
$db->queryFirstField("SELECT max(`nation`) FROM `ng_old_nations` WHERE server_id = %s", $serverID),
|
||||
);
|
||||
|
||||
@@ -236,6 +236,8 @@ class RaiseNPCNation extends \sammo\Event\Action
|
||||
$occupiedCitiesID = array_keys($occupiedCities);
|
||||
$npcCitiesID = [];
|
||||
|
||||
refreshNationStaticInfo();
|
||||
|
||||
foreach ($emptyCities as $emptyCity) {
|
||||
$cityID = $emptyCity['city'];
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace sammo\Event\Condition;
|
||||
|
||||
use sammo\Event\Condition;
|
||||
|
||||
class Logic extends \sammo\Event\Condition{
|
||||
private $mode = 'and';
|
||||
|
||||
@@ -24,7 +26,9 @@ class Logic extends \sammo\Event\Condition{
|
||||
}
|
||||
|
||||
$this->mode = $mode;
|
||||
$this->conditions = $conditions;
|
||||
$this->conditions = array_map(function($condition){
|
||||
return Condition::build($condition);
|
||||
}, $conditions);
|
||||
}
|
||||
|
||||
public function eval($env=null){
|
||||
|
||||
@@ -3067,6 +3067,9 @@ class GeneralAI
|
||||
if($general->getVar('makelimit')){
|
||||
return null;
|
||||
}
|
||||
if($general->getNPCType() > 2){
|
||||
return null;
|
||||
}
|
||||
if(!$this->generalPolicy->can건국){
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,10 @@ class Nation{
|
||||
$capital = 0;
|
||||
}
|
||||
|
||||
if(strpos($this->type, '_') === FALSE){
|
||||
if($this->type === null){
|
||||
$type = Util::choiceRandom(GameConst::$availableNationType);
|
||||
}
|
||||
else if(strpos($this->type, '_') === FALSE){
|
||||
$type = 'che_'.$this->type;
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"events":[
|
||||
[
|
||||
["Date", "==", null, 12],
|
||||
["or", ["Date", "==", null, 12], ["Date", "==", null, 6]],
|
||||
["CreateManyNPC", 30],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"events":[
|
||||
[
|
||||
["Date", "==", null, 12],
|
||||
["or", ["Date", "==", null, 12], ["Date", "==", null, 6]],
|
||||
["CreateManyNPC", 30],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"events":[
|
||||
[
|
||||
["Date", "==", null, 12],
|
||||
["or", ["Date", "==", null, 12], ["Date", "==", null, 6]],
|
||||
["CreateManyNPC", 30],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user