diff --git a/hwe/sammo/Command/BaseCommand.php b/hwe/sammo/Command/BaseCommand.php index df37be42..d1a5e749 100644 --- a/hwe/sammo/Command/BaseCommand.php +++ b/hwe/sammo/Command/BaseCommand.php @@ -312,10 +312,7 @@ abstract class BaseCommand{ } public function testMinConditionMet():?string{ - if(!static::$reqArg){ - if($this->minConditionConstraints){ - throw new \LogicException('reqArg==false인데 minCondition이 설정됨'); - } + if(!static::$reqArg && !$this->minConditionConstraints){ return $this->testFullConditionMet(); } diff --git a/hwe/sammo/Command/General/che_사기진작.php b/hwe/sammo/Command/General/che_사기진작.php index f9d7f425..15e8b5d6 100644 --- a/hwe/sammo/Command/General/che_사기진작.php +++ b/hwe/sammo/Command/General/che_사기진작.php @@ -35,6 +35,12 @@ class che_사기진작 extends Command\GeneralCommand{ $this->setNation(); [$reqGold, $reqRice] = $this->getCost(); + + $this->minConditionConstraints=[ + ConstraintHelper::NotBeNeutral(), + ConstraintHelper::NotWanderingNation(), + ConstraintHelper::OccupiedCity(), + ]; $this->fullConditionConstraints=[ ConstraintHelper::NotBeNeutral(), diff --git a/hwe/sammo/Command/General/che_출병.php b/hwe/sammo/Command/General/che_출병.php index 93216d44..b688d8bb 100644 --- a/hwe/sammo/Command/General/che_출병.php +++ b/hwe/sammo/Command/General/che_출병.php @@ -60,7 +60,7 @@ class che_출병 extends Command\GeneralCommand $relYear = $this->env['year'] - $this->env['startyear']; $this->minConditionConstraints = [ - ConstraintHelper::NotOpeningPart($relYear+1), + ConstraintHelper::NotOpeningPart($relYear+2), ConstraintHelper::NotBeNeutral(), ConstraintHelper::OccupiedCity(), ConstraintHelper::ReqGeneralCrew(), diff --git a/hwe/sammo/Command/General/che_훈련.php b/hwe/sammo/Command/General/che_훈련.php index 4da78026..05432f6c 100644 --- a/hwe/sammo/Command/General/che_훈련.php +++ b/hwe/sammo/Command/General/che_훈련.php @@ -34,6 +34,12 @@ class che_훈련 extends Command\GeneralCommand{ $this->setCity(); $this->setNation(); + + $this->minConditionConstraints=[ + ConstraintHelper::NotBeNeutral(), + ConstraintHelper::NotWanderingNation(), + ConstraintHelper::OccupiedCity(), + ]; $this->fullConditionConstraints=[ ConstraintHelper::NotBeNeutral(),