ConstraintHelper 추가

This commit is contained in:
2018-11-15 03:33:44 +09:00
parent 2cb7513355
commit c3699a8595
44 changed files with 588 additions and 168 deletions
+10 -8
View File
@@ -17,6 +17,7 @@ use function \sammo\{
};
use \sammo\Constraint\Constraint;
use \sammo\Constraint\ConstraintHelper;
use sammo\CityConst;
@@ -47,16 +48,17 @@ class che_출병 extends Command\GeneralCommand{
$this->setDestNation(['nation' ,'level','name','capital','gennum','tech','type','gold','rice']);
[$reqGold, $reqRice] = $this->getCost();
$relYear = $this->env['year'] - $this->env['startyear'];
$this->runnableConstraints=[
['NotOpeningPart'],
['NearCity', 1],
['NotBeNeutral'],
['OccupiedCity'],
['ReqGeneralCrew'],
['ReqGeneralRice', $reqRice],
['AllowWar'],
['BattleGroundCity', 1],
ConstraintHelper::NotOpeningPart($relYear),
ConstraintHelper::NearCity(1),
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::ReqGeneralCrew(),
ConstraintHelper::ReqGeneralRice($reqRice),
ConstraintHelper::AllowWar(),
ConstraintHelper::BattleGroundCity(true),
];
}