From fba5fbdb6b5be7b35a2b3521028c2729e4170e2d Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sat, 8 Jun 2024 15:48:01 +0000 Subject: [PATCH] feat: PenaltyKey::NoChiefTurnInput --- hwe/func_command.php | 8 ++++++++ hwe/sammo/Enums/PenaltyKey.php | 2 ++ 2 files changed, 10 insertions(+) diff --git a/hwe/func_command.php b/hwe/func_command.php index 74cdf284..2d7affcc 100644 --- a/hwe/func_command.php +++ b/hwe/func_command.php @@ -3,6 +3,7 @@ namespace sammo; use sammo\Command\GeneralCommand; use sammo\Command\NationCommand; +use sammo\Enums\PenaltyKey; function getGeneralTurnBrief(General $generalObj, array $turnList) { $result = []; @@ -434,6 +435,13 @@ function setNationCommand(int $generalID, array $turnList, string $command, ?arr ]; } + if($general->hasPenalty(PenaltyKey::NoChiefTurnInput)){ + return [ + 'result'=>false, + 'reason'=>'수뇌 턴 입력 불가능' + ]; + } + try{ $commandObj = buildNationCommandClass($command, $general, $env, $general->getLastTurn(), $arg); } diff --git a/hwe/sammo/Enums/PenaltyKey.php b/hwe/sammo/Enums/PenaltyKey.php index 98ab5a74..3780a4f3 100644 --- a/hwe/sammo/Enums/PenaltyKey.php +++ b/hwe/sammo/Enums/PenaltyKey.php @@ -11,4 +11,6 @@ enum PenaltyKey: string{ case NoChief = 'noChief'; case NoAmbassador = 'noAmbassador'; case NoBanGeneral = 'noBanGeneral'; + case NoChiefTurnInput = 'noChiefTurnInput'; + } \ No newline at end of file