From 06f086bcf064be2007d168ef08d8115995cbe34c Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sat, 8 Jun 2024 17:37:43 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20penalty=20=EC=98=A4=ED=83=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/Command/General/che_건국.php | 4 ++-- hwe/sammo/Command/General/che_임관.php | 4 ++-- hwe/sammo/Constraint/ConstraintHelper.php | 2 +- .../{NoPanalty.php => NoPenalty.php} | 2 +- hwe/sammo/Enums/PenaltyKey.php | 24 +++++++++++++++++-- 5 files changed, 28 insertions(+), 8 deletions(-) rename hwe/sammo/Constraint/{NoPanalty.php => NoPenalty.php} (97%) diff --git a/hwe/sammo/Command/General/che_건국.php b/hwe/sammo/Command/General/che_건국.php index 469b6091..0bf06ec0 100644 --- a/hwe/sammo/Command/General/che_건국.php +++ b/hwe/sammo/Command/General/che_건국.php @@ -83,7 +83,7 @@ class che_건국 extends Command\GeneralCommand $this->minConditionConstraints = [ ConstraintHelper::BeOpeningPart($relYear + 1), ConstraintHelper::ReqNationValue('level', '국가규모', '==', 0, '정식 국가가 아니어야합니다.'), - ConstraintHelper::NoPanelty(PenaltyKey::NoFoundNation), + ConstraintHelper::NoPenalty(PenaltyKey::NoFoundNation), ]; } @@ -104,7 +104,7 @@ class che_건국 extends Command\GeneralCommand ConstraintHelper::CheckNationNameDuplicate($nationName), ConstraintHelper::AllowJoinAction(), ConstraintHelper::ConstructableCity(), - ConstraintHelper::NoPanelty(PenaltyKey::NoFoundNation), + ConstraintHelper::NoPenalty(PenaltyKey::NoFoundNation), ]; } diff --git a/hwe/sammo/Command/General/che_임관.php b/hwe/sammo/Command/General/che_임관.php index 7f3baaf5..a9476d4f 100644 --- a/hwe/sammo/Command/General/che_임관.php +++ b/hwe/sammo/Command/General/che_임관.php @@ -68,7 +68,7 @@ class che_임관 extends Command\GeneralCommand ConstraintHelper::ReqEnvValue('join_mode', '!=', 'onlyRandom', '랜덤 임관만 가능합니다'), ConstraintHelper::BeNeutral(), ConstraintHelper::AllowJoinAction(), - ConstraintHelper::NoPanelty(PenaltyKey::NoChosenAssignment), + ConstraintHelper::NoPenalty(PenaltyKey::NoChosenAssignment), ]; } @@ -95,7 +95,7 @@ class che_임관 extends Command\GeneralCommand ConstraintHelper::ExistsDestNation(), ConstraintHelper::AllowJoinDestNation($relYear), ConstraintHelper::AllowJoinAction(), - ConstraintHelper::NoPanelty(PenaltyKey::NoChosenAssignment), + ConstraintHelper::NoPenalty(PenaltyKey::NoChosenAssignment), ]; } diff --git a/hwe/sammo/Constraint/ConstraintHelper.php b/hwe/sammo/Constraint/ConstraintHelper.php index 5b21cef3..f25acf0a 100644 --- a/hwe/sammo/Constraint/ConstraintHelper.php +++ b/hwe/sammo/Constraint/ConstraintHelper.php @@ -178,7 +178,7 @@ class ConstraintHelper{ return [__FUNCTION__]; } - static function NoPanelty(PenaltyKey $penaltyKey):array{ + static function NoPenalty(PenaltyKey $penaltyKey):array{ return [__FUNCTION__, $penaltyKey]; } diff --git a/hwe/sammo/Constraint/NoPanalty.php b/hwe/sammo/Constraint/NoPenalty.php similarity index 97% rename from hwe/sammo/Constraint/NoPanalty.php rename to hwe/sammo/Constraint/NoPenalty.php index a83e3d9e..764c4ae9 100644 --- a/hwe/sammo/Constraint/NoPanalty.php +++ b/hwe/sammo/Constraint/NoPenalty.php @@ -5,7 +5,7 @@ namespace sammo\Constraint; use sammo\Enums\PenaltyKey; use sammo\Json; -class NoPanelty extends Constraint{ +class NoPenalty extends Constraint{ const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_ARG|Constraint::REQ_BACKED_ENUM_ARG; public function checkInputValues(bool $throwExeception=true):bool{ diff --git a/hwe/sammo/Enums/PenaltyKey.php b/hwe/sammo/Enums/PenaltyKey.php index 08b6574a..d4e651e0 100644 --- a/hwe/sammo/Enums/PenaltyKey.php +++ b/hwe/sammo/Enums/PenaltyKey.php @@ -1,11 +1,13 @@ '개인 메세지 보내기 제한 시간', + PenaltyKey::NoSendPrivateMsg => '개인 메세지 보내기 금지', + PenaltyKey::NoSendPublicMsg => '공개 메세지 보내기 금지', + PenaltyKey::NoTopSecret => '최고기밀 메세지 보내기 금지', + PenaltyKey::NoChief => '수뇌 금지', + PenaltyKey::NoAmbassador => '외교권자 금지', + PenaltyKey::NoBanGeneral => '장수 추방 금지', + PenaltyKey::NoChiefTurnInput => '수뇌 턴 입력 금지', + PenaltyKey::NoChiefChange => '수뇌 임명/해임 금지', + PenaltyKey::NoFoundNation => '건국 금지', + PenaltyKey::NoChosenAssignment => '지정 임관 금지', + default => "페널티({$this->value})", + }; + } +}