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

140 lines
8.6 KiB
Erlang

%%----------------------------------------------------
%% 无尽试炼配置文件
%% @author yzq
%%----------------------------------------------------
-module(endless_data).
-export([
cfg/0
,get/1
]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = endless_data
,lua_name = endless_data
,desc = "无尽试炼"
,source = "endless_data.xml"
,target = "endless_data.erl"
,inc = ["common.hrl","endless.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{get, cb_fun, handle, {get_record, ["关卡配置"], [type, id], endless_data, all}}
,{list_ext_reward, cb_fun, handle, {tuple_list, ["首通奖励"], [id, type]}}
,{ext_reward, cb_fun, handle, {get_record, ["首通奖励"], [id, type], new_map, all}}
,{get_buff, cb_fun, handle, {get_record, ["BUFF"], id, new_map, all}}
,{buff_type, cb_fun, handle, {record_type, ["BUFF"], group_id, new_map, [id, condition, weight]}}
,{day_reward, cb_fun, handle, {get_tuple, ["每日层数奖励"], [id, type], items}}
,{rank_reward, cb_fun, handle, {get_fun, ["排行奖励"], "rank_reward({~ts, Idx}) when Idx >= ~ts andalso Idx =< ~ts -> ~ts;", [type, min, max, items]}}
,{robot_group, cb_fun, handle, {get_fun, ["机器人组"], "robot_group(Lev) when Lev >= ~ts andalso Lev =< ~ts -> ~ts;", [min, max, group_id]}}
,{robot_list, cb_fun, handle, {record_type, ["机器人"], group_id, endless_robot_data, all}}
,{get_robot, cb_fun, handle, {get_record, ["机器人"], id, endless_robot_data ,all}}
,{get_all_type, cb_fun, handle, {tuple_list, ["新无尽试炼类型"], [id, type, day]}}
,{get_all_day, cb_fun, handle, {tuple_list, ["新无尽试炼类型"], day}}
,{{get_limit_partner_list, undefined}, cb_fun, handle, {get_tuple, ["新无尽试炼类型"], type, bids}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{buff_data, cb_fun_lua, handle, {type_get_val, ["BUFF"], [group_id,id], all}}
,{first_data, cb_fun_lua, handle, {type_get_val, ["首通奖励"], [type,id], all}}
,{floor_data, cb_fun_lua, handle, {type_get_val, ["每日层数奖励"], [type,id], all}}
,{rank_reward_data, cb_fun_lua, handle, {list_val, ["排行奖励"],[type], all}}
,{explain, cb_fun_lua, handle, {type_get_val, ["玩法说明"], [type,id], all}}
,{new_type, cb_fun_lua, handle, {key_val, ["新无尽试炼类型"], [type], all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{buff_data, cb_fun_json, handle, {type_get_val, ["BUFF"], [group_id,id], all}}
,{first_data, cb_fun_json, handle, {key_val, ["首通奖励"], [id], all}}
,{floor_data, cb_fun_json, handle, {key_val, ["每日层数奖励"], [id], all}}
,{rank_reward_data, cb_fun_json, handle, {list_val, ["排行奖励"], all}}
,{explain, cb_fun_json, handle, {key_val, ["玩法说明"], [id], all}}
,{new_type, cb_fun_json, handle, {key_val, ["新无尽试炼类型"], [type], all}}
]
,sheet = [
{["常量配置"],[
#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 = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "类型"}
,#f_column{type = int, name = id, desc = "关卡ID", mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = lev, desc = "关卡等级", mod = all}
,#f_column{type = term, name = unit_ids, desc = "怪物Id", mod = all}
,#f_column{type = kv, name = is_reset, desc = "是否回血", kv_type = bool}
,#f_column{type = term, name = formation, desc = "阵法", add_list_sign = false, mod = all}
]}
,{["BUFF"], [
#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 = skill_id, desc = "技能ID", mod = all}
,#f_column{type = int, name = round, desc = "持续关数", mod = all}
,#f_column{type = term, name = condition, desc = "触发条件", add_list_sign = false, val = {undefined}, mod = server}
,#f_column{type = int, name = weight, desc = "随机权重", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = bstr, name = battle_desc, desc = "战斗描述", mod = all}
,#f_column{type = bstr, name = icon, desc = "图标", mod = all}
]}
,{["首通奖励"], [
#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "类型"}
,#f_column{type = int, name = limit_id, desc = "通关层数",mod = all}
,#f_column{type = term, name = items, desc = "奖励列表",mod = all}
]}
,{["每日层数奖励"], [
#f_column{type = int, name = id, desc = "层数", mod = all}
,#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "类型"}
,#f_column{type = term, name = items, desc = "奖励", mod = all}
]}
,{["排行奖励"], [
#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "类型"}
,#f_column{type = int, name = min, desc = "排名上限", mod = all}
,#f_column{type = int, name = max, desc = "排名下限", mod = all}
,#f_column{type = term, name = items, desc = "奖励", mod = all}
]}
,{["机器人组"], [
#f_column{type = int, name = group_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 = int, name = id, desc = "机器人id", mod = all}
,#f_column{type = int, name = group_id, desc = "组id", mod = all}
,#f_column{type = int, name = bid, desc = "英雄bid", mod = all}
,#f_column{type = str, name = rname, desc = "来自好友名字", mod = all}
,#f_column{type = int, name = unit_id, desc = "对应怪物Id", mod = all}
,#f_column{type = int, name = power, desc = "显示战力", 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 = type, desc = "类型", mod = client}
,#f_column{type = int, name = id, desc = "标签", mod = client}
,#f_column{type = str, name = title, desc = "标签名", mod = client}
,#f_column{type = str, name = desc, desc = "内容", mod = client}
]}
,{["新无尽试炼类型"], [
#f_column{type = int, name = id, desc = "唯一id", mod = all}
,#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "类型", mod = all}
,#f_column{type = int, name = day, desc = "天数", mod = all}
,#f_column{type = term, name = bids, add_list_sign = false, desc = "不可上阵英雄bid", mod = all, val = "[]"}
,#f_column{type = str, name = title, desc = "标题", mod = all}
,#f_column{type = str, name = icon, desc = "图标", mod = all}
,#f_column{type = str, name = describe, desc = "描述", mod = all}
]}
]
}.
get(type) ->
[
{"水无尽", 1}
,{"火无尽", 2}
,{"风无尽", 3}
,{"光暗无尽", 4}
,{"老版无尽", 5}
];
get(_) ->
[].