game: 이민족 발동 관련 변경

- 이민족 멸망 후 타국가 임관
- 이민족 발동 시 명성을 평균치로
This commit is contained in:
2022-01-21 01:00:31 +09:00
parent 5db3bdcef9
commit fc0c81e2ca
3 changed files with 23 additions and 17 deletions
+5 -5
View File
@@ -14,9 +14,9 @@ class AutoDeleteInvader extends \sammo\Event\Action{
public function run(array $env){
$db = DB::db();
if(getNationStaticInfo($this->nationID)===null){
$db->update('general', [
/*$db->update('general', [
'killturn'=>5
], 'nation = 0 AND npc = 9');
], 'nation = 0 AND npc = 9');*/
$eventID = Util::array_get($env['currentEventID']);
$db->delete('event', 'id = %i', $eventID);
return [__CLASS__, "Not Exists"];
@@ -33,14 +33,14 @@ class AutoDeleteInvader extends \sammo\Event\Action{
'arg'=>'[]',
'brief'=>"이민족 방랑"
], 'general_id = %i', $rulerID);
$db->update('general', [
/*$db->update('general', [
'killturn'=>5
], 'nation = %i', $this->nationID);
], 'nation = %i', $this->nationID);*/
$eventID = Util::array_get($env['currentEventID']);
$db->delete('event', 'id = %i', $eventID);
return [__CLASS__, 'Deleted'];
return [__CLASS__, 'Deleted'];
}
}