%%%------------------------------------------------------------------- %%% @author Administrator %%% @copyright (C) 2024, %%% @doc %%% %%% @end %%% Created : 23. 4月 2024 10:06 %%%------------------------------------------------------------------- -module(happy_challenge_data). -author("Administrator"). %% API -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = happy_challenge_data ,lua_name = happy_challenge_data ,desc = "" ,source = "happy_challenge_data.xml" ,target = "happy_challenge_data.erl" ,inc = [] ,callback = [ {get_const, cb_fun, handle, {get_fun, ["常量"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{get_defend_id, cb_fun, handle, {get_tuple, ["迷窟BOSS配置"], id, target_id}} ,{get_name, cb_fun, handle, {get_tuple, ["迷窟BOSS配置"], id, name}} ,{get_rank, cb_fun, handle, {get_tuple, ["迷窟BOSS配置"], id, rank_id}} ,{get_rank_type, cb_fun, handle, {get_tuple, ["迷窟BOSS配置"], id, type}} ,{get_reward, cb_fun, handle, {get_tuple, ["进度奖励"], [id, pace_id], [num, reward]}} ,{get_reward_list, cb_fun, handle, {tuple_list, ["进度奖励"], pace_id}} ,{{rank_reward, undefined}, cb_fun, handle, {get_fun, ["排行榜奖励"], "rank_reward({CampId, Num}) when Num >= ~ts andalso Num =< ~ts andalso CampId == ~ts -> ~ts;", [min, max, camp_id, items]}} ] ,callback_cli = [ ] ,callback_json = [ {const, cb_fun_json, handle, {key_val, [ "常量"], [key], all}}, {get_info, cb_fun_json, handle, {key_val, ["进度奖励"], [id, pace_id], all}} ,{info, cb_fun_json, handle, {key_val, ["迷窟BOSS配置"], [id], all}} ,{awards, cb_fun_json, handle, {list_val, ["排行榜奖励"], all}} ,{explain, cb_fun_json, handle, {key_val, ["规则说明"], [id], all}} ] ,sheet = [ {["进度奖励"], [#f_column{desc = "活动id", type = int, name = id, mod = all} , #f_column{desc = "进度id", type = int, name = pace_id, mod = all} , #f_column{desc = "达成数值", type = int, name = num, mod = all} , #f_column{desc = "奖励", type = term, name = reward, mod = all} ]} ,{["迷窟BOSS配置"], [ #f_column{type = int, name = id, desc = "活动id", mod = all} ,#f_column{type = int, name = target_id, desc = "关卡目标怪物id", mod = all} ,#f_column{type = str, name = name, desc = "关卡名称", mod = all} ,#f_column{type = kv, name = type, desc = "榜单类型", kv_type = [{"输出", 1}, {"治疗", 2}], mod = all} ,#f_column{type = int, name = rank_id, desc = "榜单id", mod = all} ,#f_column{type = bstr, name = spine, desc = "立绘", mod = client} ]}, {["常量"], [ #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 = camp_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 = 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} ]} ] }.