%%%------------------------------------------------------------------- %%% @author liwl %%% @copyright (C) 2017, liwl %%% @doc %%% 离线竞技场 %%% @end %%% Created : 1 Apr 2017 by liwl %%%------------------------------------------------------------------- -module(arena_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = arena_data ,lua_name = arena_data ,desc = "竞技场" ,source = "arena_data.xml" ,target = "arena_data.erl" ,inc = ["common.hrl", "arena.hrl"] ,callback = [ {get_const, cb_fun, handle, {get_fun, ["常量表"], "get_const(~ts) -> ~ts; %% ~ts", [label, val, desc]}} ,{get_ref, cb_fun, handle, {get_record, ["刷新范围"], id, new_map, all}} ,{{get_score,"#{}"}, cb_fun, handle, {get_fun, ["基础奖励分"], "get_score(Score) when Score >= ~ts andalso Score =< ~ts -> ~ts;", [min_score, max_score, {rec, new_map, all}]}} ,{{cont_win,"#{}"}, cb_fun, handle, {get_record, ["连胜奖励"], num, new_map, all}} ,{{day_rank_reward, undefined}, cb_fun, handle, {get_fun, ["每日奖励"], "day_rank_reward(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, items]}} ,{{ref_num, -1}, cb_fun, handle, {get_fun, ["刷新次数"], "ref_num(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, cost]}} ,{{rank_reward, undefined}, cb_fun, handle, {get_fun, ["赛季排行奖励"], "rank_reward(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, items]}} ,{{vip_free, 0}, cb_fun, handle, {get_tuple, ["免费次数"], vip, free_times}} ,{{season_num_reward, "[]"}, cb_fun, handle, {get_tuple, ["宝箱奖励"], num, items}} ,{season_reward_list, cb_fun, handle, {list, ["宝箱奖励"]}} ] ,callback_cli =[ {base_awards, cb_fun_lua, handle, {key_val, ["刷新范围"], id, [items]}} ,{cup, cb_fun_lua, handle, {list_val, ["基础奖励分"], all}} ,{continue, cb_fun_lua, handle, {key_val, ["连胜奖励"], num, all}} ,{continue_list, cb_fun_lua, handle, {list_val, ["连胜奖励"], all}} ,{activity, cb_fun_lua, handle, {list_val, ["每日奖励"], all}} %% ,{buy, cb_fun_lua, handle, {key_val, ["购买次数"], num, [vip, cost]}} %%%,{refresh, cb_fun_lua, handle, {list_val, ["刷新次数"], all}} ,{season_num_reward, cb_fun_lua, handle, {list_val, ["宝箱奖励"], all}} ,{awards, cb_fun_lua, handle, {list_val, ["赛季排行奖励"], all}} ,{explain, cb_fun_lua, handle, {key_val, ["玩法说明"], [id], all}} ,{const, cb_fun_lua, handle, {key_val, ["常量表"], label, [val, desc]}} ] ,callback_json =[ {base_awards, cb_fun_json, handle, {key_val, ["刷新范围"], id, [items]}} ,{cup, cb_fun_json, handle, {list_val, ["基础奖励分"], all}} ,{continue, cb_fun_json, handle, {key_val, ["连胜奖励"], num, all}} ,{continue_list, cb_fun_json, handle, {list_val, ["连胜奖励"], all}} ,{activity, cb_fun_json, handle, {list_val, ["每日奖励"], all}} %% ,{buy, cb_fun_lua, handle, {key_val, ["购买次数"], num, [vip, cost]}} %%%,{refresh, cb_fun_lua, handle, {list_val, ["刷新次数"], all}} ,{season_num_reward, cb_fun_json, handle, {list_val, ["宝箱奖励"], all}} ,{awards, cb_fun_json, handle, {list_val, ["赛季排行奖励"], all}} ,{explain, cb_fun_json, handle, {key_val, ["玩法说明"], [id], all}} ,{const, cb_fun_json, handle, {key_val, ["常量表"], label, [val, desc]}} ] ,sheet = [ {["刷新范围"],[ #f_column{type = int, name = id, desc = "编号", mod = all} ,#f_column{type = term, name = score_range, desc = "积分范围", mod = all} ,#f_column{type = term, name = power_range, desc = "战力范围", mod = all} ,#f_column{type = term, name = items, 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 = int, name = index, desc = "序号", mod = all} ,#f_column{type = bstr, name = name, desc = "段位描述", mod = all} ,#f_column{type = int, name = min_score, desc = "积分下限", mod = all} ,#f_column{type = int, name = max_score, desc = "积分上限", mod = all} ]} ,{["连胜奖励"], [ #f_column{type = int, name = num, desc = "连胜次数", mod = all} ,#f_column{type = term, name = items, desc = "奖励道具", mod = all} ,#f_column{type = int, name = buff, desc = "BUFF加成", mod = all} ,#f_column{type = int, name = exp, 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 = min, desc = "购买次数下限", mod = all} ,#f_column{type = int, name = max, desc = "购买次数上限", mod = all} ,#f_column{type = int, name = cost, 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 = vip, desc = "VIP等级", mod = all} ,#f_column{type = int, name = free_times, desc = "免费次数", mod = all} ]} ,{["宝箱奖励"], [ #f_column{type = int, name = num, 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} ]} ,{["常量表"],[ #f_column{type = term, name = label, 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 = all} ] } ] }.