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

84 lines
5.2 KiB
Erlang

%%----------------------------------------------------
%% 活动boss
%%
%% @author liufenglin 240039421@qq.com
%%----------------------------------------------------
-module(holiday_boss_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = holiday_boss_data
,lua_name = holiday_boss_data
,desc = "竞技场"
,source = "holiday_boss_data.xml"
,target = "holiday_boss_data.erl"
,inc = ["common.hrl"]
,callback = [
{get_const, cb_fun, handle, {get_fun, ["常量表"], "get_const(~ts) -> ~ts; %% ~ts", [label, val, desc]}}
,{max_order, cb_fun, handle, {get_max, ["boss信息"], order_id}}
,{get_add_skills, cb_fun, handle, {get_tuple, ["boss信息"], order_id, add_skills}}
,{get_unit_id, cb_fun, handle, {get_tuple, ["boss信息"], order_id, unit_id}}
,{{get_score, "{0, 0}"}, cb_fun, handle, {get_tuple, ["boss信息"], order_id, [dps_score, kill_score]}}
,{{buy_count, undefined}, cb_fun, handle, {get_fun, ["购买次数"], "buy_count(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, expend]}}
,{{rank_reward, undefined}, cb_fun, handle, {get_fun, ["排行奖励"], "rank_reward(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, items]}}
,{{get_award_info, "[]"}, cb_fun, handle, {get_tuple, ["宝箱奖励"], id, [num, items]}}
,{award_list, cb_fun, handle, {list, ["宝箱奖励"]}}
]
,callback_cli =[
{const, cb_fun_lua, handle, {key_val, ["常量表"], [label], all}}
,{boss_info, cb_fun_lua, handle, {val_str, ["boss信息"], [order_id], all}}
,{boss_group, cb_fun_lua, handle, {list_val, ["boss信息"], [group_id], [order_id]}}
,{buy_info, cb_fun_lua, handle, {list_val, ["购买次数"],all}}
,{rank_info, cb_fun_lua, handle, {list_val, ["排行奖励"],all}}
,{reward_info, cb_fun_lua, handle, {list_val, ["宝箱奖励"], all}}
]
,callback_json =[
{const, cb_fun_json, handle, {key_val, ["常量表"], [label], all}}
,{boss_info, cb_fun_json, handle, {val_str, ["boss信息"], [order_id], all}}
,{boss_group, cb_fun_json, handle, {list_val, ["boss信息"], [group_id], [order_id]}}
,{buy_info, cb_fun_json, handle, {list_val, ["购买次数"],all}}
,{rank_info, cb_fun_json, handle, {list_val, ["排行奖励"],all}}
,{reward_info, cb_fun_json, handle, {list_val, ["宝箱奖励"], all}}
]
,sheet = [
{["boss信息"],[
#f_column{type = int, name = order_id, desc = "关卡id", mod = all}
,#f_column{type = term, name = add_skills, desc = "我方增加的技能", val = "[]", mod = all}
,#f_column{type = term, type_func = str, name = add_skill_decs, desc = "关卡技能描述", mod = client, add_list_sign = false}
,#f_column{type = int, name = unit_id, desc = "怪物id", mod = all}
,#f_column{type = int, name = star, desc = "怪物星级", mod = client}
,#f_column{type = int, name = head_id, desc = "怪物头像id", mod = client}
,#f_column{type = int, name = head_half_id, desc = "怪物半身像id", mod = client}
,#f_column{type = bstr, name = name, desc = "怪物名字", mod = client}
,#f_column{type = bstr, name = level, desc = "怪物等级", mod = client}
,#f_column{type = int, name = dps_score, desc = "伤害总积分", mod = all}
,#f_column{type = int, name = kill_score, desc = "占领积分", mod = all}
,#f_column{type = int, name = group_id, desc = "怪物组", mod = client}
]
}
,{["购买次数"], [
#f_column{type = int, name = min, desc = "购买次数下限", mod = all}
,#f_column{type = int, name = max, desc = "购买次数上限", mod = all}
,#f_column{type = term, name = expend, 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 = "奖励id", mod = all}
,#f_column{type = int, name = num, desc = "挑战积分", mod = all}
,#f_column{type = term, name = items, desc = "奖励", mod = all}
]}
,{["常量表"],[
#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}
]
}
]
}.