ConstraintHelper 추가

This commit is contained in:
2018-11-15 03:33:44 +09:00
parent 0c5d62a0dd
commit 76079f24c0
44 changed files with 588 additions and 168 deletions
@@ -21,6 +21,7 @@ use function \sammo\{
};
use \sammo\Constraint\Constraint;
use \sammo\Constraint\ConstraintHelper;
use sammo\MustNotBeReachedException;
class che_군량매매 extends Command\GeneralCommand{
@@ -59,16 +60,16 @@ class che_군량매매 extends Command\GeneralCommand{
$this->setNation();
$this->runnableConstraints=[
['ReqCityTrader', $general->getVar('npc')],
['OccupiedCity', true],
['SuppliedCity'],
ConstraintHelper::ReqCityTrader($general->getVar('npc')),
ConstraintHelper::OccupiedCity(true),
ConstraintHelper::SuppliedCity(),
];
if($this->arg['buyRice']){
$this->runnableConstraints[] = ['ReqGeneralGold', 1];
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralGold(1);
}
else{
$this->runnableConstraints[] = ['ReqGeneralRice', 1];
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralRice(1);
}
}