%%---------------------------------------------------- %% 数据配置文件 %% @author %%---------------------------------------------------- -module(expedition_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = expedition_data ,lua_name = expedition_data ,desc = "远征配置数据" ,source = "expedition_data.xml" ,target = "expedition_data.erl" ,inc = ["expedition.hrl"] ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{{get_ref, undefined}, cb_fun, handle, {get_record, ["关卡数据"], id, new_map, all}} ,{ids, cb_fun, handle, {list, ["关卡数据"]}} ,{type_list, cb_fun, handle, {tuple_type, ["关卡数据"], type, id}} ,{list, cb_fun, handle, {list, ["关卡数据"]}} ,{robot, cb_fun, handle, {get_fun, ["机器人"], "robot({~ts, MaxPower}) when MaxPower >= ~ts andalso MaxPower =< ~ts -> {~ts, ~ts};", [id, min, max, robot, robot_power]}} ,{reward, cb_fun, handle, {get_fun, ["关卡匹配"], "reward({~ts, MaxPower}) when MaxPower >= ~ts andalso MaxPower =< ~ts -> {~ts, ~ts};", [id, min, max, items, power_range]}} ,{new_robot, cb_fun, handle, {get_fun, ["新机器人"], "new_robot({~ts, ~ts, MaxPower}) when MaxPower >= ~ts andalso MaxPower =< ~ts -> {~ts, ~ts};", [difficulty, id, min, max, robot, robot_power]}} ,{new_reward, cb_fun, handle, {get_fun, ["新关卡匹配"], "new_reward({~ts, ~ts, MaxPower}) when MaxPower >= ~ts andalso MaxPower =< ~ts -> {~ts, ~ts};", [difficulty, id, min, max, items, power_range]}} ,{{floor_to_id, "0"}, cb_fun, handle, {get_tuple, ["关卡数据"], floor, id}} ,{{id_to_floor, undefined}, cb_fun, handle, {get_tuple, ["关卡数据"], id, floor}} ,{power_limit, cb_fun, handle, {get_tuple, ["难度开启"], id, power}} ,{{robot_attr_zoom, "1000"}, cb_fun, handle, {get_fun, ["新机器人"], "robot_attr_zoom({~ts, ~ts, MaxPower}) when MaxPower >= ~ts andalso MaxPower =< ~ts -> ~ts;", [difficulty, id, min, max, attr_zoom]}} ,{{match_attr_zoom, "1000"}, cb_fun, handle, {get_fun, ["新关卡匹配"], "match_attr_zoom({~ts, ~ts, MaxPower}) when MaxPower >= ~ts andalso MaxPower =< ~ts -> ~ts;", [difficulty, id, min, max, attr_zoom]}} ] ,callback_cli = [ {const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}} ,{sign_info, cb_fun_lua, handle, {key_val, ["关卡数据"], [id], all}} ,{sign_reward, cb_fun_lua, handle, {key_val, ["难度开启"], [id], all}} ] ,callback_json = [ {const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}} ,{sign_info, cb_fun_json, handle, {key_val, ["关卡数据"], [id], all}} ,{sign_reward, 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 = id, desc = "ID", primary = true, mod = all} ,#f_column{type = int, name = floor, desc = "第几关", mod = all} ,#f_column{type = kv, name = type, desc = "类型", kv_type = [{"人", 1}, {"宝箱", 2}], mod = all} ,#f_column{type = term, name = pos, desc = "坐标点", mod = client} ]} ,{["机器人"], [ #f_column{type = int, name = 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 = robot, desc = "机器人匹配", mod = all} ,#f_column{type = term, name = robot_power, desc = "机器人属性修正", mod = all} ]} ,{["关卡匹配"], [ #f_column{type = int, name = id, desc = "ID", mod = all} ,#f_column{type = int, name = floor, 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 = term, name = power_range, desc = "战力范围", comment = "{Min,Max}", width = 320} ]} ,{["新机器人"], [ #f_column{type = int, name = difficulty, desc = "难度", mod = all} ,#f_column{type = int, name = id, desc = "关卡ID", mod = all} ,#f_column{type = int, name = floor, 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 = robot, desc = "机器人匹配", mod = all} ,#f_column{type = term, name = robot_power, desc = "机器人属性修正", mod = all} ,#f_column{type = int, name = attr_zoom, desc = "属性缩放", val = "1000", mod = all} ]} ,{["新关卡匹配"], [ #f_column{type = int, name = difficulty, desc = "难度", mod = all} ,#f_column{type = int, name = id, desc = "关卡ID", mod = all} ,#f_column{type = int, name = floor, desc = "第几关", mod = all} ,#f_column{type = int, name = min, desc = "战力下限", val = "0", mod = all} ,#f_column{type = int, name = max, desc = "战力上限", val = "99999999", mod = all} ,#f_column{type = term, name = items, desc = "关卡奖励",mod = all} ,#f_column{type = term, name = power_range, desc = "战力范围", comment = "{Min,Max}", width = 320} ,#f_column{type = int, name = attr_zoom, desc = "属性缩放", val = "1000", mod = all} ]} ,{["难度开启"], [ #f_column{type = int, name = id, desc = "ID", primary = true, mod = all} ,#f_column{type = term, name = items, desc = "通关奖励",mod = all} ,#f_column{type = bstr, name = desc, desc = "背景资源", mod = all} ,#f_column{type = int, name = power, desc = "战力要求", mod = all} ,#f_column{type = int, name = is_jump, desc = "是否跳过战斗", mod = all} ]} ] }.