MinCondition 조건 약화
This commit is contained in:
@@ -312,10 +312,7 @@ abstract class BaseCommand{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function testMinConditionMet():?string{
|
public function testMinConditionMet():?string{
|
||||||
if(!static::$reqArg){
|
if(!static::$reqArg && !$this->minConditionConstraints){
|
||||||
if($this->minConditionConstraints){
|
|
||||||
throw new \LogicException('reqArg==false인데 minCondition이 설정됨');
|
|
||||||
}
|
|
||||||
return $this->testFullConditionMet();
|
return $this->testFullConditionMet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ class che_사기진작 extends Command\GeneralCommand{
|
|||||||
$this->setNation();
|
$this->setNation();
|
||||||
|
|
||||||
[$reqGold, $reqRice] = $this->getCost();
|
[$reqGold, $reqRice] = $this->getCost();
|
||||||
|
|
||||||
|
$this->minConditionConstraints=[
|
||||||
|
ConstraintHelper::NotBeNeutral(),
|
||||||
|
ConstraintHelper::NotWanderingNation(),
|
||||||
|
ConstraintHelper::OccupiedCity(),
|
||||||
|
];
|
||||||
|
|
||||||
$this->fullConditionConstraints=[
|
$this->fullConditionConstraints=[
|
||||||
ConstraintHelper::NotBeNeutral(),
|
ConstraintHelper::NotBeNeutral(),
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class che_출병 extends Command\GeneralCommand
|
|||||||
$relYear = $this->env['year'] - $this->env['startyear'];
|
$relYear = $this->env['year'] - $this->env['startyear'];
|
||||||
|
|
||||||
$this->minConditionConstraints = [
|
$this->minConditionConstraints = [
|
||||||
ConstraintHelper::NotOpeningPart($relYear+1),
|
ConstraintHelper::NotOpeningPart($relYear+2),
|
||||||
ConstraintHelper::NotBeNeutral(),
|
ConstraintHelper::NotBeNeutral(),
|
||||||
ConstraintHelper::OccupiedCity(),
|
ConstraintHelper::OccupiedCity(),
|
||||||
ConstraintHelper::ReqGeneralCrew(),
|
ConstraintHelper::ReqGeneralCrew(),
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ class che_훈련 extends Command\GeneralCommand{
|
|||||||
|
|
||||||
$this->setCity();
|
$this->setCity();
|
||||||
$this->setNation();
|
$this->setNation();
|
||||||
|
|
||||||
|
$this->minConditionConstraints=[
|
||||||
|
ConstraintHelper::NotBeNeutral(),
|
||||||
|
ConstraintHelper::NotWanderingNation(),
|
||||||
|
ConstraintHelper::OccupiedCity(),
|
||||||
|
];
|
||||||
|
|
||||||
$this->fullConditionConstraints=[
|
$this->fullConditionConstraints=[
|
||||||
ConstraintHelper::NotBeNeutral(),
|
ConstraintHelper::NotBeNeutral(),
|
||||||
|
|||||||
Reference in New Issue
Block a user