사실 모드 시나리오들에 초기 내정치 부여 코드 추가

This commit is contained in:
2018-03-28 17:07:30 +09:00
parent 51783c1845
commit c1976b5b7a
13 changed files with 245 additions and 17 deletions
+17 -5
View File
@@ -18,14 +18,26 @@ class ChangeCity extends sammo\Event\Action{
const REGEXP_MATH = '/^([\+\-\/\*])(\d+(\.\d+)?)$/'; //+30 [1]=기호, [2]=float
private $queries;
private $targetType;
private $targetArgs;
public function __construct(array $target = [], array $actions){
private $targetType = 'all';
private $targetArgs = [];
public function __construct(array $target = null, array $actions){
//values 포맷은 key, value로
$this->targetType = $target[0];
$this->targetArgs = array_slice($target, 1);
if(!$target){
$this->targetType = 'all';
}
else if(is_string($target)){
$this->targetType = $target;
}
else if(is_array($target)){
$this->targetType = $target[0];
$this->targetArgs = array_slice($target, 1);
}
else{
throw new \InvalidArgumentException('올바르지 않은 targetType 입니다.');
}
$queries = [];
foreach($actions as $key => $value){