%%%------------------------------------------------------------------- %%% @author Administrator %%% @copyright (C) 2023, %%% @doc %%% %%% @end %%% Created : 16. 11月 2023 13:32 %%%------------------------------------------------------------------- -module(fake_battle_data). -author("Administrator"). %% API -export([cfg/0,get/1]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = fake_battle_data ,lua_name = fake_battle_data ,desc = "" ,source = "fake_battle_data.xml" ,target = "fake_battle_data.erl" ,inc = [] ,callback = [ {get_const, cb_fun, handle, {get_fun, ["常量"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{get_info, cb_fun, handle, {get_tuple, ["假战斗队伍"], id, all}} ,{get_defend_id, cb_fun, handle, {get_tuple, ["主题伙伴关卡"], [camp_id, id], target_id}} ,{get_reward, cb_fun, handle, {get_tuple, ["主题伙伴关卡"], [camp_id, id], reward}} ,{get_name, cb_fun, handle, {get_tuple, ["主题伙伴关卡"], [camp_id, id], name}} ,{get_list, cb_fun, handle, {tuple_type, ["主题伙伴关卡"], camp_id, id}} ] ,callback_cli = [ ] ,callback_json = [ {const, cb_fun_json, handle, {key_val, [ "常量"], [key], all}}, {get_info, cb_fun_json, handle, {key_val, ["假战斗队伍"], [id], all}} ,{info, cb_fun_json, handle, {key_val, ["伙伴试用"], [id], all}} ,{new_info, cb_fun_json, handle, {type_get_val, ["主题伙伴关卡"], [camp_id, id], all}} ] ,sheet = [ {["假战斗队伍"], [#f_column{desc = "战斗编号", type = int, name = id, mod = all} , #f_column{desc = "战斗类型", type = int, name = combat_type, mod = all} , #f_column{desc = "A队", type = int, name = team1, mod = all} , #f_column{desc = "B队", type = int, name = team2, mod = all} ]} ,{["伙伴试用"], [ #f_column{type = int, name = id, desc = "关卡唯一id", mod = all} ,#f_column{type = int, name = target_id, desc = "关卡目标怪物id", mod = all} ,#f_column{type = term, name = partner_id, desc = "可选的英雄id", mod = all, val = "[]"} ,#f_column{type = term, name = required_partner, desc = "必选英雄和站位", mod = all} ,#f_column{type = kv, kv_type = bool, name = flag, desc = "是否可换阵法", mod = all} ,#f_column{type = int, name = formation, desc = "阵法类型(不可换阵法时填)", mod = all, val = 0} ,#f_column{type = term, name = ban_pos, desc = "禁止位置", mod = all, val = "[]"} ,#f_column{type = term, name = unlock, desc = "解锁关卡", mod = all, val = "[]"} ,#f_column{type = term, name = reward, desc = "通关奖励", mod = all} ,#f_column{type = str, name = name, desc = "关卡名称", mod = all} ,#f_column{type = str, name = desc, desc = "关卡简介", mod = all} ,#f_column{type = str, name = message, desc = "详细信息", mod = all} ,#f_column{type = str, name = tips, desc = "关卡通关提示语", mod = all} ,#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "进阶类型", mod = all} %% ,#f_column{type = int, name = tips, desc = "关联活动", mod = server} ]}, {["常量"], [ #f_column{type = atom, name = key, desc = "键", primary = true, mod = all} ,#f_column{type = term, name = val, desc = "值", mod = all, add_list_sign = false} ,#f_column{type = str, name = desc, desc = "描述", mod = all} ]} ,{["主题伙伴关卡"], [ #f_column{type = int, name = id, desc = "关卡唯一id", mod = all} ,#f_column{type = int, name = target_id, desc = "关卡目标怪物id", mod = all} ,#f_column{type = term, name = reward, desc = "通关奖励", mod = all} ,#f_column{type = str, name = name, desc = "关卡名称", mod = all} ,#f_column{type = int, name = camp_id, desc = "关联活动", mod = server} ]} ] }. get(type) -> [ {"试用", 1} ,{"进阶", 2} ]; get(_) -> [].