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

83 lines
5.2 KiB
Erlang
Raw Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 跨服天梯配置文件
%% @author yzq
%%----------------------------------------------------
-module(sky_ladder_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = sky_ladder_data
,lua_name = sky_ladder_data
,desc = "跨服天梯"
,source = "sky_ladder_data.xml"
,target = "sky_ladder_data.erl"
,inc = ["common.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{match_rank, cb_fun, handle, {get_fun, ["对手抽取"], "match_rank(Num) when Num >= ~ts andalso Num =< ~ts -> [~ts, ~ts, ~ts, ~ts, ~ts];", [min, max, fight1, fight2, fight3, fight4, fight5]}}
,{{day_rank_reward, undefined}, cb_fun, handle, {get_fun, ["每日结算奖励"], "day_rank_reward(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, items]}}
,{robot, cb_fun, handle, {get_fun, ["机器人配置"], "robot(Rank) when Rank >= ~ts andalso Rank =< ~ts -> {~ts, ~ts, ~ts};", [min, max, units, rand, lev]}}
,{{best_rank_reward, undefined}, cb_fun, handle, {get_fun, ["首次排名奖励"], "best_rank_reward(Num) when Num >= ~ts andalso Num =< ~ts -> {~ts, ~ts, ~ts};", [min, max, min, max, reward]}}
,{max_best_rank, cb_fun, handle, {get_max, ["首次排名奖励"], max}}
,{{buy_num, undefined}, cb_fun, handle, {get_record, ["购买次数"], num, new_map, all}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{award, cb_fun_lua, handle, {key_val, ["每日结算奖励"], max, [max, min, items]}}
,{buy_num, cb_fun_lua, handle, {key_val, ["购买次数"], num, [vip, cost]}}
,{explain, cb_fun_lua, handle, {key_val, ["玩法说明"], [id], all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{award, cb_fun_json, handle, {key_val, ["每日结算奖励"], max, [max, min, items]}}
,{buy_num, cb_fun_json, handle, {key_val, ["购买次数"], num, [vip, cost]}}
,{explain, cb_fun_json, handle, {key_val, ["玩法说明"], [id], 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 = int, name = max, desc = "排名下限", mod = all}
,#f_column{type = int, name = min, desc = "排名上限", mod = all}
,#f_column{type = term, name = fight1, desc = "对手1", add_list_sign = false, mod = all}
,#f_column{type = term, name = fight2, desc = "对手2", add_list_sign = false, mod = all}
,#f_column{type = term, name = fight3, desc = "对手3", add_list_sign = false, mod = all}
,#f_column{type = term, name = fight4, desc = "对手4", add_list_sign = false, mod = all}
,#f_column{type = term, name = fight5, desc = "对手5", add_list_sign = false, mod = all}
]}
,{["机器人配置"],[
#f_column{type = int, name = max, desc = "排名下限", mod = all}
,#f_column{type = int, name = min, desc = "排名上限", mod = all}
,#f_column{type = term, name = units, desc = "场景单位", mod = all}
,#f_column{type = term, name = rand, desc = "波动范围", add_list_sign = false, mod = all}
,#f_column{type = int, name = lev, desc = "机器人等级", mod = all}
]}
,{["每日结算奖励"],[
#f_column{type = int, name = max, desc = "排名下限", mod = all}
,#f_column{type = int, name = min, desc = "排名上限", mod = all}
,#f_column{type = term, name = items, desc = "奖励内容", mod = all}
]}
,{["首次排名奖励"],[
#f_column{type = int, name = max, desc = "历史最高排名下限", mod = all}
,#f_column{type = int, name = min, desc = "历史最高排名上限", mod = all}
,#f_column{type = term, name = reward, desc = "奖励内容", val = "[]", mod = all}
]}
,{["购买次数"], [
#f_column{type = int, name = num, desc = "购买次数", mod = all}
,#f_column{type = int, name = vip, desc = "VIP限制", mod = all}
,#f_column{type = int, name = cost, 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}
]}
]
}.