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

142 lines
3.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 基础信息
local base_info = {
group_id = 250028001
}
--================================================================
--
-- 配置
--
--================================================================
-- 怪物
monsters = {
{ config_id = 1002, monster_id = 20010601, pos = { x = 0.070, y = -2.777, z = 50.486 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 1003, monster_id = 20011201, pos = { x = -1.614, y = -2.777, z = 50.427 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
{ config_id = 1004, monster_id = 20011201, pos = { x = 1.851, y = -2.777, z = 50.364 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- NPC
npcs = {
}
-- 装置
gadgets = {
{ config_id = 1006, gadget_id = 70900205, pos = { x = -6.728, y = -5.561, z = 14.970 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}
-- 区域
regions = {
{ config_id = 1001, shape = RegionShape.CUBIC, size = { x = 10.000, y = 10.000, z = 5.000 }, pos = { x = -0.041, y = -7.391, z = 70.538 } },
{ config_id = 1007, shape = RegionShape.SPHERE, radius = 5, pos = { x = 0.244, y = -2.816, z = 49.294 } }
}
-- 触发器
triggers = {
{ config_id = 1001001, name = "ENTER_REGION_1001", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "action_EVENT_ENTER_REGION_1001" },
{ config_id = 1001005, name = "ANY_MONSTER_DIE_1005", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_1005", action = "action_EVENT_ANY_MONSTER_DIE_1005" },
{ config_id = 1001007, name = "ENTER_REGION_1007", event = EventType.EVENT_ENTER_REGION, source = "", condition = "", action = "action_EVENT_ENTER_REGION_1007" }
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
end_suite = 0,
rand_suite = false
}
--================================================================
--
-- 小组配置
--
--================================================================
suites = {
{
-- suite_id = 1,
-- description = ,
monsters = { },
gadgets = { 1006 },
regions = { 1001, 1007 },
triggers = { "ENTER_REGION_1001", "ENTER_REGION_1007" },
rand_weight = 100
},
{
-- suite_id = 2,
-- description = ,
monsters = { 1002, 1003, 1004 },
gadgets = { },
regions = { },
triggers = { },
rand_weight = 100
}
}
--================================================================
--
-- 触发器
--
--================================================================
-- 触发操作
function action_EVENT_ENTER_REGION_1001(context, evt)
-- 添加suite2的新内容
ScriptLib.AddExtraGroupSuite(context, 250028001, 2)
return 0
end
-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_1005(context, evt)
--判断死亡怪物的configid是否为 1002
if evt.param1 ~= 1002 then
return false
end
--判断死亡怪物的configid是否为 1003
if evt.param1 ~= 1003 then
return false
end
--判断死亡怪物的configid是否为 1004
if evt.param1 ~= 1004 then
return false
end
return true
end
-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_1005(context, evt)
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250028002, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
return 0
end
-- 触发操作
function action_EVENT_ENTER_REGION_1007(context, evt)
-- 重新生成指定group,指定suite
if 0 ~= ScriptLib.RefreshGroup(context, { group_id = 250028002, suite = 1 }) then
ScriptLib.PrintContextLog(context, "@@ LUA_WARNING : refresh_group_to_suite")
return -1
end
return 0
end