Files

233 lines
17 KiB
Erlang
Raw Permalink Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% "圣器"
%%
%% @author yzq 741287960@qq.com
%%----------------------------------------------------
-module(hallows_data).
-author("Administrator").
-include("common.hrl").
-include("data_config.hrl").
%% API
-export([cfg/0]).
cfg() ->
#data_cfg{
name = hallows_data
,lua_name = hallows_data
,desc = "圣器配置数据"
,source = "hallows_data.xml"
,target = "hallows_data.erl"
,inc = ["common.hrl", "attr.hrl","hallows.hrl", "quest.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{get_type_list, cb_fun, handle, {list, ["圣器"]}}
,{get, cb_fun, handle, {get_record, ["圣器"], [id,step], hallows_data, all}}
,{{lucky_rate, 0}, cb_fun, handle, {get_fun, ["幸运值"], "lucky_rate({~ts, Lucky}) when ~ts =< Lucky andalso Lucky =< ~ts -> ~ts;", [id, min, max, rate]}}
,{lucky_rand, cb_fun, handle, {tuple_list, ["幸运值权重"], [val, weight]}}
,{get_skill, cb_fun, handle, {get_tuple, ["圣技升级"], [hallows_id, lev], [skill_bid, lose, lev_limit]}}
,{skill_attr, cb_fun, handle, {tuple_type, ["技能属性加成"], hallows_id, [attr, lev_limit]}}
,{{seal_limit, 0}, [{data_reverse, 1}], cb_fun, handle, {get_fun, ["圣印"], "seal_limit({~ts, Step}) when Step >= ~ts -> ~ts;", [id, step_limit, num]}}
,{{career_ratio, 0}, cb_fun, handle, {get_tuple, ["属性系数"], type, ratio}}
,{list_quest, cb_fun, handle, {list, ["激活任务"]}}
,{type_quest, cb_fun, handle, {tuple_type, ["激活任务"], hid, id}}
,{get_quest, cb_fun, handle, {get_record, ["激活任务"], id, hallows_quest_data, all}}
,{get_attr, cb_fun, handle, {get_record, ["圣器战斗属性"], [id, step], attr, attr}}
,{look_list_quest, cb_fun, handle, {list, ["幻化任务解锁"]}}
,{look_type_quest, cb_fun, handle, {tuple_type, ["幻化任务解锁"], hid, id}}
,{get_look_quest, cb_fun, handle, {get_record, ["幻化任务解锁"], id, hallows_quest_data, all}}
,{get_look, cb_fun, handle, {get_record, ["神器幻化"], id, hallows_look_data, all}}
,{{get_look_attr, "[]"}, cb_fun, handle, {get_tuple, ["神器幻化"], id, attr}}
,{{skill_look_bid, "0"}, cb_fun, handle, {get_tuple, ["技能幻化"], [skill_bid, look_id], look_skill_bid}}
,{{skill_look_order, "[]"}, cb_fun, handle, {get_tuple, ["技能幻化出招顺序"], [hallows_id, look_id], look_skill_order}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{max_lev, cb_fun_lua, handle, {type_get_max, [ "圣器"], [id], step}}
,{base, cb_fun_lua, handle, {type_get_last_row, [ "圣器"], [id], [id, name, effect, item_id, c_res_id]}}
,{info, cb_fun_lua, handle, {val_str, [ "圣器"], [id,step], [id, step, name, attr, loss, max_lucky,clear_limit,clear_time,notice,effect]}}
,{skill_up, cb_fun_lua, handle, {val_str, ["圣技升级"], [hallows_id, lev], [lose, skill_bid, lev_limit]}}
,{skill_max_lev, cb_fun_lua, handle, {type_get_max, [ "圣技升级"], [hallows_id], lev}}
,{trace_cost, cb_fun_lua, handle, {val_str, ["圣印"], [id, step_limit], [num]}}
,{attr_radio, cb_fun_lua, handle, {key_val, ["属性系数"], [type], all}}
,{task, cb_fun_lua, handle, {key_val, ["激活任务"], id, [id, hid, items, progress, extra, desc]}}
,{task_info, cb_fun_lua, handle, {type_val, ["激活任务"], [hid], id}}
,{skill_attr, cb_fun_lua, handle, {type_get_val, ["技能属性加成"], [hallows_id, attr_id], all}}
,{magic, cb_fun_lua, handle, {key_val, ["神器幻化"], [id], all}}
,{magic_task, cb_fun_lua, handle, {key_val, ["幻化任务解锁"], id, [id, hid, items, progress, extra, desc]}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{max_lev, cb_fun_json, handle, {type_get_max, [ "圣器"], [id], step}}
,{base, cb_fun_json, handle, {type_get_last_row, [ "圣器"], [id], [id, name, effect, item_id, c_res_id]}}
,{info, cb_fun_json, handle, {val_str, [ "圣器"], [id,step], [id, step, name, attr, loss, max_lucky,clear_limit,clear_time,notice,effect]}}
,{skill_up, cb_fun_json, handle, {val_str, ["圣技升级"], [hallows_id, lev], [lose, skill_bid, lev_limit]}}
,{skill_max_lev, cb_fun_json, handle, {type_get_max, [ "圣技升级"], [hallows_id], lev}}
,{trace_cost, cb_fun_json, handle, {val_str, ["圣印"], [id, step_limit], [num]}}
,{attr_radio, cb_fun_json, handle, {key_val, ["属性系数"], [type], all}}
,{task, cb_fun_json, handle, {key_val, ["激活任务"], id, [id, hid, items, progress, extra, desc, source_id]}}
,{task_info, cb_fun_json, handle, {type_val, ["激活任务"], [hid], id}}
,{skill_attr, cb_fun_json, handle, {type_get_val, ["技能属性加成"], [hallows_id, attr_id], all}}
,{magic, cb_fun_json, handle, {key_val, ["神器幻化"], [id], all}}
,{magic_task, cb_fun_json, handle, {key_val, ["幻化任务解锁"], id, [id, hid, items, progress, extra, desc]}}
]
,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 = id, desc = "神器编号", mod = all}
,#f_column{type = int, name = step, desc = "阶数", mod = all}
,#f_column{type = bstr, name = name, desc = "神器名", mod = all}
,#f_column{type = term, name = attr, desc = "神器属性", val = "[]", mod = all}
,#f_column{type = term, name = loss, desc = "进阶消耗", mod = all}
,#f_column{type = int, name = max_lucky, desc = "进阶最大幸运量", mod = all}
,#f_column{type = int, name = clear_limit, desc = "幸运清零下限", mod = all}
,#f_column{type = int, name = clear_time, desc = "幸运清零时间", comment = "", mod = all}
,#f_column{type = bstr, name = effect, desc = "特效ID", mod = client}
,#f_column{type = bstr, name = notice, desc = "公告内容", mod = all}
,#f_column{type = int, name = item_id, desc = "物品id", mod = client}
,#f_column{type = term, name = skill_order, desc = "技能出招顺序"}
,#f_column{type = bstr, name = c_res_id, desc = "战斗资源ID", mod = client}
]}
,{["激活任务"], [
#f_column{type = int, name = id, desc = "任务ID", mod = all}
,#f_column{type = int, name = hid, desc = "神器编号", mod = all}
,#f_column{type = term, name = items, desc = "任务奖励", mod = all}
,#f_column{desc = "任务要求", type = func, name = progress, width = 360, spilt_str = ";", type_func = {quest_data, progress},
fields = [
#f_column{desc = "服务端事件", type = term, name = label, add_list_sign = false}
, #f_column{desc = "客户端标签", type = str, name = cli_label, mod = client}
, #f_column{desc = "目标值", type = int, name = target, mod = all}
, #f_column{desc = "目标需求值", type = int, name = target_val, mod = all}
, #f_column{desc = "服务端附加参数", type = term, name = param, add_list_sign = false}
, #f_column{desc = "客户端附加参数", type = term, name = param, add_list_sign = false, mod = client}
],
valid_list = [
{atom, integer, integer},
{atom, integer, integer, term},
{atom, atom, integer, integer, term}
],
comment = "{事件标签, 目标值, 目标需求值, 附加参数} 或 {服务端事件标签, 服务端事件标签, 目标值, 目标需求值, 附加参数}\n"
"事件标签/服务端事件标签/客户端事件标签:英文字符串;\n"
"目标值:整数\n"
"目标需求值:整数\n"
"附加参数需要用“[]”包括,其中每一项需要用“{}”包括:[{monitor}, {type, 1}]\n"
"多个任务目标用“;”(分号)分隔,例如: {evt_get_item, 10001, 1, [{monitor}]};{evt_use_item, 10001, 1, [{type, 1}]}",
mod = all
}
,#f_column{desc = "任务扩展参数", type = term, name = extra, add_list_sign = false, comment = "每一项需要用“{}”包括:[{type, 1}, {id, 1}]", def_cli_val = "{}", mod = client}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
,#f_column{type = int, name = source_id, desc = "前往id", mod = client}
]}
,{["幸运值"], [
#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 = int, name = rate, desc = "概率", comment = "千分比", mod = all}
]}
,{["属性系数"], [
#f_column{type = kv, name = type, desc = "职业", kv_type = partner_career_type, mod = all}
,#f_column{type = term, name = ratio, desc = "属性系数", mod = all}
]}
,{["圣技升级"], [
#f_column{type = int, name = hallows_id, desc = "神器编号", mod = all}
,#f_column{type = int, name = lev, desc = "圣技等级", mod = all}
,#f_column{type = int, name = skill_bid, desc = "技能bid", mod = all}
,#f_column{type = term, name = lose, val = "[]", desc = "升级消耗", mod = all}
,#f_column{type = int, name = lev_limit, desc = "等级要求", mod = all}
]}
,{["技能属性加成"], [
#f_column{type = int, name = hallows_id, desc = "神器编号", mod = all}
,#f_column{type = int, name = attr_id, desc = "特殊属性编号", mod = all}
,#f_column{type = term, name = attr, desc = "属性", mod = all}
,#f_column{type = int, name = lev_limit, desc = "解锁等级", mod = all}
,#f_column{type = bstr, name = desc, desc = "属性描述", mod = all}
]}
,{["圣印"], [
#f_column{type = int, name = id, desc = "神器编号", mod = all}
,#f_column{type = int, name = num, desc = "可使用数量", mod = all}
,#f_column{type = int, name = step_limit, desc = "阶数限制", mod = all}
]}
,{["幸运值权重"], [
#f_column{type = int, name = val, desc = "", mod = all}
,#f_column{type = int, name = weight, desc = "权重", mod = all}
]}
,{["圣器战斗属性"], [
#f_column{type = int, name = id, desc = "神器编号", mod = all}
,#f_column{type = int, name = step, desc = "阶数", mod = all}
,#f_column{type = int, name = atk, desc = "攻击", mod = attr}
,#f_column{type = int, name = def_p, desc = "物理防御", mod = attr}
,#f_column{type = int, name = def_s, desc = "法术防御", mod = attr}
,#f_column{type = int, name = hp_max, desc = "气血上限", mod = attr}
,#f_column{type = int, name = speed, desc = "速度", mod = attr}
,#f_column{type = int, name = hit_rate, desc = "命中", mod = attr}
,#f_column{type = int, name = dodge_rate, desc = "闪避", mod = attr}
,#f_column{type = int, name = crit_rate, desc = "暴击", mod = attr}
,#f_column{type = int, name = crit_ratio, desc = "暴伤", mod = attr}
,#f_column{type = int, name = hit_magic, desc = "效果命中", mod = attr}
,#f_column{type = int, name = dodge_magic, desc = "效果闪避", mod = attr}
,#f_column{type = int, name = dam, desc = "易伤", mod = attr}
,#f_column{type = int, name = res, desc = "免伤", mod = attr}
,#f_column{type = int, name = res_p, desc = "物伤", mod = attr}
,#f_column{type = int, name = res_s, desc = "法伤", mod = attr}
]}
,{["神器幻化"], [
#f_column{type = int, name = id, desc = "幻化id", mod = all}
,#f_column{type = bstr, name = name, desc = "幻化名称", mod = all}
,#f_column{type = term, name = attr, desc = "幻化属性", val = "[]", mod = all}
,#f_column{type = int, name = is_item, desc = "是否为道具解锁", mod = all}
,#f_column{type = int, name = time, desc = "有效期", mod = all}
,#f_column{type = term, name = loss, desc = "道具解锁消耗", mod = all}
,#f_column{type = int, name = item_id, desc = "物品id", mod = client}
,#f_column{type = bstr, name = effect, desc = "特效ID", mod = client}
,#f_column{type = bstr, name = c_res_id, desc = "战斗资源ID", mod = client}
,#f_column{type = bstr, name = desc, desc = "解锁效果", mod = client}
,#f_column{type = int, name = sort, desc = "界面排序", mod = client}
,#f_column{type = bstr, name = get_des, desc = "获得描述", mod = client}
,#f_column{type = int, name = evt_id, desc = "获得跳转", mod = client}
]}
,{["幻化任务解锁"], [
#f_column{type = int, name = id, desc = "任务ID", mod = all}
,#f_column{type = int, name = hid, desc = "幻化ID", mod = all}
,#f_column{type = term, name = items, desc = "任务奖励", mod = all}
,#f_column{desc = "任务要求", type = func, name = progress, width = 360, spilt_str = ";", type_func = {quest_data, progress},
fields = [
#f_column{desc = "服务端事件", type = term, name = label, add_list_sign = false}
, #f_column{desc = "客户端标签", type = str, name = cli_label, mod = client}
, #f_column{desc = "目标值", type = int, name = target, mod = all}
, #f_column{desc = "目标需求值", type = int, name = target_val, mod = all}
, #f_column{desc = "服务端附加参数", type = term, name = param, add_list_sign = false}
, #f_column{desc = "客户端附加参数", type = term, name = param, add_list_sign = false, mod = client}
],
valid_list = [
{atom, integer, integer},
{atom, integer, integer, term},
{atom, atom, integer, integer, term}
],
comment = "{事件标签, 目标值, 目标需求值, 附加参数} 或 {服务端事件标签, 服务端事件标签, 目标值, 目标需求值, 附加参数}\n"
"事件标签/服务端事件标签/客户端事件标签:英文字符串;\n"
"目标值:整数\n"
"目标需求值:整数\n"
"附加参数需要用“[]”包括,其中每一项需要用“{}”包括:[{monitor}, {type, 1}]\n"
"多个任务目标用“;”(分号)分隔,例如: {evt_get_item, 10001, 1, [{monitor}]};{evt_use_item, 10001, 1, [{type, 1}]}",
mod = all
}
,#f_column{desc = "任务扩展参数", type = term, name = extra, add_list_sign = false, comment = "每一项需要用“{}”包括:[{type, 1}, {id, 1}]", def_cli_val = "{}", mod = client}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
]}
,{["技能幻化"], [
#f_column{type = int, name = skill_bid, desc = "神器技能bid", mod = all}
,#f_column{type = int, name = look_id, desc = "幻化id", mod = all}
,#f_column{type = int, name = look_skill_bid, desc = "幻化技能bid", mod = all}
]}
,{["技能幻化出招顺序"], [
#f_column{type = int, name = hallows_id, desc = "神器id", mod = all}
,#f_column{type = int, name = look_id, desc = "幻化id", mod = all}
,#f_column{type = term, name = look_skill_order, desc = "幻化技能出招顺序", mod = all}
]}
]
}.