getVar('npc'); $nationID = $general->getNationID(); if($npc==5){ $this->can집합 = true; $this->can선양 = true; $this->can집합 = true; $this->can국가선택 = false; return; } if($npc==1){ $this->canNPC사망대비 = false; } if($nationID != 0){ $this->can국가선택 = false; $this->can건국 = false; } } function __construct(General $general, $aiOptions, array $nationPolicy, array $serverPolicy, array $nation, array $env){ //TODO: 국가 정책을 받아와야함 $this->priority = static::$default_priority; if($general->getVar('npc') >= 2){ $this->doNPCState($general); return; } $this->can일반내정 = false; $this->can긴급내정 = false; $this->can전쟁내정 = false; $this->can금쌀구매 = false; $this->can상인무시 = false; $this->can징병 = false; $this->can모병 = false; $this->can한계징병 = true; $this->can고급병종 = true; $this->can전투준비 = false; $this->can출병 = false; //$this->canNPC증여 = false; $this->canNPC헌납 = false; $this->can후방워프 = false; $this->can전방워프 = false; $this->can내정워프 = false; $this->can국가선택 = false; $this->can집합 = false; $this->can건국 = false; $this->can선양 = false; foreach($aiOptions as $key=>$value){ assert($value); switch($key){ case 'develop': $this->can일반내정 = true; //유저장은 '긴급'을 하지 않음 $this->can전쟁내정 = true; $this->can금쌀구매 = true; break; case 'warp': $this->can후방워프 = true; $this->can전방워프 = true; $this->can내정워프 = true; $this->can금쌀구매 = true; $this->can상인무시 = true; break; case 'recruit_high': $this->can모병 = true; case 'recruit': $this->can징병 = true; $this->can소집해제 = true; $this->can금쌀구매 = true; break; case 'train': $this->can전투준비 = true; $this->can금쌀구매 = true; break; case 'battle': $this->can출병 = true; $this->can금쌀구매 = true; break; } } } }