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

70 lines
4.0 KiB
Erlang
Raw Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 数据配置文件
%% @author whjing2011@gmail.com
%%----------------------------------------------------
-module(arena_champion_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = arena_champion_data
,lua_name = arena_champion_data
,desc = "配置数据"
,source = "arena_champion_data.xml"
,target = "arena_champion_data.erl"
,inc = []
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{get_robot, cb_fun, handle, {get_record, ["参赛机器人"], id, new_map, all}}
,{match_powers, cb_fun, handle, {get_tuple, ["参赛玩家镜像匹配"], id, powers}}
,{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]}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{awards, cb_fun_lua, handle, {list_val, ["排名奖励"], all}}
,{explain, cb_fun_lua, handle, {key_val, ["玩法说明"], [id], all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{awards, cb_fun_json, handle, {list_val, ["排名奖励"], all}}
,{explain, cb_fun_json, handle, {key_val, ["玩法说明"], [id], all}}
]
,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 = "编号", 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 = id, desc = "编号", mod = all}
,#f_column{type = term, name = powers, 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 = "排名范围", 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 = 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}
]}
]
}.