diff --git a/hwe/_admin_force_rehall.php b/hwe/_admin_force_rehall.php
index e44e7802..01bb8694 100644
--- a/hwe/_admin_force_rehall.php
+++ b/hwe/_admin_force_rehall.php
@@ -19,8 +19,8 @@ if (!$gameStor->isunited) {
}
foreach ($db->queryFirstColumn(
- 'SELECT no FROM general WHERE npc != 0 and age >= %i',
- GameConst::$retirementYear
+ 'SELECT no FROM general WHERE npc < 2 and age >= %i',
+ 40
) as $generalNo) {
CheckHall($generalNo);
}
diff --git a/hwe/a_hallOfFame.php b/hwe/a_hallOfFame.php
index 2afeda5b..ef92305a 100644
--- a/hwe/a_hallOfFame.php
+++ b/hwe/a_hallOfFame.php
@@ -84,27 +84,27 @@ else{
['명 성', 'int'],
+ 'dedication'=>['계 급', 'int'],
+ 'firenum'=>['계 략 성 공', 'int'],
+ 'warnum'=>['전 투 횟 수', 'int'],
+ 'killnum'=>['승 리', 'int'],
+ 'winrate'=>['승 률', 'percent'],
+ 'killcrew'=>['사 살', 'int'],
+ 'killrate'=>['살 상 률', 'percent'],
+ 'dex1'=>['보 병 숙 련 도', 'int'],
+ 'dex2'=>['궁 병 숙 련 도', 'int'],
+ 'dex3'=>['기 병 숙 련 도', 'int'],
+ 'dex4'=>['귀 병 숙 련 도', 'int'],
+ 'dex5'=>['차 병 숙 련 도', 'int'],
+ 'ttrate'=>['전 력 전 승 률', 'percent'],
+ 'tlrate'=>['통 솔 전 승 률', 'percent'],
+ 'tsrate'=>['일 기 토 승 률', 'percent'],
+ 'tirate'=>['설 전 승 률', 'percent'],
+ 'betgold'=>['베 팅 투 자 액', 'int'],
+ 'betwin'=>['베 팅 당 첨', 'int'],
+ 'betwingold'=>['베 팅 수 익 금', 'int'],
+ 'betrate'=>['베 팅 수 익 률', 'percent'],
];
$templates = new \League\Plates\Engine('templates');
@@ -114,8 +114,8 @@ foreach(RootDB::db()->queryAllLists('SELECT no, name FROM member') as [$ownerID,
$ownerNameList[$ownerID] = $ownerName;
}
-foreach($types as $idx=>[$typeName, $typeValue]) {
- $hallResult = $db->query('SELECT * FROM ng_hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $idx, $searchFilter);
+foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
+ $hallResult = $db->query('SELECT * FROM hall WHERE `type`=%i AND %? ORDER BY `value` DESC LIMIT 10', $typeName, $searchFilter);
$hallResult = array_map(function($general)use($typeValue, $ownerNameList){
$aux = Json::decode($general['aux']);
@@ -160,7 +160,7 @@ foreach($types as $idx=>[$typeName, $typeValue]) {
}, $hallResult);
echo $templates->render('hallOfFrame', [
- 'typeName'=>$typeName,
+ 'typeName'=>$typeDescribe,
'generals'=>$hallResult
]);
}
diff --git a/hwe/func.php b/hwe/func.php
index 0850103c..66d7c9af 100644
--- a/hwe/func.php
+++ b/hwe/func.php
@@ -1361,7 +1361,7 @@ function CheckHall($no)
["betwin", 'rank'],
["betwingold", 'rank'],
["betrate", 'calc'],
- ]; //XXX: 순서가 DB에 박혀있다 ㅜㅜ
+ ];
$generalObj = General::createGeneralObjFromDB($no, null, 2);
@@ -1420,7 +1420,7 @@ function CheckHall($no)
$ownerName = RootDB::db()->queryFirstField('SELECT name FROM member WHERE no = %i', $generalObj->getVar('owner'));
}
- foreach ($types as $idx => [$typeName, $valueType]) {
+ foreach ($types as [$typeName, $valueType]) {
if ($valueType === 'natural') {
$value = $generalObj->getVar($typeName);
@@ -1476,12 +1476,12 @@ function CheckHall($no)
];
$jsonAux = Json::encode($aux);
- $db->insertIgnore('ng_hall', [
+ $db->insertIgnore('hall', [
'server_id' => UniqueConst::$serverID,
'season' => UniqueConst::$seasonIdx,
'scenario' => $scenarioIdx,
'general_no' => $no,
- 'type' => $idx,
+ 'type' => $typeName,
'value' => $value,
'owner' => $generalObj->getVar('owner'),
'aux' => $jsonAux
@@ -1489,16 +1489,16 @@ function CheckHall($no)
if ($db->affectedRows() == 0) {
$db->update(
- 'ng_hall',
+ 'hall',
[
'value' => $value,
'aux' => $jsonAux
],
- 'server_id = %s AND scenario = %i AND general_no = %i AND type = %i AND value < %d',
+ 'server_id = %s AND scenario = %i AND general_no = %i AND type = %s AND value < %d',
UniqueConst::$serverID,
$scenarioIdx,
$no,
- $idx,
+ $typeName,
$value
);
}
@@ -1650,7 +1650,7 @@ function deleteNation(General $lord, bool $applyDB):array
$nationID,
$lordID
),
- ['gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel'], 1
+ ['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'aux'], 1
);
$oldNationGeneralList[$lordID] = $lord;
diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php
index e8b65da1..2c3ee312 100644
--- a/hwe/func_gamerule.php
+++ b/hwe/func_gamerule.php
@@ -1016,7 +1016,7 @@ function checkEmperior()
return "{$arr['name']}【{$number}】";
}, $eagles));
- $rawGeneralList = $db->query('SELECT no, name, npc, owner FROM general WHERE nation=%i ORDER BY dedication DESC');
+ $rawGeneralList = $db->query('SELECT no, name, npc, owner FROM general WHERE nation=%i ORDER BY dedication DESC', $nationID);
foreach ($rawGeneralList as $rawGeneral) {
$generalLogger = new ActionLogger($rawGeneral['no'], $nationID, $admin['year'], $admin['month']);
$generalLogger->pushGeneralActionLog("{$nation['name']}>{$josaYi} 전토를 통일하였습니다.", ActionLogger::YEAR_MONTH);
diff --git a/hwe/process_war.php b/hwe/process_war.php
index cdb3f0fd..8b6dcaab 100644
--- a/hwe/process_war.php
+++ b/hwe/process_war.php
@@ -558,9 +558,7 @@ function ConquerCity(array $admin, General $general, array $city) {
$cmd = buildGeneralCommandClass('che_임관', $oldGeneral, $admin, [
'destNationID'=>$attackerNationID
]);
- if($cmd->hasFullConditionMet()){
- _setGeneralCommand($cmd, [0]);
- }
+ _setGeneralCommand($cmd, [0]);
}
}
diff --git a/hwe/sammo/ActionSpecialWar/che_견고.php b/hwe/sammo/ActionSpecialWar/che_견고.php
index 4ee73eab..b16c433e 100644
--- a/hwe/sammo/ActionSpecialWar/che_견고.php
+++ b/hwe/sammo/ActionSpecialWar/che_견고.php
@@ -23,13 +23,14 @@ class che_견고 extends \sammo\BaseSpecial{
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller(
- new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE)
+ new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE),
+ new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
);
}
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller(
- new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '위압불가', '격노불가', '계략약화')
+ new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '위압불가', '격노불가', '계략약화', '저격불가')
);
}
diff --git a/hwe/sammo/Command/Nation/che_국기변경.php b/hwe/sammo/Command/Nation/che_국기변경.php
index f56d7fa8..6c71091a 100644
--- a/hwe/sammo/Command/Nation/che_국기변경.php
+++ b/hwe/sammo/Command/Nation/che_국기변경.php
@@ -73,7 +73,7 @@ class che_국기변경 extends Command\NationCommand
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::SuppliedCity(),
- ConstraintHelper::ReqNationAuxValue("can_{$actionName}", null, '>', 0, '더이상 변경이 불가능합니다.')
+ ConstraintHelper::ReqNationAuxValue("can_{$actionName}", 0, '>', 0, '더이상 변경이 불가능합니다.')
];
}
@@ -85,7 +85,7 @@ class che_국기변경 extends Command\NationCommand
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::SuppliedCity(),
- ConstraintHelper::ReqNationAuxValue("can_{$actionName}", null, '>', 0, '더이상 변경이 불가능합니다.')
+ ConstraintHelper::ReqNationAuxValue("can_{$actionName}", 0, '>', 0, '더이상 변경이 불가능합니다.')
];
}
diff --git a/hwe/sammo/Scenario/Nation.php b/hwe/sammo/Scenario/Nation.php
index 01d549e8..a4e10eec 100644
--- a/hwe/sammo/Scenario/Nation.php
+++ b/hwe/sammo/Scenario/Nation.php
@@ -4,6 +4,7 @@ use \sammo\DB;
use \sammo\GameConst;
use \sammo\Util;
use \sammo\KVStorage;
+use \sammo\Json;
use function \sammo\getNationChiefLevel;
class Nation{
@@ -86,6 +87,14 @@ class Nation{
$nationStor = KVStorage::getStorage($db, $this->id, 'nation_env');
$otherNations = $db->queryFirstColumn('SELECT nation FROM nation');
+ $aux = [
+ 'can_국기변경'=>1
+ ];
+
+ if($this->nationLevel==7){
+ $aux['can_국호변경']=1;
+ }
+
$db->insert('nation', [
'nation'=>$this->id,
'name'=>$this->name,
@@ -103,6 +112,7 @@ class Nation{
'tech'=>$this->tech,
'level'=>$this->nationLevel,
'type'=>$type,
+ 'aux'=>Json::encode($aux),
]);
if($cities){
diff --git a/hwe/sql/schema.sql b/hwe/sql/schema.sql
index 43aae28e..f67bc4a9 100644
--- a/hwe/sql/schema.sql
+++ b/hwe/sql/schema.sql
@@ -267,13 +267,13 @@ ENGINE=Aria;
## 명전 테이블
###########################################################################
-CREATE TABLE IF NOT EXISTS `ng_hall` (
+CREATE TABLE IF NOT EXISTS `hall` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`server_id` CHAR(20) NOT NULL,
`season` INT(11) NOT NULL,
`scenario` INT(11) NOT NULL,
`general_no` INT(11) NOT NULL,
- `type` INT(11) NOT NULL,
+ `type` VARCHAR(20) NOT NULL,
`value` DOUBLE NOT NULL,
`owner` INT(11) NULL DEFAULT NULL,
`aux` LONGTEXT NOT NULL DEFAULT '{}' CHECK (json_valid(`aux`)),
@@ -283,7 +283,7 @@ CREATE TABLE IF NOT EXISTS `ng_hall` (
INDEX `server_show` (`server_id`, `type`, `value`),
INDEX `scenario` (`season`, `scenario`, `type`, `value`)
)
-ENGINE=Aria DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED;
+ENGINE=Aria DEFAULT CHARSET=utf8mb4;
###########################################################################