MinCondition 조건 약화

This commit is contained in:
2020-05-04 20:37:23 +09:00
parent 91f2be6759
commit 014fb9408e
4 changed files with 14 additions and 5 deletions
+1 -4
View File
@@ -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();
}
@@ -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(),
+1 -1
View File
@@ -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(),
+6
View File
@@ -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(),