Files
2026-05-23 22:10:14 +08:00

174 lines
13 KiB
Erlang

%%----------------------------------------------------
%% 数据配置文件
%% @author whjing2011@gmail.com
%%----------------------------------------------------
-module(dungeon_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = dungeon_data
,lua_name = dungeon_data
,desc = "副本配置数据"
,source = "dungeon_data.xml"
,target = "dungeon_data.erl"
,inc = ["common.hrl", "dungeon.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{list_chapter, cb_fun, handle, {tuple_type, ["世界地图"], mode, chapter_id}}
,{list, cb_fun, handle, {tuple_type, ["剧情副本"], [mode, chapter_id], id}}
,{get, cb_fun, handle, {get_record, ["剧情副本"], id, dungeon_data, all}}
,{{fast_combat_num, undefined}, cb_fun, handle, {get_tuple, ["作战消耗"], key, [vip_limit, cost]}}
,{list_ext_reward, cb_fun, handle, {list, ["通关奖励"]}}
,{ext_reward, cb_fun, handle, {get_record, ["通关奖励"], id, new_map, all}}
,{list_special, cb_fun, handle, {get_record, ["通关特殊奖励"], id, new_map, all}}
]
,callback_cli = [
{drama_info, cb_fun_lua, handle, {type_get_val, ["剧情副本"], [mode,chapter_id,id],[id,is_big]}}
,{drama_dungeon_info, cb_fun_lua, handle, {val_str, ["剧情副本"], [id],[name,mode,chapter_id,land_id,id,next_id,show_items,is_big,hook_items,hook_show_items,hook_lev_add,pos,unit_id,power,per_hook_items, talk_ids,energy_max, quick_show_items, lev_limit, floor]}}
,{drama_const, cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}}
,{drama_world_info, cb_fun_lua, handle, {type_get_val, ["世界地图"], [mode,chapter_id], all}}
,{drama_quick_desc, cb_fun_lua, handle, {key_val, ["快速作战"], [key], all}}
,{drama_quick_cost, cb_fun_lua, handle, {key_val, ["作战消耗"], [key], all}}
,{drama_talk, cb_fun_lua, handle, {format, ["假战斗闲话"], "[~ts]=[[~ts]]", [id, talk]}}
,{drama_reward, cb_fun_lua, handle, {key_val, ["通关奖励"], [id], all}}
,{drama_show_reward, cb_fun_lua, handle, {list_val, ["奖励总览"], [id,name,items], true,false}}
,{drama_boss_show_reward, cb_fun_lua, handle, {type_get_val, ["Boos关卡奖励预览"], [id,dungeon_id], all}}
]
,callback_json = [
{drama_info, cb_fun_json, handle, {type_get_val, ["剧情副本"], [mode,chapter_id,id],[id,is_big]}}
,{drama_dungeon_info, cb_fun_json, handle, {key_val, ["剧情副本"], [id],[name,mode,chapter_id,land_id,id,next_id,show_items,is_big,hook_items,hook_show_items,hook_lev_add,pos,unit_id,power,per_hook_items, talk_ids,energy_max, quick_show_items, lev_limit, floor, level_name, desc]}}
,{drama_const, cb_fun_json, handle, {key_val, ["常量配置"], [key], all}}
,{drama_boss_desc, cb_fun_json, handle, {key_val, ["关卡BOSS描述"], [id], all}}
,{drama_world_info, cb_fun_json, handle, {type_get_val, ["世界地图"], [mode,chapter_id], all}}
,{drama_quick_desc, cb_fun_json, handle, {key_val, ["快速作战"], [key], all}}
,{drama_quick_cost, cb_fun_json, handle, {key_val, ["作战消耗"], [key], all}}
,{drama_talk, cb_fun_json, handle, {key_val, ["假战斗闲话"],[id], all}}
,{drama_reward, cb_fun_json, handle, {key_val, ["通关奖励"], [id], all}}
,{drama_special_reward, cb_fun_json, handle, {key_val, ["通关特殊奖励"], [id], all}}
,{drama_show_reward, cb_fun_json, handle, {list_val, ["奖励总览"], [id,name,items], true,false}}
,{drama_boss_show_reward, cb_fun_json, handle, {type_get_val, ["Boos关卡奖励预览"], [id,dungeon_id], all}}
,{drama_story_info, cb_fun_json, handle, {type_get_val, ["剧情回忆"], [id,order_id], all}}
,{drama_story_info_h, cb_fun_json, handle, {type_get_val, ["H剧情回忆"], [id,order_id], all}}
]
,sheet = [
{["剧情副本"], [
#f_column{type = int, name = id, desc = "关卡ID", mod = all, primary = true}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = chapter_id, desc = "章节Id", mod = all}
,#f_column{type = int, name = land_id, desc = "大陆板块", mod = client}
,#f_column{type = int, name = mode, desc = "难度模式", mod = all}
,#f_column{type = int, name = next_id, desc = "下个关卡", mod = all}
,#f_column{type = int, name = unit_id, desc = "战斗单位", mod = all}
,#f_column{type = term, name = items, desc = "固定奖励", mod = all}
,#f_column{type = term, name = drop_ids, desc = "掉落ID"}
,#f_column{type = term, name = show_items, desc = "奖励展示", mod = client}
,#f_column{type = int, name = hook_unit_id, desc = "挂机单位", mod = all}
,#f_column{type = term, name = hook_items, desc = "挂机固定奖励", mod = all}
,#f_column{type = term, name = hook_drop_ids, desc = "挂机掉落ID"}
,#f_column{type = term, name = hook_show_items, desc = "挂机奖励展示", mod = client}
,#f_column{type = int, name = time, desc = "挑战冷却", mod = all}
,#f_column{type = int, name = is_big, desc = "大关卡", mod = all}
,#f_column{type = term, name = pos, desc = "地图位置", mod = client}
,#f_column{type = int, name = power, desc = "战力展示", mod = all}
,#f_column{type = term, name = per_hook_items, desc = "每分钟奖励展示", mod = client}
,#f_column{type = term, name = talk_ids, desc = "闲话列表", mod = client}
,#f_column{type = int, name = energy_max, desc = "冒险值上限", mod = all}
,#f_column{type = term, name = quick_show_items, desc = "快速作战提示", mod = client}
,#f_column{type = int, name = lev_limit, desc = "等级限制", mod = all}
,#f_column{type = int, name = floor, desc = "第几关", mod = all}
,#f_column{type = term, name = hook_lev_add, desc = "挂机奖励等级增益", mod = all}
,#f_column{type = int, name = special_items, desc = "特殊奖励", mod = client}
,#f_column{type = term, name = level_name, desc = "关卡", mod = client}
,#f_column{type = str, name = desc, desc = "剧情描述", mod = client}
]}
,{["剧情回忆"],[
#f_column{type = int, name = id, desc = "章节id",mod = client}
,#f_column{type = int, name = order_id, desc = "剧情幕id",mod = client}
,#f_column{type = int, name = story_id, desc = "剧情幕id",mod = client}
,#f_column{type = bstr, name = title, desc = "剧情幕标题", mod = client}
,#f_column{type = int, name = dun, desc = "解锁条件", mod = client}
,#f_column{type = bstr, name = unlock_desc, desc = "解锁描述",mod = client}
,#f_column{type = bstr, name = desc, desc = "剧情描述", mod = client}
,#f_column{type = int, name = show, desc = "显示", mod = client}
]}
,{["H剧情回忆"],[
#f_column{type = int, name = id, desc = "章节id",mod = client}
,#f_column{type = int, name = order_id, desc = "剧情幕id",mod = client}
,#f_column{type = bstr, name = story_id, desc = "剧情幕id",mod = client}
,#f_column{type = bstr, name = title, desc = "剧情幕标题", mod = client}
,#f_column{type = int, name = dun, desc = "解锁条件", mod = client}
,#f_column{type = bstr, name = unlock_desc, desc = "解锁描述",mod = client}
,#f_column{type = bstr, name = desc, desc = "剧情描述", mod = client}
,#f_column{type = int, name = show, desc = "显示", mod = client}
,#f_column{type = bstr, name = bg, desc = "底图", mod = client}
]}
,{["关卡BOSS描述"],[
#f_column{type = int, name = id, desc = "关卡ID",mod = all}
,#f_column{type = bstr, name = desc, desc = "描述",mod = all}
,#f_column{type = bstr, name = style, desc = "地板样式", mod = all}
]}
,{["世界地图"], [
#f_column{type = int, name = chapter_id, desc = "章节Id", mod = all, primary = true}
,#f_column{type = int, name = mode, desc = "难度模式", mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = map_id, desc = "关卡地图", mod = all}
,#f_column{type = bstr, name = map_tips, desc = "地图说明", mod = all}
,#f_column{type = bstr, name = tips_img, desc = "说明资源", mod = all}
,#f_column{type = term, name = map_speed, desc = "地图速度", mod = all}
]}
,{["常量配置"],[
#f_column{type = term, name = key, desc = "常量标识", add_list_sign = false,mod = all}
,#f_column{type = term, name = val, desc = "常量值", add_list_sign = false,mod= all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
]}
,{["快速作战"],[
#f_column{type = int, name = key, desc = "序号",mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
]}
,{["作战消耗"],[
#f_column{type = int, name = key, desc = "序号",mod = all}
,#f_column{type = int, name = vip_limit, desc = "VIP限制",mod = all}
,#f_column{type = int, name = cost, desc = "消耗", mod = all}
]}
,{["假战斗闲话"],[
#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = str, name = talk, desc = "闲话描述",mod = all}
,#f_column{type = int, name = min_lev, desc = "等级开放区间下",mod = client}
,#f_column {type = int, name = max_lev, desc = "等级开放区间上", mod = client }
]}
,{["通关奖励"], [
#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = int, name = limit_id, desc = "达成要求",mod = all}
,#f_column{type = int, name = sort, desc = "排序",mod = client}
,#f_column{type = int, name = icon, desc = "图标ID",mod = client}
,#f_column{type = term, name = items, desc = "奖励列表",mod = all}
,#f_column{type = bstr, name = desc, desc = "描述",mod = client}
,#f_column {type = bstr, name = title_res, desc = "标题资源", mod = client }
,#f_column {type = bstr, name = extend_icon, desc = "是否使用额外图标", mod = client }
,#f_column{type = bstr, name = notice, desc = "公告内容", mod = all}
,#f_column{type = term, name = special_items, desc = "特殊奖励", mod = all}
,#f_column {type = bstr, name = prediction_desc, desc = "预告描述", mod = client }
,#f_column {type = bstr, name = is_prediction, desc = "是否预告", mod = client }
]}
,{["通关特殊奖励"], [
#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = int, name = limit_id, desc = "达成要求",mod = all}
,#f_column{type = term, name = special_items, desc = "特殊奖励", mod = all}
]}
,{["奖励总览"], [
#f_column{type = int, name = id, desc = "关卡ID", mod = all}
,#f_column{type = bstr, name = name, desc = "名称",mod = all}
,#f_column{type = term, name = items, desc = "奖励展示",mod = all}
]}
,{["Boos关卡奖励预览"], [
#f_column{type = int, name = id, desc = "章节ID", mod = client}
,#f_column{type = int, name = dungeon_id, desc = "副本ID",mod = client}
,#f_column{type = term, name = items, desc = "奖励展示",mod = client}
]}
]
}.