forked from devsam/core
MinCondition 조건 약화
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user