From 895b134cd0c43917ec9a21787c1884cddf37d704 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sat, 5 Aug 2023 07:54:55 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20InstantAction=20=EA=B0=9C=EB=85=90=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/sammo/GameConstBase.php | 10 ++++++++++ hwe/sammo/Scenario.php | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index ea528042..1efc3341 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -228,6 +228,16 @@ class GameConstBase /** @var ?string */ public static $scenarioEffect = null; + public static $defaultInstantAction = [ + 'dieOnPrestart' => true, + 'buildNationCandidate' => true, + ]; + + public static $availableInstantAction = [ + 'dieOnPrestart' => true, + 'buildNationCandidate' => true, + ]; + public static $allItems = [ 'horse' => [ 'che_명마_01_노기' => 0, 'che_명마_02_조랑' => 0, 'che_명마_03_노새' => 0, diff --git a/hwe/sammo/Scenario.php b/hwe/sammo/Scenario.php index d2bc9ddb..2b86cba1 100644 --- a/hwe/sammo/Scenario.php +++ b/hwe/sammo/Scenario.php @@ -515,6 +515,11 @@ class Scenario{ } } + $this->gameConf['availableInstantAction'] = array_merge( + GameConstBase::$defaultInstantAction, + $this->gameConf['availableInstantAction']??[] + ); + Util::generatePHPClassFile($path.'/GameConst.php', $this->gameConf, 'GameConstBase', 'sammo'); copy("$mapPath/$mapName.php", $path.'/CityConst.php');