forked from devsam/core
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1e6ac7b89 | ||
|
|
7b24f66f93 | ||
|
|
b2b2934ce9 | ||
|
|
6ed3e673df | ||
|
|
aa7dcab1fd | ||
|
|
e2e578e485 |
+3
-3
@@ -408,14 +408,14 @@ function checkSecretPermission(array $me, $checkSecretLimit = true)
|
||||
}
|
||||
|
||||
$secretMin = 0;
|
||||
$secretMax = checkSecretMaxPermission($me, $penalty);
|
||||
$secretMax = checkSecretMaxPermission($penalty);
|
||||
|
||||
|
||||
if ($me['officer_level'] == 12) {
|
||||
$secretMin = 4;
|
||||
} else if ($me['permission'] == 'ambassador') {
|
||||
} else if ($permission == 'ambassador') {
|
||||
$secretMin = 4;
|
||||
} else if ($me['permission'] == 'auditor') {
|
||||
} else if ($permission == 'auditor') {
|
||||
$secretMin = 3;
|
||||
} else if ($me['officer_level'] >= 5) {
|
||||
$secretMin = 2;
|
||||
|
||||
@@ -37,7 +37,14 @@ if(!$member){
|
||||
|
||||
$userNick = $member['name'];
|
||||
$memberPenalty = Json::decode($member['penalty'] ?? '{}');
|
||||
$penalty = array_merge($memberPenalty['any'] ?? [], $memberPenalty[DB::prefix()] ?? []);
|
||||
$penaltyInfo = array_merge($memberPenalty['any'] ?? [], $memberPenalty[DB::prefix()] ?? []);
|
||||
|
||||
$penalty = [];
|
||||
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
|
||||
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
|
||||
$penalty[$penaltyKey] = $penaltyValue['value'];
|
||||
}
|
||||
}
|
||||
|
||||
$pickResult = $db->queryFirstField('SELECT pick_result FROM select_npc_token WHERE `owner`=%i AND `valid_until`>=%s', $userID, $now);
|
||||
if(!$pickResult){
|
||||
|
||||
@@ -153,7 +153,14 @@ class Join extends \sammo\BaseAPI
|
||||
}
|
||||
|
||||
$memberPenalty = Json::decode($member['penalty'] ?? "{}");
|
||||
$penalty = array_merge($memberPenalty['any'] ?? [], $memberPenalty[DB::prefix()] ?? []);
|
||||
$penaltyInfo = array_merge($memberPenalty['any'] ?? [], $memberPenalty[DB::prefix()] ?? []);
|
||||
|
||||
$penalty = [];
|
||||
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
|
||||
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
|
||||
$penalty[$penaltyKey] = $penaltyValue['value'];
|
||||
}
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
@@ -9,7 +9,7 @@ class che_오두미도 extends \sammo\BaseNation{
|
||||
protected $name = '오두미도';
|
||||
protected $info = '';
|
||||
static $pros = '쌀수입↑ 인구↑';
|
||||
static $cons = '기술↓ 수성↓ 내정↓';
|
||||
static $cons = '기술↓ 수성↓ 농상↓';
|
||||
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
@@ -40,4 +40,4 @@ class che_오두미도 extends \sammo\BaseNation{
|
||||
return $amount;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ class che_유가 extends \sammo\BaseNation{
|
||||
|
||||
protected $name = '유가';
|
||||
protected $info = '';
|
||||
static $pros = '내정↑ 민심↑';
|
||||
static $pros = '농상↑ 민심↑';
|
||||
static $cons = '쌀수입↓';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
@@ -31,4 +31,4 @@ class che_유가 extends \sammo\BaseNation{
|
||||
|
||||
return $amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ class che_음양가 extends \sammo\BaseNation{
|
||||
|
||||
protected $name = '음양가';
|
||||
protected $info = '';
|
||||
static $pros = '내정↑ 인구↑';
|
||||
static $pros = '농상↑ 인구↑';
|
||||
static $cons = '기술↓ 전략↓';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
@@ -39,4 +39,4 @@ class che_음양가 extends \sammo\BaseNation{
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ class che_종횡가 extends \sammo\BaseNation{
|
||||
protected $name = '종횡가';
|
||||
protected $info = '';
|
||||
static $pros = '전략↑ 수성↑';
|
||||
static $cons = '금수입↓ 내정↓';
|
||||
static $cons = '금수입↓ 농상↓';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if($turnType == '수비' || $turnType == '성벽'){
|
||||
@@ -42,4 +42,4 @@ class che_종횡가 extends \sammo\BaseNation{
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,15 +67,13 @@ class RaiseInvader extends \sammo\Event\Action
|
||||
|
||||
foreach ($db->queryAllLists('SELECT capital, nation from nation WHERE capital in %li', $cities) as $row) {
|
||||
[$oldCapital, $nation] = $row;
|
||||
$capitalCandidates = $db->queryFirstColumn('SELECT city from city WHERE nation = %i AND city != %i', $nation, $oldCapital);
|
||||
$capitalCandidates = $db->queryFirstColumn('SELECT city from city WHERE nation = %i AND city != %i NOT IN %li', $nation, $oldCapital, $cities);
|
||||
if (!$capitalCandidates) {
|
||||
$disabledInvaderCity->add($oldCapital);
|
||||
continue;
|
||||
}
|
||||
|
||||
do {
|
||||
$newCapital = $rng->choice($capitalCandidates);
|
||||
} while(in_array($newCapital, $cities);
|
||||
$newCapital = $rng->choice($capitalCandidates);
|
||||
|
||||
$db->update('nation', ['capital' => $newCapital], 'nation=%i', $nation);
|
||||
$db->update('general', ['city' => $newCapital], 'nation=%i and city=%i', $nation, $oldCapital);
|
||||
|
||||
@@ -318,7 +318,6 @@ class GameConstBase
|
||||
'che_치안강화',
|
||||
'che_정착장려',
|
||||
'che_주민선정',
|
||||
'che_물자조달',
|
||||
],
|
||||
'군사' => [
|
||||
'che_징병',
|
||||
@@ -349,6 +348,7 @@ class GameConstBase
|
||||
'국가' => [
|
||||
'che_증여',
|
||||
'che_헌납',
|
||||
'che_물자조달',
|
||||
'che_하야',
|
||||
'che_거병',
|
||||
'che_건국',
|
||||
|
||||
Reference in New Issue
Block a user