Files
fc/server/tools/gen_data/cfg/adventure_endless_data.erl
2026-05-23 22:10:14 +08:00

246 lines
14 KiB
Erlang

%%%-------------------------------------------------------------------
%%% @author Administrator
%%% @copyright (C) 2023, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 13. 6月 2023 19:22
%%%-------------------------------------------------------------------
-module(adventure_endless_data).
-author("Administrator").
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = adventure_endless_data
,lua_name = adventure_endless_data
,desc = "神界冒险无尽模式配置数据"
,source = "adventure_endless_data.xml"
,target = "adventure_endless_data.erl"
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{get_all_item_id, cb_fun, handle, {tuple_list, ["NPC1","NPC2", "旅行商人"], id}}
,{get_evt, cb_fun, handle, {get_record, ["事件總覽"], evt_id, new_map, all}}
,{get_type, cb_fun, handle, {get_tuple, ["事件總覽"], evt_id, evt_type}}
,{get_evt_by_type, cb_fun, handle, {tuple_type, ["事件總覽"], evt_type, [evt_id, weight]}}
,{get_item1_list_by_type, cb_fun, handle, {tuple_type, ["NPC1","NPC2","NPC3", "改造台"], group, id}}
,{get_item, cb_fun, handle, {get_tuple, ["NPC1","NPC2","NPC3", "旅行商人", "陷阱", "祝福", "改造台"], id, evt}}
,{get_floor, cb_fun, handle, {get_record, ["层数据"], floor, new_map, all}}
,{get_exch, cb_fun, handle, {get_record, ["旅行商人"], id, new_map, all}}
,{get_exch_by_group, cb_fun, handle, {tuple_type, ["旅行商人"], group, [id, rand]}}
,{week_reward, cb_fun, handle, {get_tuple, ["进度奖励"], count, week_items}}
,{reward, cb_fun, handle, {get_tuple, ["进度奖励"], id, [count, items]}}
,{list_round_reward, cb_fun, handle, {tuple_list, ["进度奖励"], [id, count]}}
,{get_init_buffs, cb_fun, handle, {get_tuple, ["陷阱", "祝福"], id, all}}
,{get_trap_by_group, cb_fun, handle, {tuple_type, ["陷阱"], group, [id, rand]}}
,{get_bless_by_group, cb_fun, handle, {tuple_type, ["祝福"], group, [id, rand]}}
,{get_foster, cb_fun, handle, {tuple_list, ["改造台"], id}}
,{get_partner, cb_fun, handle, {get_tuple, ["英雄隨機"], id, partners}}
,{get_log, cb_fun, handle, {get_tuple, ["NPC1","NPC2","NPC3", "旅行商人", "陷阱", "祝福", "改造台"], id, log}}
,{{get_buff_icon, 0}, cb_fun, handle, {get_tuple, ["事件bufficon"], id, num}}
,{get_drop, cb_fun, handle, {get_tuple, ["事件總覽"], evt_type, drop}}
,{get_drop_group, cb_fun, handle, {tuple_type, ["掉落庫"], drop_id, [id, rand]}}
,{get_drop_info, cb_fun, handle, {get_tuple, ["掉落庫"], id, all}}
]
,callback_cli = [
{adventure_event, cb_fun_lua, handle, {key_val, ["事件"], [evt_id], all}}
,{explain, cb_fun_lua, handle, {key_val, ["玩法说明"], [title], all}}
,{adventure_const, cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}}
,{floor_reward, cb_fun_lua, handle, {key_val, ["层数据"], [floor], all}}
,{adventure_npc_data, cb_fun_lua, handle, {type_get_val, ["NPC1", "NPC2", "NPC3"], [id], all}}
,{round_reward_list, cb_fun_lua, handle, {key_val, ["进度奖励"], [id], all}}
,{buff, cb_fun_lua, handle, {key_val, ["陷阱", "祝福"], [id], 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, {key_val, ["事件總覽"], [evt_id], all}}
,{explain, cb_fun_json, handle, {type_get_val, ["玩法说明"], [title], all}}
,{adventure_const, cb_fun_json, handle, {key_val, ["常量配置"], [key], all}}
,{floor_reward, cb_fun_json, handle, {key_val, ["层数据"], [floor], all}}
,{adventure_npc_data, cb_fun_json, handle, {type_get_val, ["NPC1", "NPC2", "NPC3"], [id], all}}
,{round_reward_list, cb_fun_json, handle, {key_val, ["进度奖励"], [id], all}}
,{buff, cb_fun_json, handle, {key_val, ["陷阱", "祝福"], [id], all}}
,{evt_desc, cb_fun_json, handle, {type_get_val, ["NPC1","NPC2","NPC3", "旅行商人", "陷阱", "祝福", "改造台", "道具"], [id],[desc, tip, log]}}
,{item_icon, cb_fun_json, handle, {type_get_val, ["NPC1", "NPC2", "NPC3", "旅行商人", "道具"], [id],icon}}
,{item_name, cb_fun_json, handle, {type_get_val, ["NPC1", "NPC2", "旅行商人", "道具"], [id],name}}
,{buff_icon, cb_fun_json, handle, {key_val, ["事件bufficon"], [id], all}}
%%,{progress_reward, cb_fun_lua, handle, {type_val, ["探索进度奖励"], [id], [num,items]}}
]
,sheet = [
{["事件總覽"], [
#f_column{type = int, name = evt_id, desc = "事件編號",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 = bstr, name = name, desc = "名稱",mod = all}
,#f_column{type = int, name = weight, desc = "權重",mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = bstr, name = icon, desc = "團標",mod = all}
,#f_column{type = bstr, name = interface_desc, desc = "界面描述"}
,#f_column{type = term, name = drop, desc = "掉落", mod = server}
]}
,{["道具"], [
#f_column{type = int, name = id, desc = "基础ID"}
,#f_column{type = bstr, name = name, desc = "物品名字"}
,#f_column{type = int, name = icon, desc = "图标ID"}
,#f_column{type = int, name = num, desc = "最大堆叠数"}
,#f_column{type = bstr, name = desc, desc = "描述"}
,#f_column{type = bstr, name = tip, desc = "描述"}
,#f_column{type = bstr, name = log, desc = "描述"}
]}
,{["层数据"], [
#f_column{type = int, name = floor, desc = "层序号",mod = all}
,#f_column{type = term, name = block, desc = "阻擋數量",mod = all}
,#f_column{type = term, name = mon, desc = "事件:小怪",mod = all}
,#f_column{type = term, name = mon2, desc = "事件:精英",mod = all}
,#f_column{type = term, name = boss, desc = "事件:boss",mod = all}
,#f_column{type = term, name = npc1, desc = "NPC1",mod = all}
,#f_column{type = term, name = npc2, desc = "NPC2",mod = all}
,#f_column{type = term, name = npc3, desc = "NPC3",mod = all}
,#f_column{type = term, name = shop, desc = "商店",mod = all}
,#f_column{type = term, name = trap, desc = "陷阱",mod = all}
,#f_column{type = term, name = bless, desc = "奇遇",mod = all}
,#f_column{type = term, name = foster, desc = "改造台",mod = all}
]}
,{["常量配置"], [
#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 = "标签", primary = true, mod = client}
#f_column{type = bstr, name = title, desc = "标签名", mod = client}
,#f_column{type = bstr, name = desc, desc = "内容", mod = client}
]}
,{["NPC1"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = int, name = group, desc = "", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = term, name = evt, desc = "事件", mod = all}
,#f_column{type = int, name = rand, desc = "权重", mod = all}
,#f_column{type = bstr, name = tip, desc = "NPC话语", mod = all}
,#f_column{type = int, name = icon, desc = "图标ID"}
,#f_column{type = bstr, name = log, desc = "log描述", mod = all}
,#f_column{type = bstr, name = name, desc = "道具名称", mod = all}
]}
,{["NPC2"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = int, name = group, desc = "", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = term, name = evt, desc = "事件", mod = all}
,#f_column{type = int, name = rand, desc = "权重", mod = all}
,#f_column{type = bstr, name = tip, desc = "NPC话语", mod = all}
,#f_column{type = int, name = icon, desc = "图标ID"}
,#f_column{type = bstr, name = log, desc = "log描述", mod = all}
,#f_column{type = bstr, name = name, desc = "道具名称", mod = all}
]}
,{["NPC3"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = int, name = group, desc = "", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = term, name = evt, desc = "事件", mod = all}
,#f_column{type = int, name = rand, desc = "权重", mod = all}
,#f_column{type = bstr, name = tip, desc = "NPC话语", mod = all}
,#f_column{type = int, name = icon, desc = "图标ID"}
,#f_column{type = bstr, name = log, desc = "log描述", mod = all}
]}
,{["旅行商人"],[
#f_column{type = int, name = id, desc = "编号"}
,#f_column{type = int, name = group, desc = "组号"}
,#f_column{type = bstr, name = desc, desc = "道具名称"}
,#f_column{type = term, name = evt, desc = "道具效果"}
,#f_column{type = int, name = num, desc = "道具数量"}
,#f_column{type = int, name = rand, desc = "权重"}
,#f_column{type = term, name = pay_rand, desc = "价格"}
,#f_column{type = int, name = price, desc = "原价"}
,#f_column{type = bstr, name = log, desc = "log描述", mod = all}
,#f_column{type = int, name = icon, desc = "图标ID"}
,#f_column{type = bstr, name = name, desc = "道具名称", mod = all}
,#f_column{type = bstr, name = tip, desc = "界面提示"}
]}
,{["陷阱"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = int, name = group, desc = "", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = term, name = evt, desc = "事件", mod = all}
,#f_column{type = int, name = rand, desc = "权重", mod = all}
,#f_column{type = bstr, name = tip, desc = "界面提示", mod = all}
,#f_column{type = bstr, name = log, desc = "log描述", mod = all}
,#f_column{type = bstr, name = effect, desc = "特效", mod = client}
]}
,{["祝福"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = int, name = group, desc = "", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = term, name = evt, desc = "事件", mod = all}
,#f_column{type = int, name = rand, desc = "权重", mod = all}
,#f_column{type = bstr, name = tip, desc = "界面提示", mod = all}
,#f_column{type = bstr, name = log, desc = "log描述", mod = all}
,#f_column{type = bstr, name = effect, desc = "特效", mod = client}
]}
,{["改造台"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = int, name = group, desc = "", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = term, name = evt, desc = "事件", mod = all}
,#f_column{type = bstr, name = log, desc = "log描述", mod = all}
,#f_column{type = bstr, name = tip, 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}
,#f_column{type = term, name = week_items, desc = "周奖励",mod = all}
]}
,{["英雄隨機"], [
#f_column{type = int, name = id, desc = "欄位", mod = all}
,#f_column{type = term, name = partners, desc = "英雄庫",mod = all}
]}
,{["事件bufficon"], [
#f_column{type = int, name = id, desc = "编号", mod = all}
,#f_column{type = bstr, name = desc, desc = "BUFF描述", add_list_sign=false, mod = all}
,#f_column{type = term, name = icon, desc = "buff图标",mod = all}
,#f_column{type = int, name = num, desc = "数量",mod = all}
]}
,{["掉落庫"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = int, name = drop_id, desc = "掉落id", mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = item_id, desc = "物品id", mod = all}
,#f_column{type = bstr, name = item_name, desc = "物品名称", mod = all}
,#f_column{type = int, name = num, desc = "物品数量", mod = all}
,#f_column{type = int, name = rand, desc = "概率因子", mod = all}
]}
]
}.
evt_type() ->
[
{"无事件", null, 0}
,{"battle1", mon1, 1}
,{"battle2", mon2, 2}
,{"battle3", boss, 3}
,{"NPC1", npc1, 4}
,{"NPC2", npc2, 5}
,{"NPC3", npc3, 6}
,{"shop", shop, 7}
,{"trap", trap, 8}
,{"bless", bless, 9}
,{"foster", foster, 10}
,{"block", block, 11}
,{"exit", exit, 12}
].