feat: 게임 시작 후, 거병/건국 기간, 출병 제한 기간을 안내

This commit is contained in:
2022-05-11 02:22:40 +09:00
parent e00021871a
commit 3252db0fbe
4 changed files with 43 additions and 8 deletions
+4 -6
View File
@@ -207,7 +207,7 @@ class Scenario{
$cond = $rawEvent[0];
$action = array_slice($rawEvent, 1);
return new \sammo\Event\EventHandler($cond, $action);
}, Util::array_get($data['initialEvents'], []));
}, array_merge(GameConst::$defaultInitialEvents, Util::array_get($data['initialEvents'], [])));
$this->events = array_map(function($rawEvent){
//event는 여기서 풀지 않는다. 평가만 한다.
@@ -230,7 +230,7 @@ class Scenario{
'cond' => $cond,
'action' => $action
];
}, Util::array_get($data['events'], []));
}, array_merge(GameConst::$defaultEvents, Util::array_get($data['events'], [])));
}
public function getGameConf(){
@@ -546,6 +546,8 @@ class Scenario{
$this->buildDiplomacy($env);
pushGlobalHistoryLog($this->history, $env['year'], $env['month']);
foreach($this->initialEvents as $event){
$event->tryRunEvent($env);
}
@@ -563,10 +565,6 @@ class Scenario{
$db->insert('event', $events);
}
pushGlobalHistoryLog($this->history, $env['year'], $env['month']);
refreshNationStaticInfo();
foreach(getAllNationStaticInfo() as $nation){
SetNationFront($nation['nation']);