162 lines
9.1 KiB
Erlang
162 lines
9.1 KiB
Erlang
|
|
%%----------------------------------------------------
|
||
|
|
%% 数据配置文件
|
||
|
|
%% @author xxxx@xxx.xxx
|
||
|
|
%%----------------------------------------------------
|
||
|
|
-module(monopoly_maps_data).
|
||
|
|
-export([cfg/0
|
||
|
|
,get/1
|
||
|
|
]).
|
||
|
|
-include("data_config.hrl").
|
||
|
|
-include("common.hrl").
|
||
|
|
cfg() ->
|
||
|
|
#data_cfg{
|
||
|
|
name = monopoly_maps_data
|
||
|
|
,lua_name = monopoly_maps_data
|
||
|
|
,js_name = monopoly_maps_data
|
||
|
|
,desc = "配置数据"
|
||
|
|
,source = "monopoly_maps_data.xml"
|
||
|
|
,target = "monopoly_maps_data.erl"
|
||
|
|
,splitv = 1
|
||
|
|
,head_rows = 1
|
||
|
|
,inc = []
|
||
|
|
,callback = [
|
||
|
|
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
|
||
|
|
,{get_id_limit, cb_fun, handle, {get_tuple, ["阶段信息"], id, [start_unixtime, develop]}}
|
||
|
|
,{get_all_id, cb_fun, handle, {tuple_list, ["阶段信息"], id}}
|
||
|
|
,{get_map_id, cb_fun, handle, {get_tuple, ["阶段信息"], id, map_list}}
|
||
|
|
,{get_map_max_grid, cb_fun, handle, {get_tuple, ["地图信息"], id, max_grid}}
|
||
|
|
,{get_events, cb_fun, handle, {tuple_list, ["事件信息"], [id, type, rand_num, rand_pos]}}
|
||
|
|
,{get_reward_id, cb_fun, handle, {get_tuple, ["事件奖励列表"], type, [win, false]}}
|
||
|
|
,{get_reward, cb_fun, handle, {get_tuple, ["奖励信息"], id, [type, num, args, buff_reward]}}
|
||
|
|
,{get_mystery_reward, cb_fun, handle, {get_tuple, ["神秘事件"], id, reward_list}}
|
||
|
|
,{get_first, cb_fun, handle, {get_tuple, ["第一次对话"], type, reward}}
|
||
|
|
]
|
||
|
|
,callback_cli = [
|
||
|
|
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
|
||
|
|
,{customs, cb_fun_lua, handle, {key_val, ["阶段信息"], [id], all}}
|
||
|
|
,{map_info, cb_fun_lua, handle, {key_val, ["地图信息"], [id], all}}
|
||
|
|
,{event_info, cb_fun_lua, handle, {type_get_val, ["事件信息"], [id, type], all}}
|
||
|
|
,{dialog, cb_fun_lua, handle, {type_get_val, ["神秘事件"], [type, id], [id, type, step_id, dialogue, answer]}}
|
||
|
|
,{item_show, cb_fun_lua, handle, {key_val, ["图例说明"], [id], all}}
|
||
|
|
,{drama, cb_fun_lua, handle, {key_val, ["第一次对话"], [type], all}}
|
||
|
|
,{buff_tips, cb_fun_lua, handle, {key_val, ["buff提示"], [id], all}}
|
||
|
|
]
|
||
|
|
,callback_json = [
|
||
|
|
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
|
||
|
|
,{customs, cb_fun_json, handle, {key_val, ["阶段信息"], [id], all}}
|
||
|
|
,{map_info, cb_fun_json, handle, {key_val, ["地图信息"], [id], all}}
|
||
|
|
,{event_info, cb_fun_json, handle, {type_get_val, ["事件信息"], [id, type], all}}
|
||
|
|
,{dialog, cb_fun_json, handle, {type_get_val, ["神秘事件"], [type, id], [id, type, step_id, dialogue, answer]}}
|
||
|
|
,{item_show, cb_fun_json, handle, {key_val, ["图例说明"], [id], all}}
|
||
|
|
,{drama, cb_fun_json, handle, {key_val, ["第一次对话"], [type], all}}
|
||
|
|
,{buff_tips, cb_fun_json, handle, {key_val, ["buff提示"], [id], all}}
|
||
|
|
]
|
||
|
|
,sheet = [
|
||
|
|
{["常量配置"], [
|
||
|
|
#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 = id, desc = "阶段唯一id", mod = all}
|
||
|
|
,#f_column{type = str, name = name, desc = "阶段名称", mod = all}
|
||
|
|
,#f_column{type = int, name = start_unixtime, desc = "阶段开始时间戳", mod = all}
|
||
|
|
,#f_column{type = int, name = develop, desc = "解锁所需上一阶段探索度", mod = all, val = 0}
|
||
|
|
,#f_column{type = term, name = map_list, desc = "地图列表", mod = server}
|
||
|
|
,#f_column{type = str, name = res_id, desc = "资源id", mod = client}
|
||
|
|
,#f_column{type = int, name = max_develop, desc = "最大探索值", mod = client}
|
||
|
|
]}
|
||
|
|
,{["地图信息"], [
|
||
|
|
#f_column{type = int, name = id, desc = "地图id", mod = all}
|
||
|
|
,#f_column{type = int, name = max_grid, desc = "最大格子数", mod = all}
|
||
|
|
,#f_column{type = int, name = res_id, desc = "地图背景资源id", mod = client, val = 1}
|
||
|
|
,#f_column{type = term, name = grid_pos_list, desc = "格子坐标列表", mod = client}
|
||
|
|
,#f_column{type = term, name = decorate_list, desc = "装饰物品", mod = client}
|
||
|
|
]}
|
||
|
|
,{["事件信息"], [
|
||
|
|
#f_column{type = int, name = id, desc = "地图id", mod = all}
|
||
|
|
,#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "事件类型", mod = all}
|
||
|
|
,#f_column{type = term, name = rand_num, desc = "随机生成数量", mod = server}
|
||
|
|
,#f_column{type = term, name = rand_pos, desc = "随机生成位置", mod = server}
|
||
|
|
,#f_column{type = term, name = res_id, desc = "资源id", mod = client}
|
||
|
|
,#f_column{type = str, name = grid_res_id, desc = "格子资源id", mod = client}
|
||
|
|
,#f_column{type = term, name = offset, desc = "事件图标偏移值", mod = client}
|
||
|
|
,#f_column{type = int, name = show_ani, desc = "是否显示浮动效果", mod = client}
|
||
|
|
]}
|
||
|
|
,{["事件奖励列表"], [
|
||
|
|
#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "事件类型", mod = all}
|
||
|
|
,#f_column{type = term, name = win, desc = "成功奖励列表", mod = all}
|
||
|
|
,#f_column{type = term, name = false, desc = "失败奖励列表", mod = all}
|
||
|
|
]}
|
||
|
|
,{["奖励信息"], [
|
||
|
|
#f_column{type = int, name = id, desc = "奖励唯一id", mod = all}
|
||
|
|
,#f_column{type = kv, kv_type = {?MODULE, get, [reward_type]}, name = type, desc = "事件类型", mod = all}
|
||
|
|
,#f_column{type = int, name = num, desc = "奖励数量", mod = all}
|
||
|
|
,#f_column{type = term, name = args, desc = "奖励额外参数", mod = all}
|
||
|
|
,#f_column{type = str, name = remark, desc = "备注", mod = all}
|
||
|
|
,#f_column{type = term, name = buff_reward, desc = "buff附加道具奖励", mod = all}
|
||
|
|
]}
|
||
|
|
,{["神秘事件"], [
|
||
|
|
#f_column{type = int, name = id, desc = "问题id", mod = all}
|
||
|
|
,#f_column{type = term, name = reward_list, desc = "奖励列表", mod = all}
|
||
|
|
,#f_column{type = term, name = dialogue, desc = "对话", mod = client}
|
||
|
|
,#f_column{type = term, name = answer, desc = "选项", mod = client}
|
||
|
|
,#f_column{type = int, name = type, desc = "类型", mod = client}
|
||
|
|
,#f_column{type = int, name = step_id, desc = "场景编号", mod = client}
|
||
|
|
]}
|
||
|
|
,{["图例说明"], [
|
||
|
|
#f_column{type = int, name = id, desc = "编号", mod = client}
|
||
|
|
,#f_column{type = int, name = item_bid, desc = "物品id", mod = client}
|
||
|
|
,#f_column{type = str, name = title, desc = "名称", mod = client}
|
||
|
|
,#f_column{type = str, name = desc, desc = "描述", mod = client}
|
||
|
|
]}
|
||
|
|
,{["第一次对话"], [
|
||
|
|
#f_column{type = kv, kv_type = {?MODULE, get, [first_type]}, name = type, desc = "类型", mod = all}
|
||
|
|
,#f_column{type = term, name = reward, desc = "选项奖励", mod = all}
|
||
|
|
,#f_column{type = term, name = dialogue, desc = "对话", mod = client}
|
||
|
|
,#f_column{type = term, name = answer, desc = "选项", mod = client}
|
||
|
|
]}
|
||
|
|
,{["buff提示"], [
|
||
|
|
#f_column{type = int, name = id, desc = "编号", mod = client}
|
||
|
|
,#f_column{type = str, name = desc, desc = "提示内容", mod = client}
|
||
|
|
]}
|
||
|
|
|
||
|
|
]
|
||
|
|
}.
|
||
|
|
|
||
|
|
get(type) ->
|
||
|
|
[
|
||
|
|
{"普通地面", 1}
|
||
|
|
,{"啊,是陷阱!", 2}
|
||
|
|
,{"南瓜大礼包", 3}
|
||
|
|
,{"强者的对决", 4}
|
||
|
|
,{"神秘事件", 5}
|
||
|
|
,{"天降红包", 6}
|
||
|
|
,{"大boss出现了", 7}
|
||
|
|
,{"冲鸭!", 8}
|
||
|
|
,{"吨吨吨伏特加", 9}
|
||
|
|
,{"这就是希望么/策划的祝福", 10}
|
||
|
|
,{"魔女的药锅/BUG修复指南", 11}
|
||
|
|
,{"终点", 12}
|
||
|
|
,{"弗拉格", 13}
|
||
|
|
,{"起点", 14}
|
||
|
|
];
|
||
|
|
get(reward_type) ->
|
||
|
|
[
|
||
|
|
{"reward_item", 1}
|
||
|
|
,{"reward_randomBuff_Boss", 2}
|
||
|
|
,{"reward_DamageDoubleBuff", 3}
|
||
|
|
,{"reward_rewardDouble", 4}
|
||
|
|
,{"reward_battleWin", 5}
|
||
|
|
,{"reward_blank", 6}
|
||
|
|
];
|
||
|
|
get(first_type) ->
|
||
|
|
[
|
||
|
|
{"第一次进入玩法", 1}
|
||
|
|
,{"第一阶段", 2}
|
||
|
|
,{"第二阶段", 3}
|
||
|
|
,{"第三阶段", 4}
|
||
|
|
,{"第四阶段", 5}
|
||
|
|
];
|
||
|
|
get(_) ->
|
||
|
|
[].
|