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

233 lines
13 KiB
Erlang

%%%-------------------------------------------------------------------
%%% @author Administrator
%%% @copyright (C) 2023, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 07. 8月 2023 13:28
%%%-------------------------------------------------------------------
-module(adventure_weekly_data).
-author("Administrator").
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = adventure_weekly_data
,lua_name = adventure_weekly_data
,desc = "神界冒险无尽模式配置数据"
,source = "adventure_weekly_data.xml"
,target = "adventure_weekly_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, ["事件库"], evt_id}}
,{get_evt, cb_fun, handle, {get_record, ["事件库"], evt_id, new_map, all}}
,{get_group, cb_fun, handle, {tuple_type, ["事件库"], evt_group, [evt_id, weight]}}
,{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_exch_by_group, cb_fun, handle, {tuple_type, ["事件库"], shop_point, [evt_id, weight]}}
,{get_point, cb_fun, handle, {get_record, ["层数据"], point, new_map, all}}
,{reward, cb_fun, handle, {get_tuple, ["各级奖励"], id, rewards}}
,{list_round_reward, cb_fun, handle, {tuple_list, ["各级奖励"], id}}
,{get_item, cb_fun, handle, {get_tuple, ["事件库"], evt_id, evt}}
,{get_all_partner_up, cb_fun, handle, {tuple_list, ["夥伴buff"], id}}
,{get_all_camp_up, cb_fun, handle, {tuple_list, ["陣營buff"], id}}
,{get_partner_buff, cb_fun, handle, {get_tuple, ["夥伴buff"], id, buff}}
,{get_camp_buff, cb_fun, handle, {get_tuple, ["陣營buff"], id, buff}}
,{{get_buff_icon, 0}, cb_fun, handle, {get_tuple, ["事件bufficon"], id, num}}
,{get_drop, cb_fun, handle, {get_tuple, ["事件库"], evt_type, drop_id}}
,{get_drop_group, cb_fun, handle, {tuple_type, ["掉落"], drop_id, [id, rand]}}
,{get_drop_info, cb_fun, handle, {get_tuple, ["掉落"], id, all}}
,{get_log, cb_fun, handle, {get_tuple, ["事件库"], evt_id, log}}
]
,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}}
,{round_reward_list, 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, {key_val, ["玩法說明"], [title], all}}
,{adventure_const, cb_fun_json, handle, {key_val, ["常量配置"], [key], all}}
,{floor_reward, cb_fun_json, handle, {key_val, ["层数据"], [floor], all}}
,{round_reward_list, cb_fun_json, handle, {key_val, ["各级奖励"], [id], all}}
,{partner_buff, cb_fun_json, handle, {key_val, ["夥伴buff"], [id], all}}
,{camp_buff, cb_fun_json, handle, {key_val, ["陣營buff"], [id], all}}
,{buff_icon, cb_fun_json, handle, {key_val, ["事件bufficon"], [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]}}
]
,sheet = [
{["事件库"], [
#f_column{type = int, name = evt_id, desc = "事件編號",mod = all}
,#f_column{type = int, name = evt_group, desc = "组别",mod = all}
,#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 = term, name = evt, desc = "事件", mod = all}
,#f_column{type = bstr, name = icon, desc = "團標",mod = all}
,#f_column{type = int, name = item_icon, desc = "道具图标ID", mod = client}
,#f_column{type = bstr, name = item_name, 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 = term, name = drop_id, desc = "战斗掉落",mod = server}
,#f_column{type = int, name = shop_point, desc = "商店栏位",mod = all}
,#f_column{type = term, name = pay_rand, desc = "价格",mod = all}
,#f_column{type = bstr, name = effect, desc = "特效", mod = client}
]}
,{["层数据"], [
#f_column{type = int, name = floor, desc = "地块编号",mod = all}
,#f_column{type = term, name = point, desc = "坐标",mod = all, add_list_sign=false}
,#f_column{type = int, name = week1, desc = "周期1",mod = all}
,#f_column{type = int, name = week2, desc = "周期2",mod = all}
,#f_column{type = int, name = week3, desc = "周期3",mod = all}
,#f_column{type = int, name = week4, desc = "周期4",mod = all}
,#f_column{type = int, name = week5, desc = "周期5",mod = all}
,#f_column{type = int, name = week6, desc = "周期6",mod = all}
,#f_column{type = int, name = week7, desc = "周期7",mod = all}
,#f_column{type = int, name = week8, desc = "周期8",mod = all}
,#f_column{type = int, name = week9, desc = "周期9",mod = all}
,#f_column{type = int, name = week10, desc = "周期10",mod = all}
,#f_column{type = int, name = week11, desc = "周期11",mod = all}
,#f_column{type = int, name = week12, desc = "周期12",mod = all}
,#f_column{type = int, name = week13, desc = "周期13",mod = all}
,#f_column{type = int, name = week14, desc = "周期14",mod = all}
,#f_column{type = int, name = week15, desc = "周期15",mod = all}
,#f_column{type = int, name = week16, desc = "周期16",mod = all}
,#f_column{type = int, name = week17, desc = "周期17",mod = all}
,#f_column{type = int, name = week18, desc = "周期18",mod = all}
,#f_column{type = int, name = week19, desc = "周期19",mod = all}
,#f_column{type = int, name = week20, desc = "周期20",mod = all}
,#f_column{type = int, name = week21, desc = "周期21",mod = all}
,#f_column{type = int, name = week22, desc = "周期22",mod = all}
,#f_column{type = int, name = week23, desc = "周期23",mod = all}
,#f_column{type = int, name = week24, desc = "周期24",mod = all}
,#f_column{type = int, name = week25, desc = "周期25",mod = all}
,#f_column{type = int, name = week26, desc = "周期26",mod = all}
,#f_column{type = int, name = week27, desc = "周期27",mod = all}
,#f_column{type = int, name = week28, desc = "周期28",mod = all}
,#f_column{type = int, name = week29, desc = "周期29",mod = all}
,#f_column{type = int, name = week30, desc = "周期30",mod = all}
,#f_column{type = int, name = week31, desc = "周期31",mod = all}
,#f_column{type = int, name = week32, desc = "周期32",mod = all}
,#f_column{type = int, name = week33, desc = "周期33",mod = all}
,#f_column{type = int, name = week34, desc = "周期34",mod = all}
,#f_column{type = int, name = week35, desc = "周期35",mod = all}
,#f_column{type = int, name = week36, desc = "周期36",mod = all}
,#f_column{type = int, name = week37, desc = "周期37",mod = all}
,#f_column{type = int, name = week38, desc = "周期38",mod = all}
,#f_column{type = int, name = week39, desc = "周期39",mod = all}
,#f_column{type = int, name = week40, desc = "周期40",mod = all}
,#f_column{type = int, name = week41, desc = "周期41",mod = all}
,#f_column{type = int, name = week42, desc = "周期42",mod = all}
,#f_column{type = int, name = week43, desc = "周期43",mod = all}
,#f_column{type = int, name = week44, desc = "周期44",mod = all}
,#f_column{type = int, name = week45, desc = "周期45",mod = all}
,#f_column{type = int, name = week46, desc = "周期46",mod = all}
,#f_column{type = int, name = week47, desc = "周期47",mod = all}
,#f_column{type = int, name = week48, desc = "周期48",mod = all}
,#f_column{type = int, name = week49, desc = "周期49",mod = all}
,#f_column{type = int, name = week50, desc = "周期50",mod = all}
,#f_column{type = int, name = week51, desc = "周期51",mod = all}
,#f_column{type = int, name = week52, desc = "周期52",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 = 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 = desc, desc = "奖励描述",mod = all}
,#f_column{type = term, name = rewards, desc = "奖励内容",mod = all}
]}
,{["夥伴buff"], [
#f_column{type = term, name = id, desc = "ID", mod = all}
,#f_column{type = term, name = buff, desc = "BUFF", add_list_sign=false, mod = all}
,#f_column{type = bstr, name = desc, desc = "描述",mod = all}
]}
,{["陣營buff"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = term, name = buff, desc = "BUFF", add_list_sign=false, mod = all}
,#f_column{type = bstr, name = desc, 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 = evt_id, desc = "基础ID",mod = all}
,#f_column{type = bstr, name = item_name, desc = "名稱",mod = all}
,#f_column{type = bstr, name = item_icon, desc = "團標",mod = all}
,#f_column{type = int, name = num, desc = "最大堆叠数"}
,#f_column{type = bstr, name = desc, desc = "描述", mod = all}
,#f_column{type = int, name = evt_group, desc = "组别",mod = all}
,#f_column{type = int, name = evt_type, desc = "類型", mod = all}
,#f_column{type = int, name = weight, desc = "權重",mod = all}
,#f_column{type = term, name = evt, desc = "事件", mod = all}
,#f_column{type = int, name = icon, desc = "道具图标ID", mod = client}
,#f_column{type = bstr, name = tip, desc = "界面描述",mod = all}
,#f_column{type = bstr, name = log, desc = "log",mod = all}
,#f_column{type = int, name = drop_id, desc = "战斗掉落",mod = server}
,#f_column{type = int, name = shop_point, desc = "商店栏位",mod = all}
,#f_column{type = term, name = pay_rand, desc = "价格",mod = all}
,#f_column{type = bstr, name = name, desc = "道具名称",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 = 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}
,{"born", born, 13}
].