Files
fc/server/tools/gen_data/cfg/arena_peak_champion_data.erl
2026-05-23 22:10:14 +08:00

100 lines
5.9 KiB
Erlang

%%----------------------------------------------------
%% 巅峰冠军赛
%%
%% @author liufenglin 240039421@qq.com
%%----------------------------------------------------
-module(arena_peak_champion_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = arena_peak_champion_data
,lua_name = arena_peak_champion_data
,desc = "精英赛配置数据"
,source = "arena_peak_champion_data.xml"
,target = "arena_peak_champion_data.erl"
,inc = ["partner.hrl", "common.hrl", "attr.hrl"]
,callback = [
{{get_constant, "undefined"}, cb_fun, handle, {get_tuple, ["常量配置"], code, val}}
,{get_robot, cb_fun, handle, {get_record, ["参赛机器人"], [robot_type, id], new_map, all}}
,{get_score_match, cb_fun, handle, {get_fun, ["积分赛抽取"], "get_score_match({~ts,Rank}) when Rank > ~ts andalso Rank =< ~ts -> ~ts;", [id, min, max, {rec, new_map, all}]}}
,{{rank_reward, undefined}, cb_fun, handle, {get_fun, ["排名奖励"], "rank_reward(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, items]}}
,{{get_robot_type, undefined}, cb_fun, handle, {get_fun, ["机器人战力范围"], "get_robot_type(Power) when Power >= ~ts andalso Power =< ~ts -> ~ts;", [min, max, robot_type]}}
,{{get_score, "0"}, cb_fun, handle, {get_tuple, ["初始积分"], rank, score}}
,{get_256_group, cb_fun, handle, {tuple_list, ["晋级赛分组"], [id, rank_list]}}
,{get_64_group, cb_fun, handle, {tuple_list, ["64强分组"], [id, rank_list]}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], code, [val, desc]}}
,{rank_reward, cb_fun_lua, handle, {list_val, ["排名奖励"], [min, max, awards]}}
,{explain, cb_fun_lua, handle, {key_val, ["玩法说明"], [id], all}}
,{explain_guess, cb_fun_lua, handle, {key_val, ["竞猜说明"], [id], all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], code, [val, desc]}}
,{rank_reward, cb_fun_json, handle, {list_val, ["排名奖励"], [min, max, awards]}}
,{explain, cb_fun_json, handle, {key_val, ["玩法说明"], [id], all}}
,{explain_guess, cb_fun_json, handle, {key_val, ["竞猜说明"], [id], all}}
]
,sheet = [
{["常量配置"], [
#f_column{type = atom, name = code, desc = "", mod = all}
,#f_column{type = term, name = val, desc = "", mod = all,val_cli="{}", add_list_sign = false}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
]}
,{["参赛机器人"],[
#f_column{type = int, name = id, desc = "编号", mod = all}
,#f_column{type = term, name = robot, desc = "机器人匹配", mod = all}
,#f_column{type = term, name = robot_power, desc = "机器人属性修正", mod = all}
,#f_column{type = term, name = robot_lev, desc = "机器人等级修正", mod = all}
,#f_column{type = int, name = score, desc = "机器人积分偏值", mod = all}
,#f_column{type = int, name = robot_type, desc = "类型", mod = all}
]}
,{["积分赛抽取"],[
#f_column{type = int, name = id, 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 = rank, desc = "排名抽取范围", add_list_sign = false, mod = all}
,#f_column{type = int, name = score, desc = "胜利积分", mod = all}
]}
,{["初始积分"], [
#f_column{type = int, name = rank, desc = "跨服天梯排名", mod = all}
,#f_column{type = int, name = score, 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 = items, desc = "奖励", mod = all}
,#f_column{type = term, name = awards, desc = "展示用奖励", 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_type, desc = "机器人类型", mod = all}
]}
,{["晋级赛分组"], [
#f_column{type = int, name = id, desc = "", primary = true, mod = server}
,#f_column{type = term, name = rank_list, desc = "排名顺序", add_list_sign = false, mod = server}
]}
,{["64强分组"], [
#f_column{type = int, name = id, desc = "", primary = true, mod = server}
,#f_column{type = term, name = rank_list, desc = "排名顺序", add_list_sign = false, mod = server}
]}
,{["玩法说明"], [
#f_column{type = int, name = id, desc = "标签", primary = true, 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 = "标签", primary = true, mod = client}
,#f_column{type = str, name = title, desc = "标签名", mod = client}
,#f_column{type = str, name = desc, desc = "内容", mod = client}
]}
]
}.