Files
fc/server/tools/gen_data/cfg/secret_dun_data.erl
T

295 lines
20 KiB
Erlang
Raw Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 数据配置文件
%% @author whjing2011@gmail.com
%%----------------------------------------------------
-module(secret_dun_data).
-export([
cfg/0
,get/1
]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = secret_dun_data
,lua_name = secret_dun_data
,js_name = secret_dun_data
,desc = "配置数据"
,source = "secret_dun_data.xml"
,target = "secret_dun_data.erl"
,splitv = 1
,head_rows = 1
,inc = ["secret_dun.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
%% ,{{group_evts, "[]"}, cb_fun, handle, {tuple_type, ["事件组"], evt_gid, [evtid, rand, num]}}
,{get_evt, cb_fun, handle, {get_record, ["事件"], id, evt_data, [id, type, ext, win_delete, lose_delete, win_reward_time, win_reward_list, false_reward_time, false_reward_list, exchange_id, group_id]}}
,{get_dun, cb_fun, handle, {get_tuple, ["层数信息"], [id, floor], map_id}}
,{get_all_dun, cb_fun, handle, {tuple_list, ["层数信息"], [id, floor]}}
,{{get_first_map_id, undefined}, cb_fun, handle, {get_tuple, ["层数信息"], [id, floor], first_map_id}}
,{get_event_type, cb_fun, handle, {get_tuple, ["事件"], id, type}}
,{{get_limit_id, "[]"}, cb_fun, handle, {get_tuple, ["副本信息"], id, id_limit}}
,{get_all_limit_id, cb_fun, handle, {tuple_list, ["副本信息"], [id, id_limit]}}
,{get_limit_lev, cb_fun, handle, {get_tuple, ["副本信息"], id, lev_limit}}
,{get_limit_power, cb_fun, handle, {get_tuple, ["副本信息"], id, power_limit}}
,{get_first_reward, cb_fun, handle, {get_tuple, ["副本信息"], id, first_reward}}
,{{get_pass_radio, undefined}, cb_fun, handle, {get_tuple, ["副本信息"], id, add_radio}}
,{{get_events, undefined}, cb_fun, handle, {get_tuple, ["事件组"], evt_gid, ids}}
,{get_event_walk, cb_fun, handle, {get_tuple, ["事件"], id, is_walk}}
%% ,{get_bag_max_num, cb_fun, handle, {get_tuple, ["背包道具信息"], id, max_num}}
%% ,{get_answer, cb_fun, handle, {get_tuple, ["问答题"], id, answer}}
,{get_conversation, cb_fun, handle, {get_tuple, ["奖励Npc"], id, reward_list}}
,{get_monster_ids, cb_fun, handle, {get_fun, ["守卫机器人库"], "get_monster_ids({~ts, ~ts, Power}) when Power >= ~ts andalso Power =< ~ts -> ~ts;", [id, floor, min, max, robot]}}
,{get_robot_ids, cb_fun, handle, {get_fun, ["怪物机器人库_1", "怪物机器人库_2", "怪物机器人库_3"], "get_robot_ids({~ts, Power}) when Power >= ~ts andalso Power =< ~ts -> ~ts;", [id, min, max, robot]}}
%% ,{get_robot_ids2, cb_fun, handle, {get_fun, ["精英怪机器人库"], "get_robot_ids2({~ts, ~ts, Power}) when Power >= ~ts andalso Power =< ~ts -> ~ts;", [id, floor, min, max, robot]}}
%% ,{get_robot_ids3, cb_fun, handle, {get_fun, ["BOSS机器人库"], "get_robot_ids3({~ts, ~ts, Power}) when Power >= ~ts andalso Power =< ~ts -> ~ts;", [id, floor, min, max, robot]}}
,{get_reward, cb_fun, handle, {get_tuple, ["奖励信息"], id, [type, ext, is_add]}}
,{get_buffs, cb_fun, handle, {tuple_list, ["buff库"], [group_id, buff_id, weight, is_return]}}
,{{get_session, undefined}, cb_fun, handle, {get_tuple, ["第一次对话"], condition, id}}
,{{get_group, undefined}, cb_fun, handle, {get_tuple, ["事件"], id, group_id}}
,{get_buff, cb_fun, handle, {get_tuple, ["buff信息"], buff_id, [range, ext]}}
,{get_buff_attr, cb_fun, handle, {get_tuple, ["加属性Buff数据"], id, attr_ext}}
,{get_loan_group, cb_fun, handle, {get_fun, ["租借机器人库"], "get_loan_group(Power) when Power >= ~ts andalso Power =< ~ts -> ~ts;", [min, max, robot]}}
,{get_loan_partner, cb_fun, handle, {get_tuple, ["租借机器人"], id, [bid, lev, star, break_lev, skills, attr]}}
,{get_all_loan_partner, cb_fun, handle, {tuple_list, ["租借机器人"], [id, group_id, weight]}}
,{get_buff_client, cb_fun, handle, {get_tuple, ["buff信息"], buff_id, [quality, add_power]}}
,{get_dun_name, cb_fun, handle, {get_tuple, ["层数信息"], [id, floor], name}}
,{{get_dun_max_val, 1}, cb_fun, handle, {get_tuple, ["副本信息"], id, max_val}}
,{{get_event_val, 0}, cb_fun, handle, {get_tuple, ["事件"], id, add_val}}
,{get_guard_ext, cb_fun, handle, {get_fun, ["战力段对应守卫强度"], "get_guard_ext({~ts, Power}) when Power >= ~ts andalso Power =< ~ts -> ~ts;", [id, min, max, ext]}}
,{get_all_id, cb_fun, handle, {tuple_list, ["副本信息"], id}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{dun_map, cb_fun_lua, handle, {type_get_val, ["层数信息"], [id, floor], [map_res_id]}}
,{dun_info, cb_fun_lua, handle, {type_get_last_row, ["层数信息"], [id], [name, dun_res_id]}}
,{max_dun_num, cb_fun_lua, handle, {type_get_max, ["层数信息"], [id], floor}}
,{customs, cb_fun_lua, handle, {key_val, ["副本信息"], id, [id_limit, lev_limit, power_limit, first_reward, add_radio, battle_bg_id, award, res_id, desc, music, award_desc, camp]}}
,{evt_info, cb_fun_lua, handle, {key_val, ["事件"], id, [name, type, ext, group_id, is_walk, res_1, res_2, offset, reversal, reward]}}
,{dialogue, cb_fun_lua, handle, {key_val, ["奖励Npc"], id, [dialogue, answer]}}
,{drama, cb_fun_lua, handle, {key_val, ["第一次对话"], id, [dialogue]}}
,{board, cb_fun_lua, handle, {key_val, ["广告牌"], id, all}}
,{buff, cb_fun_lua, handle, {key_val, ["buff信息"], buff_id, [buff_id, name, desc, quality, range, res_id]}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{dun_map, cb_fun_json, handle, {type_get_val, ["层数信息"], [id, floor], [map_res_id]}}
,{dun_info, cb_fun_json, handle, {type_get_last_row, ["层数信息"], [id], [name, dun_res_id]}}
,{max_dun_num, cb_fun_json, handle, {type_get_max, ["层数信息"], [id], floor}}
,{customs, cb_fun_json, handle, {key_val, ["副本信息"], id, [id_limit, lev_limit, power_limit, first_reward, add_radio, battle_bg_id, award, res_id, desc, music, award_desc, camp]}}
,{evt_info, cb_fun_json, handle, {key_val, ["事件"], id, [name, type, ext, group_id, is_walk, res_1, res_2, offset, reversal, reward]}}
,{dialogue, cb_fun_json, handle, {key_val, ["奖励Npc"], id, [dialogue, answer]}}
,{drama, cb_fun_json, handle, {key_val, ["第一次对话"], id, [dialogue]}}
,{board, cb_fun_json, handle, {key_val, ["广告牌"], id, all}}
,{buff, cb_fun_json, handle, {key_val, ["buff信息"], buff_id, [buff_id, name, desc, quality, range, res_id]}}
]
,sheet = [
{["常量配置"], [
#f_column{type = atom, name = key, desc = "", primary = true, mod = all}
,#f_column{type = term, name = val, desc = "", add_list_sign=false, mod = all}
,#f_column{type = str, name = desc, desc = "描述", mod = all}
]}
,{["层数信息"], [
#f_column{type = int, name = id, desc = "副本Id"}
,#f_column{type = int, name = floor, desc = "层数"}
,#f_column{type = term, name = map_id, desc = "地图id列表{地图id, 权重}"}
,#f_column{type = int, name = first_map_id, desc = "第一次地图id"}
,#f_column{type = bstr, name = name, desc = "副本名称", mod = client}
,#f_column{type = int, name = map_res_id, desc = "地图背景资源id", mod = client}
,#f_column{type = int, name = dun_res_id, desc = "副本资源id", mod = client}
]}
,{["副本信息"], [
#f_column{type = int, name = id, desc = "副本Id", mod = all}
,#f_column{type = term, name = id_limit, desc = "需解锁id", val = "[]", mod = all}
,#f_column{type = int, name = lev_limit, desc = "开启所需等级", mod = all}
,#f_column{type = int, name = power_limit, desc = "开启所需历史最高推图战力", mod = all}
,#f_column{type = term, name = first_reward, desc = "首通奖励", mod = all}
,#f_column{type = int, name = add_radio, desc = "通关宝箱系数加成", mod = all}
,#f_column{type = int, name = max_val, desc = "通关所需进度值", mod = all, val = 1}
,#f_column{type = int, name = battle_bg_id, desc = "战斗背景图", mod = client}
,#f_column{type = term, name = award, desc = "奖励展示", mod = client}
,#f_column{type = int, name = res_id, desc = "副本背景资源", mod = client}
,#f_column{type = bstr, name = desc, desc = "副本描述", mod = client}
,#f_column{type = bstr, name = music, desc = "背景音乐", mod = client}
,#f_column{type = bstr, name = award_desc, desc = "可开启状态下补充描述", mod = client}
,#f_column{type = int, name = camp, desc = "入口阵营图标显示", mod = client}
]}
,{["事件组"], [
#f_column{type = int, name = evt_gid, desc = "事件组ID"}
,#f_column{type = term, name = ids, desc = "{事件ID, 权重, 次数}"}
]}
,{["事件"], [
#f_column{type = int, name = id, desc = "事件ID"}
,#f_column{type = bstr, name = name, desc = "事件名称"}
,#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "事件类型"}
,#f_column{type = int, name = num, desc = "出现次数限制"}
,#f_column{type = term, name = ext, desc = "额外参数"}
,#f_column{type = int, name = group_id, desc = "多选一对应组别"}
,#f_column{type = int, name = add_val, desc = "成功增加通关值", val = 0}
,#f_column{type = kv, kv_type = bool, name = is_walk, desc = "是否可行走", mod = all}
,#f_column{type = kv, kv_type = bool, name = win_delete, desc = "成功后是否消失"}
,#f_column{type = kv, kv_type = bool, name = false_delete, desc = "失败后是否消失"}
,#f_column{type = int, name = exchange_id, desc = "消失后转换事件Id"}
,#f_column{type = int, name = win_reward_time, desc = "成功奖励次数"}
,#f_column{type = term, name = win_reward_list, desc = "成功奖励列表"}
,#f_column{type = int, name = false_reward_time, desc = "失败奖励次数"}
,#f_column{type = term, name = false_reward_list, desc = "失败奖励列表"}
,#f_column{type = term, name = res_1, desc = "事件完成前的资源", mod = client, comment = "1为图片,2为特效,不填则不显示"}
,#f_column{type = term, name = res_2, desc = "事件完成后的资源", mod = client, comment = "1为图片,2为特效,不填则不显示"}
,#f_column{type = term, name = offset, desc = "事件资源偏移值", mod = client, comment = "x,yx为横向偏移,y为纵向偏移"}
,#f_column{type = term, name = reward, desc = "奖励展示"}
,#f_column{type = int, name = reversal, desc = "是否翻转", comment = "填1为翻转,否则不翻转"}
]}
,{["战力段对应守卫强度"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = int, name = min, desc = "战力下限", mod = all}
,#f_column{type = int, name = max, desc = "战力上限", mod = all}
,#f_column{type = term, name = ext, desc = "守卫参数", mod = all}
]}
,{["奖励信息"], [
#f_column{type = int, name = id, desc = "奖励Id", mod = all}
,#f_column{type = kv, kv_type = {?MODULE, get, [reward_type]}, name = type, desc = "奖励类型"}
,#f_column{type = term, name = ext, desc = "额外参数"}
,#f_column{type = kv, kv_type = bool, name = is_add, desc = "是否受副本通关加成", mod = all, val = 0}
,#f_column{type = bstr, name = desc, desc = "备注"}
]}
%% ,{["背包道具信息"], [
%% #f_column{type = int, name = id, desc = "物品id", mod = all}
%% ,#f_column{type = int, name = max_num, desc = "堆叠数量", val = 1, mod = all}
%% ,#f_column{type = kv, kv_type = quality, name = quality, desc = "品质", mod = client}
%% ,#f_column{type = bstr, name = name, desc = "名字", mod = client}
%% ,#f_column{type = bstr, name = desc , desc = "描述", mod = client}
%% ,#f_column{type = int, name = icon , desc = "图标资源", mod = client}
%% ,#f_column{type = bstr, name = type_desc , desc = "类型描述", mod = client}
%% ,#f_column{type = bstr, name = use_desc , desc = "作用描述", mod = client}
%% ]}
%% ,{["问答题"], [
%% #f_column{type = int, name = id, desc = "问题Id", mod = all}
%% ,#f_column{type = term, name = answer, desc = "答案奖励{选项,奖励列表}", mod = all}
%% ]}
,{["奖励Npc"], [
#f_column{type = int, name = id, desc = "对话Id", mod = all}
,#f_column{type = term, name = reward_list, desc = "对话奖励{选项,奖励列表}", mod = all}
,#f_column{type = term, name = dialogue, desc = "对话", mod = client}
,#f_column{type = term, name = answer, desc = "选项", mod = client}
]}
,{["守卫机器人库"], [
#f_column{type = int, name = id, desc = "副本id", mod = all}
,#f_column{type = int, name = floor, desc = "层数", mod = all}
,#f_column{type = int, name = min, desc = "战力下限", mod = all}
,#f_column{type = int, name = max, desc = "战力上限", mod = all}
,#f_column{type = term, name = robot, desc = "机器人匹配{id, weight}", mod = all}
]}
,{["怪物机器人库_1"], [
#f_column{type = int, name = id, desc = "组ID", mod = all}
,#f_column{type = int, name = min, desc = "战力下限", mod = all}
,#f_column{type = int, name = max, desc = "战力上限", mod = all}
,#f_column{type = term, name = robot, desc = "机器人匹配{id, weight}", mod = all}
]}
,{["怪物机器人库_2"], [
#f_column{type = int, name = id, desc = "组ID", mod = all}
,#f_column{type = int, name = min, desc = "战力下限", mod = all}
,#f_column{type = int, name = max, desc = "战力上限", mod = all}
,#f_column{type = term, name = robot, desc = "机器人匹配{id, weight}", mod = all}
]}
,{["怪物机器人库_3"], [
#f_column{type = int, name = id, desc = "组ID", mod = all}
,#f_column{type = int, name = min, desc = "战力下限", mod = all}
,#f_column{type = int, name = max, desc = "战力上限", mod = all}
,#f_column{type = term, name = robot, desc = "机器人匹配{id, weight}", mod = all}
]}
,{["buff信息"], [
#f_column{type = int, name = buff_id, desc = "Buff", mod = all}
,#f_column{type = bstr, name = name, desc = "名字", mod = client}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
,#f_column{type = kv, name = quality, kv_type = {?MODULE, get, [quality]}, desc = "品质", mod = all}
,#f_column{type = term, name = range, desc = "生效范围", mod = all, val = "[]"}
,#f_column{type = term, name = ext, desc = "效果参数", mod = all}
,#f_column{type = bstr, name = res_id, desc = "图标", mod = client}
,#f_column{type = int, name = add_power, desc = "战力加成", mod = mod, val = 0}
]}
,{["buff库"], [
#f_column{type = int, name = group_id, desc = "", mod = all}
,#f_column{type = int, name = buff_id, desc = "buff", mod = all}
,#f_column{type = int, name = weight, desc = "随机权重", mod = all}
,#f_column{type = kv, name = is_return, kv_type = bool, desc = "是否放回", mod = all}
]}
,{["加属性Buff数据"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = term, name = attr_ext, desc = "属性参数", mod = all}
]}
,{["第一次对话"], [
#f_column{type = term, name = condition, desc = "对话触发条件", mod = all}
,#f_column{type = int, name = id, desc = "对话Id", mod = all}
,#f_column{type = term, name = dialogue, desc = "对话", mod = client}
]}
,{["广告牌"], [
#f_column{type = int, name = id, desc = "id", mod = client}
,#f_column{type = bstr, name = btn_str, desc = "按钮名称", mod = client}
,#f_column{type = bstr, name = res_id, desc = "资源名称", mod = client}
,#f_column{type = bstr, name = title, desc = "标题", mod = client}
,#f_column{type = bstr, name = desc_1, desc = "描述内容1", mod = client}
,#f_column{type = bstr, name = desc_2, desc = "描述内容2", mod = client}
]}
,{["租借机器人库"], [
#f_column{type = int, name = min, desc = "战力下限", mod = all}
,#f_column{type = int, name = max, desc = "战力上限", mod = all}
,#f_column{type = int, name = robot, desc = "", mod = all}
]}
,{["租借机器人"], [
#f_column{type = int, name = id, desc = "id", mod = all}
,#f_column{type = int, name = group_id, desc = "库ID", mod = all}
,#f_column{type = int, name = weight, desc = "随机权重", mod = all}
,#f_column{type = int, name = bid, desc = "英雄基础id", mod = all}
,#f_column{type = int, name = lev, desc = "等级", mod = all}
,#f_column{type = int, name = star, desc = "星级", mod = all}
,#f_column{type = int, name = break_lev, desc = "突破等级", mod = all}
,#f_column{type = term, name = skills, desc = "技能", mod = all}
,#f_column{type = term, name = attr, desc = "总属性", mod = all, val = "[]"}
]}
]
}.
get(type) ->
[
{"空事件", 0}
,{"怪物", 1}
,{"守卫", 2}
,{"宝箱", 3}
,{"出生点", 4}
,{"告示牌", 5}
,{"获得道具", 6}
,{"英雄恢复(回复泉水)", 7}
,{"传送门", 8}
,{"英雄租借", 9}
,{"奖励Npc", 10}
,{"可破坏障碍", 11}
,{"开关", 12}
,{"升降台", 13}
,{"不可破坏障碍", 14}
,{"可选buff列表", 15}
,{"英雄恢复(复活祭坛)", 16}
%% ,{"钥匙宝箱", 4}
%% ,{"商人", 9}
%% ,{"唯一答案问答题", 11}
%% ,{"猜拳", 12}
];
get(reward_type) ->
[
{"获得物品", 1}
,{"获得道具(进玩法背包)", 2}
,{"掉落奖励", 3}
];
get(quality) ->
[
{"", 1}
,{"", 2}
,{"", 3}
];
get(buff_type) ->
[
{"加Buff", 1}
,{"加被动", 2}
];
get(_) ->
[].