From ed58c75cd39a5e0924465b42056acec9d126e7f9 Mon Sep 17 00:00:00 2001 From: Yuuki <6851027-yukiz@users.noreply.gitlab.com> Date: Fri, 14 Jun 2024 21:13:18 +0800 Subject: [PATCH] add scattered ruins --- Resources/Scripts/Scene/20214/scene20214.lua | 7 +- .../Scene/20214/scene20214_block20214.lua | 9 ++ .../Scene/20214/scene20214_group220214001.lua | 114 ++++++++++++++++++ 3 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 Resources/Scripts/Scene/20214/scene20214_block20214.lua create mode 100644 Resources/Scripts/Scene/20214/scene20214_group220214001.lua diff --git a/Resources/Scripts/Scene/20214/scene20214.lua b/Resources/Scripts/Scene/20214/scene20214.lua index 8041c4cde..8c4e0ee96 100644 --- a/Resources/Scripts/Scene/20214/scene20214.lua +++ b/Resources/Scripts/Scene/20214/scene20214.lua @@ -1,3 +1,4 @@ +-- scene info scene_config = { begin_pos = { x = -256.0, z = 0.0 }, size = { x = 512.0, z = 1024.0 }, @@ -8,10 +9,10 @@ scene_config = { vision_anchor = { x = -1000.0, z = 0.0 } } --- 所有的区块范围坐标 +-- block range coordinates block_rects = { { min = { x = -256.0, z = 0.0 }, max = { x = 256.0, z = 1024.0 } } } --- 所有的区块 -blocks = {} \ No newline at end of file +-- blocks ids lua file +blocks = { 20214 } \ No newline at end of file diff --git a/Resources/Scripts/Scene/20214/scene20214_block20214.lua b/Resources/Scripts/Scene/20214/scene20214_block20214.lua new file mode 100644 index 000000000..c120ae48e --- /dev/null +++ b/Resources/Scripts/Scene/20214/scene20214_block20214.lua @@ -0,0 +1,9 @@ +-- group +groups = { + { + id = 220214001, + pos = { + x = 124, y = 528, z = 842 + } + } +} \ No newline at end of file diff --git a/Resources/Scripts/Scene/20214/scene20214_group220214001.lua b/Resources/Scripts/Scene/20214/scene20214_group220214001.lua new file mode 100644 index 000000000..b453d0d50 --- /dev/null +++ b/Resources/Scripts/Scene/20214/scene20214_group220214001.lua @@ -0,0 +1,114 @@ +local base_info = { + group_id = 220214001 +} + +monsters = { + { + config_id = 1001, + monster_id = 29100103, + pos = { x = 124, y = 528, z = 842 }, + rot = { x = 0, y = 304, z = 0 }, + level = 32, -- idk + title_id = 191, -- specialNameLabID, idk why not show up + special_name_id = 16, + isElite = true + }, + { + config_id = 1002, + monster_id = 29100104, + pos = { x = 124, y = 528, z = 842 }, + rot = { x = 0, y = 304, z = 0 }, + level = 32, -- idk + title_id = 10001, + special_name_id = 10316, + isElite = true + } +} + +npcs = {} +gadgets = { + -- gif (this is wrong, help me fix it, I'm too lazy to look for it) + { + config_id = 1003, + gadget_id = 70210106, + pos = { x = 108, y = 528, z = 852 }, + rot = { x = 0, y = 0, z = 0 }, + level = 1, + drop_tag = "「正机之神」", + persistent = true, + boss_chest = { + monster_config_id=1029, + resin=60, + life_time = 1800, + take_num = 1 + } + } +} +regions = {} + +triggers = { + { + config_id = 1001001, + name = "ANY_MONSTER_DIE_1001", + event = EventType.EVENT_ANY_MONSTER_DIE, + source = "", + condition = "condition_EVENT_ANY_MONSTER_DIE_1001", + action = "action_EVENT_ANY_MONSTER_DIE_1001" + }, + { + config_id = 1001002, + name = "ANY_MONSTER_DIE_1002", + event = EventType.EVENT_ANY_MONSTER_DIE, + source = "", + condition = "condition_EVENT_ANY_MONSTER_DIE_1002", + action = "action_EVENT_ANY_MONSTER_DIE_1002" + }, +} + +variables = {} + +init_config = { + suite = 1, + end_suite = 0, + rand_suite = false +} + +suites = { + { + monsters = { 1001 }, + gadgets = { }, + regions = { }, + triggers = { "ANY_MONSTER_DIE_1001" }, + rand_weight = 100 + }, + { + monsters = { 1002 }, + gadgets = { }, + regions = { }, + triggers = { "ANY_MONSTER_DIE_1002" }, + rand_weight = 100 + } +} + +function condition_EVENT_ANY_MONSTER_DIE_1001(context, evt) + ScriptLib.PrintContextLog(context, "check if monster 1 dead") + return true +end + +function action_EVENT_ANY_MONSTER_DIE_1001(context, evt) + ScriptLib.PrintContextLog(context, "start monster 2") + ScriptLib.PlayCutScene(context, 152, 0) + ScriptLib.RefreshGroup(context, { group_id = 220214001, suite = 2 }) + return 0 +end + +function condition_EVENT_ANY_MONSTER_DIE_1002(context, evt) + ScriptLib.PrintContextLog(context, "check if monster 2 dead") + return true +end + +function action_EVENT_ANY_MONSTER_DIE_1002(context, evt) + ScriptLib.PrintContextLog(context, "end monster 2") + ScriptLib.CreateGadget(context, { config_id = 1003 }) + return 0 +end \ No newline at end of file