Files
hk4e-go/gdconf/game_data_config/lua/scene/5/scene5_group155006032.lua
T
2022-11-30 00:00:20 +08:00

177 lines
4.4 KiB
Go

-- 基础信息
local base_info = {
group_id = 155006032
}
-- Trigger变量
local defs = {
group_ID = 155006032
}
-- DEFS_MISCS
local EnvControlGadgets = {}
local DayAppearGadgets = {32002}
local NightAppearGadgets = {32004}
local gameplayStateFuncitons =
{
["0"] = function(context)
ScriptLib.SetGroupVariableValue(context,"is_daynight_finish",1)
end,
["1"] = function(context)
ScriptLib.SetGroupVariableValue(context,"is_daynight_finish",0)
ScriptLib.AddExtraGroupSuite(context, defs.group_ID, 2)
end,
["2"] = function(context)
ScriptLib.SetGroupVariableValue(context,"is_daynight_finish",1)
ScriptLib.AddExtraGroupSuite(context, defs.group_ID, 3)
end
}
function UpdateGamePlayState(context)
local state = ScriptLib.GetGroupVariableValue(context, "gameplayState")
gameplayStateFuncitons[tostring(state)](context)
end
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 32002, gadget_id = 70290229, pos = { x = 538.906, y = 175.877, z = -376.567 }, rot = { x = 0.815, y = 359.982, z = 357.529 }, level = 36, area_id = 200 },
{ config_id = 32004, gadget_id = 70211001, pos = { x = 538.847, y = 174.798, z = -376.691 }, rot = { x = 0.910, y = 2.203, z = 357.563 }, level = 16, drop_tag = "战斗低级稻妻", isOneoff = true, persistent = true, explore = { name = "chest", exp = 1 }, area_id = 200 }
}
-- 区域
regions = {
}
-- 触发器
triggers = {
{ config_id = 1032001, name = "GADGET_STATE_CHANGE_32001", event = EventType.EVENT_GADGET_STATE_CHANGE, source = "", condition = "condition_EVENT_GADGET_STATE_CHANGE_32001", action = "action_EVENT_GADGET_STATE_CHANGE_32001", trigger_count = 0 },
{ config_id = 1032005, name = "GROUP_LOAD_32005", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_32005", trigger_count = 0 },
{ config_id = 1032006, name = "VARIABLE_CHANGE_32006", event = EventType.EVENT_VARIABLE_CHANGE, source = "gameplayState", condition = "", action = "action_EVENT_VARIABLE_CHANGE_32006", trigger_count = 0 }
}
-- 变量
variables = {
{ config_id = 1, name = "gameplayState", value = 1, no_refresh = true }
}
-- 废弃数据
garbages = {
triggers = {
{ config_id = 1032003, name = "TIME_AXIS_PASS_32003", event = EventType.EVENT_TIME_AXIS_PASS, source = "disappear", condition = "", action = "action_EVENT_TIME_AXIS_PASS_32003", trigger_count = 0 }
}
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { "GROUP_LOAD_32005", "VARIABLE_CHANGE_32006" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { "GADGET_STATE_CHANGE_32001" },
rand_weight = 100
},
{
-- suite_id = 3,
-- description = ,
monsters = { },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发条件
function condition_EVENT_GADGET_STATE_CHANGE_32001(context, evt)
if 32004 ~= evt.param2 or GadgetState.ChestOpened ~= evt.param1 then
return false
end
return true
end
-- 触发操作
function action_EVENT_GADGET_STATE_CHANGE_32001(context, evt)
-- 将本组内变量名为 "gameplayState" 的变量设置为 2
if 0 ~= ScriptLib.SetGroupVariableValue(context, "gameplayState", 2) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : set_groupVariable")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_GROUP_LOAD_32005(context, evt)
UpdateGamePlayState(context)
return 0
end
-- 触发操作
function action_EVENT_VARIABLE_CHANGE_32006(context, evt)
if evt.param1 == evt.param2 then return -1 end
UpdateGamePlayState(context)
return 0
end
require "V2_4/EnvState"