%%---------------------------------------------------- %% 数据配置文件 %% @author %%----------------------------------------------------a -module(adventure_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = adventure_data ,lua_name = adventure_data ,desc = "神界冒险配置数据" ,source = "adventure_data.xml" ,target = "adventure_data.erl" ,inc = ["adventure.hrl"] ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{get_evt, cb_fun, handle, {get_record, ["事件"], evt_id, new_map, all}} ,{list_answer_type, cb_fun, handle, {tuple_list, ["题库抽取权重"], all}} ,{list_answer, cb_fun, handle, {tuple_type, ["题库"], type, [id, limit_lev]}} ,{get_answer, cb_fun, handle, {get_record, ["题库"], id, new_map, all}} ,{list_npc_talk, cb_fun, handle, {tuple_type, ["NPC对话"], evt_id, id}} ,{get_npc_talk, cb_fun, handle, {get_record, ["NPC对话"], [evt_id, id, num], new_map, all}} ,{get_floor, cb_fun, handle, {get_record, ["层数据"], id, new_map, all}} ,{get_map, cb_fun, handle, {get_tuple, ["地图数据"], id, res_id}} ,{get_tile, cb_fun, handle, {get_tuple, ["地图格子"], [id, pos], res_id}} ,{exch_group, cb_fun, handle, {tuple_type, ["神秘商人"], [group, idx], [id, rand]}} ,{get_exch, cb_fun, handle, {get_record, ["神秘商人"], id, new_map, all}} ,{get_skill, cb_fun, handle, {get_record, ["技能效果"], id, new_map, all}} ,{list_round_reward, cb_fun, handle, {tuple_list, ["进度奖励"], [id, count]}} ,{round_reward, cb_fun, handle, {get_record, ["进度奖励"], id, new_map, all}} ,{{get_init_buffs, "[]"}, cb_fun, handle, {get_tuple, ["buff"], num, buffs}} ] ,callback_cli = [ {adventure_event, cb_fun_lua, handle, {val_str, ["事件"], [evt_id], all}} ,{map, cb_fun_lua, handle, {key_val, ["地图数据"], [id], all}} ,{energy_num, cb_fun_lua, handle, {key_val, ["资产兑换"], [num], all}} ,{explain, cb_fun_lua, handle, {key_val, ["玩法说明"], [id], all}} ,{adventure_const, cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}} ,{floor_reward, cb_fun_lua, handle, {key_val, ["层数据"], [id], all}} ,{battle_res, cb_fun_lua, handle, {key_val, ["层数据"], [id], [battle_res_id]}} ,{reset_num, cb_fun_lua, handle, {key_val, ["重置次数"], [num], all}} ,{skill_data, cb_fun_lua, handle, {key_val, ["技能效果"], [id], all}} ,{adventure_answer, cb_fun_lua, handle, {key_val, ["题库"], [id], [id,desc]}} ,{adventure_kind_answer, cb_fun_lua, handle, {key_val, ["题库"], [id], [a,b,c,d]}} ,{floor_data,cb_fun_lua, handle, {list_val, ["冒险数据"],[id,power],true,false}} ,{adventure_npc_data, cb_fun_lua, handle, {type_get_val, ["NPC对话"], [evt_id,id,num], all}} ,{round_reward_list, cb_fun_lua, handle, {key_val, ["进度奖励"], [id], all}} ,{buff, cb_fun_lua, handle, {key_val, ["buff"], [num], all}} %%,{adventure_room_info, cb_fun_lua, handle, {val_str, ["冒险数据"], [id,room],[id,room,name]}} %%,{progress_reward, cb_fun_lua, handle, {type_val, ["探索进度奖励"], [id], [num,items]}} ] ,callback_json = [ {adventure_event, cb_fun_json, handle, {val_str, ["事件"], [evt_id], all}} ,{map, cb_fun_json, handle, {key_val, ["地图数据"], [id], all}} ,{energy_num, cb_fun_json, handle, {key_val, ["资产兑换"], [num], all}} ,{explain, cb_fun_json, handle, {key_val, ["玩法说明"], [id], all}} ,{adventure_const, cb_fun_json, handle, {key_val, ["常量配置"], [key], all}} ,{floor_reward, cb_fun_json, handle, {key_val, ["层数据"], [id], all}} ,{battle_res, cb_fun_json, handle, {key_val, ["层数据"], [id], [battle_res_id]}} ,{reset_num, cb_fun_json, handle, {key_val, ["重置次数"], [num], all}} ,{skill_data, cb_fun_json, handle, {key_val, ["技能效果"], [id], all}} ,{adventure_answer, cb_fun_json, handle, {key_val, ["题库"], [id], [id,desc]}} ,{adventure_kind_answer, cb_fun_json, handle, {key_val, ["题库"], [id], [a,b,c,d]}} ,{floor_data,cb_fun_json, handle, {list_val, ["冒险数据"],[id,power],true,false}} ,{adventure_npc_data, cb_fun_json, handle, {type_get_val, ["NPC对话"], [evt_id,id,num], all}} ,{round_reward_list, cb_fun_json, handle, {key_val, ["进度奖励"], [id], all}} ,{buff, cb_fun_json, handle, {key_val, ["buff"], [num], all}} %%,{adventure_room_info, cb_fun_lua, handle, {val_str, ["冒险数据"], [id,room],[id,room,name]}} %%,{progress_reward, cb_fun_lua, handle, {type_val, ["探索进度奖励"], [id], [num,items]}} ] ,sheet = [ {["事件"], [ #f_column{type = int, name = evt_id, desc = "事件ID",mod = all} ,#f_column{type = int, name = evt_group, desc = "事件组"} ,#f_column{type = kv, name = evt_type, desc = "类型", kv_type = {fun evt_type/0, []},mod = all} ,#f_column{type = term, name = lose, desc = "消耗",mod = all} ,#f_column{type = term, name = effect, desc = "事件效果信息",mod = all} ,#f_column{type = int, name = unit_id, desc = "绑定单位", mod = all} ,#f_column{type = term, name = base_items, desc = "基本奖励",mod = all} ,#f_column{type = term, name = drop_ids, desc = "掉落奖励"} ,#f_column{type = term, name = conds, desc = "探索条件"} ,#f_column{type = int, name = auto_explore, desc = "自动扫荡"} ,#f_column{type = bstr, name = desc, desc = "描述", mod = client} ,#f_column{type = bstr, name = effect_str, desc = "界面特效", mod = client} ,#f_column{type = term, name = box_show_item, desc = "宝箱随机奖励", mod = client} ,#f_column{type = int, name = max_num, desc = "层出现上限", val = 0} ,#f_column{type = int, name = round_max_num, desc = "轮出现上限", val = 0} ,#f_column{type = int, name = can_out_num, desc = "多少次后才出现", val = 0} ,#f_column{type = int, name = next_out_num, desc = "下一次出现CD", val = 0} ,#f_column{type = int, name = must_out_num, desc = "多少次后必出现", val = 0} ,#f_column{type = int, name = power, desc = "推荐战力", val = 0,mod = all} ,#f_column{type = int, name = lock, desc = "锁定周围", val = 0,mod = all} ,#f_column{type = term,name = res_id,desc = "资源ID", mod = client} ,#f_column{type = int, name = shadow, desc = "阴影", val_cli = 0, mod = client} ,#f_column{type = term, name = finish_act, desc = "通关事件"} ,#f_column{type = int, name = face, desc = "头像", val = 0, mod = client} ,#f_column{type = term, name = handle_type, desc = "操作反馈", mod = client} ,#f_column{type = int, name = sec_type, desc = "二级类型"} ,#f_column{type = int, name = auto_open, desc = "自动开启", mod = client} ]} ,{["题库抽取权重"], [ #f_column{type = int, name = type, desc = "类型"} ,#f_column{type = int, name = rand, desc = "权重"} ]} ,{["题库"], [ #f_column{type = int, name = id, desc = "ID",mod = all} ,#f_column{type = bstr, name = desc, desc = "描述内容",mod = all} ,#f_column{type = bstr, name = a, desc = "选项A",mod = all} ,#f_column{type = bstr, name = b, desc = "选项B",mod = all} ,#f_column{type = bstr, name = c, desc = "选项C",mod = all} ,#f_column{type = bstr, name = d, desc = "选项D",mod = all} ,#f_column{type = int, name = result, desc = "答案"} ,#f_column{type = int, name = type, desc = "类型"} ,#f_column{type = int, name = limit_lev, val = "0", desc = "类型"} ]} ,{["常量配置"], [ #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} ]} ,{["NPC对话"], [ #f_column{type = int, name = evt_id, desc = "事件ID",mod = all} ,#f_column{type = int, name = id, desc = "编号",mod = all} ,#f_column{type = int, name = num, desc = "序号",mod = all} ,#f_column{type = bstr, name = msg, desc = "对话",mod = all} ,#f_column{type = bstr, name = tips, desc = "提示"} ,#f_column{type = bstr, name = tips2, desc = "无奖励提示"} ,#f_column{type = term, name = base_items, desc = "奖励"} ,#f_column{type = term, name = drop_ids, desc = "掉落"} ,#f_column{type = int, name = reward_rand, desc = "奖励概率"} ,#f_column{type = bstr, name = lable_desc, desc = "描述",mod = client} ,#f_column{type = bstr, name = notice_msg, desc = "公告信息"} ,#f_column{type = term, name = lose, desc = "消耗", mod = all} ,#f_column{type = int, name = unit_id, desc = "单位ID", val = 0} ]} ,{["玩法说明"], [ #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} ]} ,{["层数据"],[ #f_column{type = int, name = id, desc = "层序号", mod = all} ,#f_column{type = bstr, name = name, desc = "名称", mod = client} ,#f_column{type = term, name = floor_reward, desc = "奖励列表",mod = client} ,#f_column{type = int, name = lev, desc = "开启等级", mod = all} ,#f_column{type = int, name = power, desc = "战力要求", mod = all} ,#f_column{type = int, name = room_num, desc = "房间数量"} ,#f_column{type = term, name = init_evts, desc = "出生事件"} ,#f_column{type = term, name = evt_list, desc = "事件列表"} ,#f_column{type = term, name = map_list, desc = "地图序号"} ,#f_column{type = term, name = init_evt_num, desc = "提前生成事件数量"} ,#f_column{type = term, name = init_evt_list, desc = "提前生成事件"} ,#f_column{type = int, name = battle_res_id, desc = "战斗背景"} ,#f_column{type = term, name = pos_evt_list, desc = "固定位置事件"} ,#f_column{type = int, name = auto_combat, desc = "跳过战斗", mod = all} ,#f_column{type = int, name = auto_open, desc = "自动开启"} ]} ,{["地图数据"],[ #f_column{type = int, name = id, desc = "编号", mod = all} ,#f_column{type = int, name = res_id, desc = "背影资源", mod = all} ]} ,{["地图格子"],[ #f_column{type = int, name = id, desc = "编号"} ,#f_column{type = int, name = pos, desc = "位置"} ,#f_column{type = term, name = res_id, desc = "资源序号"} ]} ,{["神秘商人"],[ #f_column{type = int, name = id, desc = "编号"} ,#f_column{type = int, name = group, desc = "组号"} ,#f_column{type = int, name = idx, desc = "位置"} ,#f_column{type = int, name = pay_type, desc = "消耗类型"} ,#f_column{type = int, name = pay_val, desc = "消耗数量"} ,#f_column{type = int, name = bid, desc = "道具ID"} ,#f_column{type = bstr, name = name, desc = "道具名称"} ,#f_column{type = int, name = num, desc = "道具数量"} ,#f_column{type = int, name = rand, desc = "权重"} ,#f_column{type = int, name = discount, desc = "折扣标签"} ,#f_column{type = int, name = old_val, desc = "原价"} ,#f_column{type = int, name = good_group, desc = "物品组编号"} ,#f_column{type = int, name = round_max, desc = "每轮上限"} ]} ,{["技能效果"], [ #f_column{type = int, name = id, desc = "编号", mod = all} ,#f_column{type = bstr, name = name, desc = "名称", mod = all} ,#f_column{type = term, name = effect, desc = "效果", mod = all} ,#f_column{type = bstr, name = desc, desc = "描述", mod = client} ,#f_column{type = int, name = max_num, desc = "每轮使用上限", mod = all} ]} ,{["进度奖励"], [ #f_column{type = int, name = id, desc = "编号", mod = all} ,#f_column{type = int, name = count, desc = "击杀怪物",mod = all} ,#f_column{type = term, name = items, desc = "奖励",mod = all} ]} ,{["buff"], [ #f_column{type = int, name = num, desc = "层数", mod = all} ,#f_column{type = term, name = buffs, desc = "buff", add_list_sign = false, mod = all} ,#f_column{type = bstr, name = desc, desc = "描述", mod = all} ]} ] }. evt_type() -> [ {"无事件", null, 0} ,{"祝福", buff, 1} ,{"BOSS", boss, 2} ,{"猜拳", finger_guessing, 3} ,{"宝箱", box, 4} ,{"怪物1", mon, 5} ,{"NPC", npc, 6} ,{"答题", answer, 7} ,{"下一层", next, 9} ,{"特效", effect, 10} ,{"障碍物", block, 11} ,{"宝箱2", freebox, 12} ,{"NPC2", npc2, 13} ,{"神秘商人", shop, 14} ,{"神秘事件", rand_evt, 15} ,{"初始事件", init, 16} ,{"怪物2", mon2, 17} ,{"怪物3", mon3, 18} ,{"怪物4", mon4, 19} ,{"技能", skill, 20} ].