diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua
index 3a6117fe..f91aab77 100644
--- a/lua/app/common/bi_report.lua
+++ b/lua/app/common/bi_report.lua
@@ -150,6 +150,10 @@ BIReport.ITEM_GET_TYPE = {
ACT_FOURTEEN_DAY_TASK = "ActFourteenDayTask",
ACT_FOURTEEN_DAY_EXCHANGE = "ActFourteenDayExchange",
FOURTEEN_DAY_GIFT = "FourteenDayGift",
+ DUNGEON_RUNE_START = "DungeonRuneStart",
+ DUNGEON_RUNE_SETTLEMENT = "DungeonRuneSettlement",
+ DUNGEON_RUNE_SWEEP = "DungeonRuneSweep",
+ DUNGEON_RUNE_BUY_WING = "DungeonRunebuyWing",
}
BIReport.ADS_CLICK_TYPE = {
@@ -162,6 +166,7 @@ BIReport.ADS_CLICK_TYPE = {
ARENA_REMATCH = "ArenaRematch",
ARENA_AD_BOX = "ArenaAdBox",
ARMOR_FUND_AD = "ArmorFundAd",
+ DUNGEON_RUNE_REBIRTH = "DungeonRuneRebirth",
MALL_DAILY = "MallDaily",
MALL_DAILY_RESET = "MallDailyReset",
@@ -199,6 +204,7 @@ BIReport.BATTLE_TYPE = {
["6"] = "DungeonWeapon",
["7"] = "DungeonArmor",
["8"] = "ActBossRush",
+ ["9"] = "DungeonRune",
}
BIReport.GIFT_TYPE = {
diff --git a/lua/app/common/data_manager.lua b/lua/app/common/data_manager.lua
index e15ad478..d38f5f9a 100644
--- a/lua/app/common/data_manager.lua
+++ b/lua/app/common/data_manager.lua
@@ -188,6 +188,7 @@ function DataManager:initWithServerData(data)
end
self.HeroFundData:init(data.hero_fund)
self.FourteenDayData:init(data.fourteen_bounty)
+ self.DungeonData:initDungeonRune(data.chapter_rune_challenge)
-- 任务数据最后初始化,依赖其他模块的数据
self.TaskData:init()
diff --git a/lua/app/common/event_manager.lua b/lua/app/common/event_manager.lua
index 3a8e4ab6..52ea3a5a 100644
--- a/lua/app/common/event_manager.lua
+++ b/lua/app/common/event_manager.lua
@@ -62,6 +62,7 @@ EventManager.CUSTOM_EVENT = {
ACTIVITY_SUMMER_END = "ACTIVITY_SUMMER_END",
MAIN_UI_CHECK_SIDE_BAR = "MAIN_UI_CHECK_SIDE_BAR",
FORMATION_CHANGE = "FORMATION_CHANGE",
+ BATTLE_REBIRTH = "BATTLE_REBIRTH",
}
-- 此方法不能直接在外部调用,请使用例如BaseUI,BaseModule等封装好的接口
diff --git a/lua/app/common/module_manager.lua b/lua/app/common/module_manager.lua
index d2dcadbb..684868be 100644
--- a/lua/app/common/module_manager.lua
+++ b/lua/app/common/module_manager.lua
@@ -75,6 +75,8 @@ local MODULE_PATHS = {
ActBossRushManager = "app/module/activity/act_boss_rush/act_boss_rush_manager",
-- 新手14天乐
FourteenDayManager = "app/module/activity/fourteen_day/fourteen_day_manager",
+ -- 符文副本
+ DungeonRuneManager = "app/module/dungeon_rune/dungeon_rune_manager",
}
-- 这里的key对应func_open里的id
@@ -106,6 +108,7 @@ ModuleManager.MODULE_KEY = {
EQUIP_WEAPON = "equip_weapon_open", -- 武器
EQUIP_ARMOR = "equip_armor_open", -- 防具
SKIN = "skin_open", -- 皮肤
+ RUNES_OPEN = "runes_open", -- 符文
}
local _moduleMgrs = {}
diff --git a/lua/app/config/buff.lua b/lua/app/config/buff.lua
index 7e0ced84..1d56329c 100644
--- a/lua/app/config/buff.lua
+++ b/lua/app/config/buff.lua
@@ -53,9 +53,7 @@ local buff = {
["stack"]=2,
["position"]=1,
["decr"]=1,
- ["icon"]="dec_dmg_red_add",
- ["show_name"]=true,
- ["ispercent"]=1
+ ["icon"]="dec_dmg_red_add"
},
[8]={
["id"]=8,
@@ -64,9 +62,7 @@ local buff = {
["stack"]=2,
["position"]=2,
["decr"]=1,
- ["icon"]="dec_dmg_yellow_add",
- ["show_name"]=true,
- ["ispercent"]=1
+ ["icon"]="dec_dmg_yellow_add"
},
[9]={
["id"]=9,
@@ -75,9 +71,7 @@ local buff = {
["stack"]=2,
["position"]=3,
["decr"]=1,
- ["icon"]="dec_dmg_green_add",
- ["show_name"]=true,
- ["ispercent"]=1
+ ["icon"]="dec_dmg_green_add"
},
[10]={
["id"]=10,
@@ -86,9 +80,7 @@ local buff = {
["stack"]=2,
["position"]=4,
["decr"]=1,
- ["icon"]="dec_dmg_blue_add",
- ["show_name"]=true,
- ["ispercent"]=1
+ ["icon"]="dec_dmg_blue_add"
},
[11]={
["id"]=11,
@@ -97,9 +89,7 @@ local buff = {
["stack"]=2,
["position"]=5,
["decr"]=1,
- ["icon"]="dec_dmg_purple_add",
- ["show_name"]=true,
- ["ispercent"]=1
+ ["icon"]="dec_dmg_purple_add"
},
[12]={
["id"]=12,
@@ -107,9 +97,7 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["decr"]=1,
- ["icon"]="dec_dmg_all_add",
- ["show_name"]=true,
- ["ispercent"]=1
+ ["icon"]="dec_dmg_all_add"
},
[13]={
["id"]=13,
@@ -204,8 +192,7 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["decr"]=1,
- ["icon"]="weakness_all_add",
- ["ispercent"]=1
+ ["icon"]="weakness_all_add"
},
[25]={
["id"]=25,
@@ -419,7 +406,6 @@ local buff = {
["formula"]=4,
["icon"]="burn",
["show_name"]=true,
- ["ispercent"]=1,
["fx_take"]={
36
}
@@ -430,8 +416,6 @@ local buff = {
["buff_type"]=1,
["decr"]=2,
["icon"]="vulnerable",
- ["show_name"]=true,
- ["ispercent"]=1,
["fx_get"]={
34
}
@@ -460,7 +444,6 @@ local buff = {
["formula"]=4,
["icon"]="poison",
["show_name"]=true,
- ["ispercent"]=1,
["fx_take"]={
35
}
@@ -484,7 +467,6 @@ local buff = {
["decr"]=2,
["icon"]="corrupt",
["show_name"]=true,
- ["ispercent"]=1,
["fx_get"]={
19
}
@@ -497,7 +479,6 @@ local buff = {
["formula"]=4,
["icon"]="bleed",
["show_name"]=true,
- ["ispercent"]=1,
["fx_take"]={
31
}
@@ -509,7 +490,6 @@ local buff = {
["decr"]=2,
["icon"]="weaken",
["show_name"]=true,
- ["ispercent"]=1,
["fx_continued"]={
33
}
@@ -550,7 +530,7 @@ local buff = {
["id"]=59,
["name"]="first_hand",
["buff_type"]=1,
- ["decr"]=1,
+ ["decr"]=3,
["icon"]="first_hand"
},
[60]={
@@ -579,8 +559,7 @@ local buff = {
["stack"]=1,
["decr"]=1,
["icon"]="counterattack",
- ["show_name"]=true,
- ["ispercent"]=1
+ ["show_name"]=true
},
[63]={
["id"]=63,
@@ -589,7 +568,6 @@ local buff = {
["decr"]=1,
["icon"]="thorns",
["show_name"]=true,
- ["ispercent"]=1,
["fx_continued"]={
18
}
@@ -787,7 +765,7 @@ local buff = {
["decr"]=1,
["formula"]=3,
["icon"]="rebirth",
- ["fx_disappear"]={
+ ["fx_take"]={
44
}
},
@@ -812,7 +790,6 @@ local buff = {
["decr"]=1,
["formula"]=3,
["icon"]="self_heal",
- ["show_name"]=true,
["fx_take"]={
300027
}
@@ -822,103 +799,14 @@ local buff = {
["name"]="charm",
["buff_type"]=7,
["decr"]=2,
- ["icon"]="charm",
- ["show_name"]=true
+ ["icon"]="charm"
},
[88]={
["id"]=88,
["name"]="immune",
["buff_type"]=7,
["decr"]=1,
- ["icon"]="immune",
- ["show_name"]=true
- },
- [89]={
- ["id"]=89,
- ["name"]="forever_first_hand",
- ["buff_type"]=1,
- ["decr"]=3,
- ["icon"]="first_hand"
- },
- [90]={
- ["id"]=90,
- ["name"]="forever_counterattack",
- ["buff_type"]=1,
- ["stack"]=1,
- ["decr"]=3,
- ["icon"]="counterattack",
- ["ispercent"]=1
- },
- [91]={
- ["id"]=91,
- ["name"]="forever_dec_dmg_red_add",
- ["buff_type"]=1,
- ["stack"]=2,
- ["position"]=1,
- ["decr"]=3,
- ["icon"]="dec_dmg_red_add",
- ["ispercent"]=1
- },
- [92]={
- ["id"]=92,
- ["name"]="forever_dec_dmg_yellow_add",
- ["buff_type"]=1,
- ["stack"]=2,
- ["position"]=2,
- ["decr"]=3,
- ["icon"]="dec_dmg_yellow_add",
- ["ispercent"]=1
- },
- [93]={
- ["id"]=93,
- ["name"]="forever_dec_dmg_green_add",
- ["buff_type"]=1,
- ["stack"]=2,
- ["position"]=3,
- ["decr"]=3,
- ["icon"]="dec_dmg_green_add",
- ["ispercent"]=1
- },
- [94]={
- ["id"]=94,
- ["name"]="forever_dec_dmg_blue_add",
- ["buff_type"]=1,
- ["stack"]=2,
- ["position"]=4,
- ["decr"]=3,
- ["icon"]="dec_dmg_blue_add",
- ["ispercent"]=1
- },
- [95]={
- ["id"]=95,
- ["name"]="forever_dec_dmg_purple_add",
- ["buff_type"]=1,
- ["stack"]=2,
- ["position"]=5,
- ["decr"]=3,
- ["icon"]="dec_dmg_purple_add",
- ["ispercent"]=1
- },
- [96]={
- ["id"]=96,
- ["name"]="forever_dec_dmg_all_add",
- ["buff_type"]=1,
- ["stack"]=2,
- ["decr"]=3,
- ["icon"]="dec_dmg_all_add",
- ["ispercent"]=1
- },
- [97]={
- ["id"]=97,
- ["name"]="forever_thorns",
- ["buff_type"]=1,
- ["decr"]=3,
- ["icon"]="thorns",
- ["show_name"]=true,
- ["ispercent"]=1,
- ["fx_continued"]={
- 18
- }
+ ["icon"]="immune"
}
}
local keys = {
@@ -1010,21 +898,12 @@ local keys = {
["ocean_shield"]=buff[85],
["self_heal"]=buff[86],
["charm"]=buff[87],
- ["immune"]=buff[88],
- ["forever_first_hand"]=buff[89],
- ["forever_counterattack"]=buff[90],
- ["forever_dec_dmg_red_add"]=buff[91],
- ["forever_dec_dmg_yellow_add"]=buff[92],
- ["forever_dec_dmg_green_add"]=buff[93],
- ["forever_dec_dmg_blue_add"]=buff[94],
- ["forever_dec_dmg_purple_add"]=buff[95],
- ["forever_dec_dmg_all_add"]=buff[96],
- ["forever_thorns"]=buff[97]
+ ["immune"]=buff[88]
}
}
local config = {
data=buff,
keys=keys,
-count=97
+count=88
}
return config
\ No newline at end of file
diff --git a/lua/app/config/const.lua b/lua/app/config/const.lua
index af101080..61d527c4 100644
--- a/lua/app/config/const.lua
+++ b/lua/app/config/const.lua
@@ -492,19 +492,6 @@ local const = {
["activity_pvp_bounty_point"]={
["value"]=10
},
- ["activity_pvp_refresh_ad_times"]={
- ["value"]=1
- },
- ["activity_pvp_refresh_cost"]={
- ["reward"]={
- ["type"]=1,
- ["type_for_nothing"]="Vw==",
- ["id"]=2,
- ["id_for_nothing"]="VA==",
- ["num"]=10,
- ["num_for_nothing"]="Vwg="
- }
- },
["activity_skin_fight_id_1"]={
["value"]=4104
},
@@ -523,6 +510,6 @@ local const = {
}
}
local config = {
-data=const,count=104
+data=const,count=102
}
return config
\ No newline at end of file
diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua
index 891ee1ca..f1be157a 100644
--- a/lua/app/config/localization/localization_global_const.lua
+++ b/lua/app/config/localization/localization_global_const.lua
@@ -527,27 +527,13 @@ local LocalizationGlobalConst =
DUNGEON_RUNE_TIP_4 = "DUNGEON_RUNE_TIP_4",
DUNGEON_RUNE_TIP_5 = "DUNGEON_RUNE_TIP_5",
UNFINISHED = "UNFINISHED",
- RUNES_DESC_1 = "RUNES_DESC_1",
- RUNES_DESC_2 = "RUNES_DESC_2",
- RUNES_DESC_3 = "RUNES_DESC_3",
- RUNES_DESC_4 = "RUNES_DESC_4",
- RUNES_DESC_5 = "RUNES_DESC_5",
- RUNES_DESC_6 = "RUNES_DESC_6",
- RUNES_DESC_7 = "RUNES_DESC_7",
- RUNES_DESC_8 = "RUNES_DESC_8",
- RUNES_DESC_9 = "RUNES_DESC_9",
- RUNES_DESC_10 = "RUNES_DESC_10",
- RUNES_DESC_11 = "RUNES_DESC_11",
- RUNES_DESC_12 = "RUNES_DESC_12",
- RUNES_DESC_13 = "RUNES_DESC_13",
- RUNES_DESC_14 = "RUNES_DESC_14",
- RUNES_DESC_15 = "RUNES_DESC_15",
- RUNES_DESC_16 = "RUNES_DESC_16",
- RUNES_DESC_17 = "RUNES_DESC_17",
- RUNES_DESC_18 = "RUNES_DESC_18",
- RUNES_DESC_19 = "RUNES_DESC_19",
- RUNES_DESC_20 = "RUNES_DESC_20",
- RUNES_DESC_21 = "RUNES_DESC_21",
+
+ ["DUNGEON_RUNE_DESC_1"]= "DUNGEON_RUNE_DESC_1",
+ ["DUNGEON_RUNE_DESC_2"] = "DUNGEON_RUNE_DESC_2",
+ ["DUNGEON_RUNE_DESC_3"] = "DUNGEON_RUNE_DESC_3",
+ ["DUNGEON_RUNE_DESC_4"] = "DUNGEON_RUNE_DESC_4",
+ ["DUNGEON_RUNE_DESC_5"] = "DUNGEON_RUNE_DESC_5",
+ DUNGEON_RUNE_DESC_6 = "DUNGEON_RUNE_DESC_6",
}
return LocalizationGlobalConst
\ No newline at end of file
diff --git a/lua/app/config/monster_dungeon_rune.lua b/lua/app/config/monster_dungeon_rune.lua
index 151cd5c8..a7aeb674 100644
--- a/lua/app/config/monster_dungeon_rune.lua
+++ b/lua/app/config/monster_dungeon_rune.lua
@@ -2,8 +2,8 @@ local monster_dungeon_rune = {
[108]={
["none"]="大史莱姆(红)",
["monster_base"]=10027,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=681920000,
+ ["atk"]=6080000,
["atk_times"]=3,
["hurt_skill"]={
20076,
@@ -15,8 +15,8 @@ local monster_dungeon_rune = {
[208]={
["none"]="大史莱姆(黄)",
["monster_base"]=10025,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=278310000,
+ ["atk"]=4040000,
["atk_times"]=3,
["hurt_skill"]={
20070,
@@ -28,8 +28,8 @@ local monster_dungeon_rune = {
[308]={
["none"]="大史莱姆(蓝)",
["monster_base"]=10026,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=278310000,
+ ["atk"]=4040000,
["atk_times"]=3,
["hurt_skill"]={
20073,
@@ -41,8 +41,8 @@ local monster_dungeon_rune = {
[408]={
["none"]="大史莱姆(绿)",
["monster_base"]=10024,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=205490000,
+ ["atk"]=3950000,
["atk_times"]=3,
["hurt_skill"]={
20067,
@@ -54,8 +54,8 @@ local monster_dungeon_rune = {
[508]={
["none"]="盾刀骷髅兵",
["monster_base"]=10009,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=482700000,
+ ["atk"]=5690000,
["atk_times"]=3,
["hurt_skill"]={
20025,
@@ -67,8 +67,8 @@ local monster_dungeon_rune = {
[608]={
["none"]="盾刀骷髅兵(有头盔)",
["monster_base"]=10039,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=593840000,
+ ["atk"]=5780000,
["atk_times"]=3,
["hurt_skill"]={
20112,
@@ -80,8 +80,8 @@ local monster_dungeon_rune = {
[708]={
["none"]="哥布林匕首(蓝)",
["monster_base"]=10001,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=474020000,
+ ["atk"]=5340000,
["atk_times"]=3,
["hurt_skill"]={
20001,
@@ -93,8 +93,8 @@ local monster_dungeon_rune = {
[808]={
["none"]="哥布林匕首(紫)",
["monster_base"]=10003,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=554250000,
+ ["atk"]=5310000,
["atk_times"]=3,
["hurt_skill"]={
20007,
@@ -106,8 +106,8 @@ local monster_dungeon_rune = {
[908]={
["none"]="哥布林法师(红)",
["monster_base"]=10008,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=298160000,
+ ["atk"]=4390000,
["atk_times"]=3,
["hurt_skill"]={
20022,
@@ -119,8 +119,8 @@ local monster_dungeon_rune = {
[1008]={
["none"]="哥布林法师(蓝)",
["monster_base"]=10005,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=525000000,
+ ["atk"]=5020000,
["atk_times"]=3,
["hurt_skill"]={
20013,
@@ -132,8 +132,8 @@ local monster_dungeon_rune = {
[1108]={
["none"]="哥布林法师(绿)",
["monster_base"]=10006,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=372560000,
+ ["atk"]=4530000,
["atk_times"]=3,
["hurt_skill"]={
20016,
@@ -145,8 +145,8 @@ local monster_dungeon_rune = {
[1208]={
["none"]="哥布林法师(紫)",
["monster_base"]=10007,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=450590000,
+ ["atk"]=5230000,
["atk_times"]=3,
["hurt_skill"]={
20019,
@@ -158,8 +158,8 @@ local monster_dungeon_rune = {
[1308]={
["none"]="哥布林斧头(红)",
["monster_base"]=10002,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=426740000,
+ ["atk"]=4940000,
["atk_times"]=3,
["hurt_skill"]={
20004,
@@ -171,8 +171,8 @@ local monster_dungeon_rune = {
[1408]={
["none"]="哥布林棍棒(绿)",
["monster_base"]=10004,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=391500000,
+ ["atk"]=5410000,
["atk_times"]=3,
["hurt_skill"]={
20010,
@@ -184,8 +184,8 @@ local monster_dungeon_rune = {
[1508]={
["none"]="黑色食人花",
["monster_base"]=10050,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=474020000,
+ ["atk"]=5340000,
["atk_times"]=3,
["hurt_skill"]={
20145,
@@ -197,8 +197,8 @@ local monster_dungeon_rune = {
[1608]={
["none"]="红色蝙蝠恶魔",
["monster_base"]=10052,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=507910000,
+ ["atk"]=5800000,
["atk_times"]=3,
["hurt_skill"]={
20151,
@@ -210,8 +210,8 @@ local monster_dungeon_rune = {
[1708]={
["none"]="红色恶魔野猪",
["monster_base"]=10051,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=347620000,
+ ["atk"]=4170000,
["atk_times"]=3,
["hurt_skill"]={
20148,
@@ -223,8 +223,8 @@ local monster_dungeon_rune = {
[1808]={
["none"]="红色蜥蜴剑士",
["monster_base"]=10047,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=324830000,
+ ["atk"]=4460000,
["atk_times"]=3,
["hurt_skill"]={
20136,
@@ -236,8 +236,8 @@ local monster_dungeon_rune = {
[1908]={
["none"]="红色幽灵恶魔",
["monster_base"]=10055,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=309200000,
+ ["atk"]=3730000,
["atk_times"]=3,
["hurt_skill"]={
20160,
@@ -249,8 +249,8 @@ local monster_dungeon_rune = {
[2008]={
["none"]="红色蜘蛛",
["monster_base"]=10046,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=507910000,
+ ["atk"]=5800000,
["atk_times"]=3,
["hurt_skill"]={
20133,
@@ -262,8 +262,8 @@ local monster_dungeon_rune = {
[2108]={
["none"]="黄发剑士",
["monster_base"]=10030,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=554250000,
+ ["atk"]=5310000,
["atk_times"]=3,
["hurt_skill"]={
20085,
@@ -275,8 +275,8 @@ local monster_dungeon_rune = {
[2208]={
["none"]="火山甲壳虫",
["monster_base"]=10061,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=482700000,
+ ["atk"]=5690000,
["atk_times"]=3,
["hurt_skill"]={
20178,
@@ -288,8 +288,8 @@ local monster_dungeon_rune = {
[2308]={
["none"]="火山岩石怪",
["monster_base"]=10060,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=298160000,
+ ["atk"]=4390000,
["atk_times"]=3,
["hurt_skill"]={
20175,
@@ -301,8 +301,8 @@ local monster_dungeon_rune = {
[2408]={
["none"]="剑盾士兵(黄发)",
["monster_base"]=10034,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=298160000,
+ ["atk"]=4390000,
["atk_times"]=3,
["hurt_skill"]={
20097,
@@ -314,8 +314,8 @@ local monster_dungeon_rune = {
[2508]={
["none"]="剑盾士兵(蓝发)",
["monster_base"]=10035,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=372560000,
+ ["atk"]=4530000,
["atk_times"]=3,
["hurt_skill"]={
20100,
@@ -327,8 +327,8 @@ local monster_dungeon_rune = {
[2608]={
["none"]="骷髅弓箭手",
["monster_base"]=10038,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=391500000,
+ ["atk"]=5410000,
["atk_times"]=3,
["hurt_skill"]={
20109,
@@ -340,8 +340,8 @@ local monster_dungeon_rune = {
[2708]={
["none"]="骷髅枪兵",
["monster_base"]=10010,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=347620000,
+ ["atk"]=4170000,
["atk_times"]=3,
["hurt_skill"]={
20028,
@@ -353,8 +353,8 @@ local monster_dungeon_rune = {
[2808]={
["none"]="骷髅小法师",
["monster_base"]=10040,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=482700000,
+ ["atk"]=5690000,
["atk_times"]=3,
["hurt_skill"]={
20115,
@@ -366,8 +366,8 @@ local monster_dungeon_rune = {
[2908]={
["none"]="蓝发剑士",
["monster_base"]=10031,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=345780000,
+ ["atk"]=4720000,
["atk_times"]=3,
["hurt_skill"]={
20088,
@@ -379,8 +379,8 @@ local monster_dungeon_rune = {
[3008]={
["none"]="蓝色蝙蝠恶魔",
["monster_base"]=10041,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=391500000,
+ ["atk"]=5410000,
["atk_times"]=3,
["hurt_skill"]={
20118,
@@ -392,8 +392,8 @@ local monster_dungeon_rune = {
[3108]={
["none"]="蓝色独眼蝙蝠",
["monster_base"]=10044,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=191410000,
+ ["atk"]=3630000,
["atk_times"]=3,
["hurt_skill"]={
20127,
@@ -405,8 +405,8 @@ local monster_dungeon_rune = {
[3208]={
["none"]="蓝色恶魔野猪",
["monster_base"]=10042,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=365170000,
+ ["atk"]=4980000,
["atk_times"]=3,
["hurt_skill"]={
20121,
@@ -418,8 +418,8 @@ local monster_dungeon_rune = {
[3308]={
["none"]="绿色食人花",
["monster_base"]=10049,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=409220000,
+ ["atk"]=4500000,
["atk_times"]=3,
["hurt_skill"]={
20142,
@@ -431,8 +431,8 @@ local monster_dungeon_rune = {
[3408]={
["none"]="绿色蜥蜴剑士",
["monster_base"]=10048,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=482700000,
+ ["atk"]=5690000,
["atk_times"]=3,
["hurt_skill"]={
20139,
@@ -444,8 +444,8 @@ local monster_dungeon_rune = {
[3508]={
["none"]="魔都小枪兵(红)",
["monster_base"]=10057,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=191410000,
+ ["atk"]=3630000,
["atk_times"]=3,
["hurt_skill"]={
20166,
@@ -457,8 +457,8 @@ local monster_dungeon_rune = {
[3608]={
["none"]="魔都小枪兵(紫)",
["monster_base"]=10058,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=164360000,
+ ["atk"]=3050000,
["atk_times"]=3,
["hurt_skill"]={
20169,
@@ -470,8 +470,8 @@ local monster_dungeon_rune = {
[3708]={
["none"]="女巫师(蓝)",
["monster_base"]=10032,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=525000000,
+ ["atk"]=5020000,
["atk_times"]=3,
["hurt_skill"]={
20091,
@@ -483,8 +483,8 @@ local monster_dungeon_rune = {
[3808]={
["none"]="女巫师(紫)",
["monster_base"]=10033,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=278310000,
+ ["atk"]=4040000,
["atk_times"]=3,
["hurt_skill"]={
20094,
@@ -496,8 +496,8 @@ local monster_dungeon_rune = {
[3908]={
["none"]="青绿鬼火",
["monster_base"]=10054,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=191410000,
+ ["atk"]=3630000,
["atk_times"]=3,
["hurt_skill"]={
20157,
@@ -509,8 +509,8 @@ local monster_dungeon_rune = {
[4008]={
["none"]="人类弓箭手(红)",
["monster_base"]=10036,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=554250000,
+ ["atk"]=5310000,
["atk_times"]=3,
["hurt_skill"]={
20103,
@@ -522,8 +522,8 @@ local monster_dungeon_rune = {
[4108]={
["none"]="人类弓箭手(绿)",
["monster_base"]=10037,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=205490000,
+ ["atk"]=3950000,
["atk_times"]=3,
["hurt_skill"]={
20106,
@@ -535,8 +535,8 @@ local monster_dungeon_rune = {
[4208]={
["none"]="人鱼双匕首(红)",
["monster_base"]=10065,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=243300000,
+ ["atk"]=2900000,
["atk_times"]=3,
["hurt_skill"]={
20187,
@@ -548,8 +548,8 @@ local monster_dungeon_rune = {
[4308]={
["none"]="人鱼双匕首(蓝)",
["monster_base"]=10063,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=191500000,
+ ["atk"]=2660000,
["atk_times"]=3,
["hurt_skill"]={
20184,
@@ -561,8 +561,8 @@ local monster_dungeon_rune = {
[4408]={
["none"]="兽人大刀兵(红)",
["monster_base"]=10014,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=450590000,
+ ["atk"]=5230000,
["atk_times"]=3,
["hurt_skill"]={
20037,
@@ -574,8 +574,8 @@ local monster_dungeon_rune = {
[4508]={
["none"]="兽人大刀兵(黄)",
["monster_base"]=10015,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=507910000,
+ ["atk"]=5800000,
["atk_times"]=3,
["hurt_skill"]={
20040,
@@ -587,8 +587,8 @@ local monster_dungeon_rune = {
[4608]={
["none"]="兽人大刀兵(蓝)",
["monster_base"]=10013,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=205490000,
+ ["atk"]=3950000,
["atk_times"]=3,
["hurt_skill"]={
20034,
@@ -600,8 +600,8 @@ local monster_dungeon_rune = {
[4708]={
["none"]="兽人大刀兵(绿)",
["monster_base"]=10012,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=482700000,
+ ["atk"]=5690000,
["atk_times"]=3,
["hurt_skill"]={
20031,
@@ -613,8 +613,8 @@ local monster_dungeon_rune = {
[4808]={
["none"]="兽人盾骨兵(红)",
["monster_base"]=10017,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=593840000,
+ ["atk"]=5780000,
["atk_times"]=3,
["hurt_skill"]={
20046,
@@ -626,8 +626,8 @@ local monster_dungeon_rune = {
[4908]={
["none"]="兽人盾骨兵(黄)",
["monster_base"]=10018,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=593840000,
+ ["atk"]=5780000,
["atk_times"]=3,
["hurt_skill"]={
20049,
@@ -639,8 +639,8 @@ local monster_dungeon_rune = {
[5008]={
["none"]="兽人盾骨兵(蓝)",
["monster_base"]=10019,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=372560000,
+ ["atk"]=4530000,
["atk_times"]=3,
["hurt_skill"]={
20052,
@@ -652,8 +652,8 @@ local monster_dungeon_rune = {
[5108]={
["none"]="兽人盾骨兵(绿)",
["monster_base"]=10016,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=593840000,
+ ["atk"]=5780000,
["atk_times"]=3,
["hurt_skill"]={
20043,
@@ -665,8 +665,8 @@ local monster_dungeon_rune = {
[5208]={
["none"]="双斧莫西干(红)",
["monster_base"]=10029,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=391500000,
+ ["atk"]=5410000,
["atk_times"]=3,
["hurt_skill"]={
20082,
@@ -678,8 +678,8 @@ local monster_dungeon_rune = {
[5308]={
["none"]="双斧莫西干(紫)",
["monster_base"]=10028,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=298160000,
+ ["atk"]=4390000,
["atk_times"]=3,
["hurt_skill"]={
20079,
@@ -691,8 +691,8 @@ local monster_dungeon_rune = {
[5408]={
["none"]="水蜥蜴",
["monster_base"]=10064,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=224450000,
+ ["atk"]=3190000,
["atk_times"]=3,
["hurt_skill"]={
20190,
@@ -704,8 +704,8 @@ local monster_dungeon_rune = {
[5508]={
["none"]="小史莱姆(红)",
["monster_base"]=10023,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=507910000,
+ ["atk"]=5800000,
["atk_times"]=3,
["hurt_skill"]={
20064,
@@ -717,8 +717,8 @@ local monster_dungeon_rune = {
[5608]={
["none"]="小史莱姆(黄)",
["monster_base"]=10021,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=593840000,
+ ["atk"]=5780000,
["atk_times"]=3,
["hurt_skill"]={
20058,
@@ -730,8 +730,8 @@ local monster_dungeon_rune = {
[5708]={
["none"]="小史莱姆(蓝)",
["monster_base"]=10022,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=205490000,
+ ["atk"]=3950000,
["atk_times"]=3,
["hurt_skill"]={
20061,
@@ -743,8 +743,8 @@ local monster_dungeon_rune = {
[5808]={
["none"]="小史莱姆(绿)",
["monster_base"]=10020,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=602910000,
+ ["atk"]=5280000,
["atk_times"]=3,
["hurt_skill"]={
20055,
@@ -756,8 +756,8 @@ local monster_dungeon_rune = {
[5908]={
["none"]="紫色独眼蝙蝠",
["monster_base"]=10043,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=474020000,
+ ["atk"]=5340000,
["atk_times"]=3,
["hurt_skill"]={
20124,
@@ -769,8 +769,8 @@ local monster_dungeon_rune = {
[6008]={
["none"]="紫色鬼火",
["monster_base"]=10053,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=549890000,
+ ["atk"]=4690000,
["atk_times"]=3,
["hurt_skill"]={
20154,
@@ -782,8 +782,8 @@ local monster_dungeon_rune = {
[6108]={
["none"]="紫色幽灵恶魔",
["monster_base"]=10056,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=191410000,
+ ["atk"]=3630000,
["atk_times"]=3,
["hurt_skill"]={
20163,
@@ -795,8 +795,8 @@ local monster_dungeon_rune = {
[6208]={
["none"]="紫色蜘蛛",
["monster_base"]=10045,
- ["hp"]=999999999,
- ["atk"]=999999999,
+ ["hp"]=205490000,
+ ["atk"]=3950000,
["atk_times"]=3,
["hurt_skill"]={
20130,
@@ -939,9 +939,6 @@ local monster_dungeon_rune = {
30206,
30207
},
- ["passive_skill"]={
- 10013
- },
["monster_exp"]=0
},
[7008]={
@@ -982,6 +979,7 @@ local monster_dungeon_rune = {
30220
},
["passive_skill"]={
+ 10013,
10014,
30218
},
@@ -1003,8 +1001,7 @@ local monster_dungeon_rune = {
30226,
30227,
30228,
- 30229,
- 30230
+ 30229
},
["passive_skill"]={
10013,
diff --git a/lua/app/config/skill.lua b/lua/app/config/skill.lua
index 6f45e901..9580b2f4 100644
--- a/lua/app/config/skill.lua
+++ b/lua/app/config/skill.lua
@@ -9567,10 +9567,10 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_dec_dmg_red_add",
+ ["type"]="dec_dmg_red_add",
["num"]=5000,
["ratio"]=10000,
- ["round"]=9999
+ ["round"]=0
}
},
["obj"]=1,
@@ -9584,10 +9584,10 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_dec_dmg_yellow_add",
+ ["type"]="dec_dmg_yellow_add",
["num"]=5000,
["ratio"]=10000,
- ["round"]=9999
+ ["round"]=0
}
},
["obj"]=1,
@@ -9601,10 +9601,10 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_dec_dmg_green_add",
+ ["type"]="dec_dmg_green_add",
["num"]=5000,
["ratio"]=10000,
- ["round"]=9999
+ ["round"]=0
}
},
["obj"]=1,
@@ -9618,10 +9618,10 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_dec_dmg_blue_add",
+ ["type"]="dec_dmg_blue_add",
["num"]=5000,
["ratio"]=10000,
- ["round"]=9999
+ ["round"]=0
}
},
["obj"]=1,
@@ -9635,10 +9635,10 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_dec_dmg_purple_add",
+ ["type"]="dec_dmg_purple_add",
["num"]=5000,
["ratio"]=10000,
- ["round"]=9999
+ ["round"]=0
}
},
["obj"]=1,
@@ -9652,10 +9652,10 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_first_hand",
+ ["type"]="first_hand",
["num"]=10000,
["ratio"]=10000,
- ["round"]=9999
+ ["round"]=0
}
},
["obj"]=1,
@@ -9669,10 +9669,10 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_counterattack",
+ ["type"]="counterattack",
["num"]=2500,
["ratio"]=10000,
- ["round"]=9999
+ ["round"]=0
}
},
["obj"]=1
@@ -24046,7 +24046,7 @@ local skill = {
{
["type"]="state",
["attr"]="dmg_addition_all_add",
- ["op"]="<",
+ ["op"]="=",
["v"]=0,
["side"]=1
}
@@ -24062,7 +24062,7 @@ local skill = {
{
["type"]="state",
["attr"]="vulnerable",
- ["op"]="<",
+ ["op"]="=",
["v"]=0,
["side"]=1
}
@@ -24252,7 +24252,7 @@ local skill = {
2,
0
},
- ["cd"]=2,
+ ["cd"]=3,
["cd_start"]=0,
["shake_time"]=200,
["shake_type"]=6,
@@ -24275,7 +24275,7 @@ local skill = {
{
["type"]="weaken",
["num"]=2500,
- ["ratio"]=10000,
+ ["ratio"]=1000,
["round"]=2
}
},
@@ -24305,7 +24305,7 @@ local skill = {
{
["type"]="weaken",
["num"]=2500,
- ["ratio"]=10000,
+ ["ratio"]=1000,
["round"]=2
}
},
@@ -24335,7 +24335,7 @@ local skill = {
{
["type"]="weaken",
["num"]=2500,
- ["ratio"]=10000,
+ ["ratio"]=1000,
["round"]=2
}
},
@@ -24370,7 +24370,7 @@ local skill = {
}
},
["obj"]=2,
- ["cd"]=4,
+ ["cd"]=7,
["cd_start"]=0,
["shake_time"]=200,
["shake_type"]=6,
@@ -24398,8 +24398,8 @@ local skill = {
}
},
["obj"]=2,
- ["cd"]=4,
- ["cd_start"]=2,
+ ["cd"]=7,
+ ["cd_start"]=3,
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
@@ -24492,7 +24492,7 @@ local skill = {
}
},
["obj"]=2,
- ["cd"]=4,
+ ["cd"]=5,
["cd_start"]=0,
["shake_time"]=200,
["shake_type"]=6,
@@ -24514,7 +24514,7 @@ local skill = {
}
},
["obj"]=2,
- ["cd"]=4,
+ ["cd"]=5,
["cd_start"]=1,
["shake_time"]=200,
["shake_type"]=6,
@@ -24536,7 +24536,7 @@ local skill = {
}
},
["obj"]=2,
- ["cd"]=4,
+ ["cd"]=5,
["cd_start"]=2,
["shake_time"]=200,
["shake_type"]=6,
@@ -24555,7 +24555,7 @@ local skill = {
["effect_type"]=1,
["trigger"]=1,
["obj"]=2,
- ["cd"]=4,
+ ["cd"]=5,
["cd_start"]=3,
["shake_time"]=200,
["shake_type"]=6,
@@ -24643,7 +24643,7 @@ local skill = {
["effect"]={
{
["type"]="heal",
- ["num"]=100000,
+ ["num"]=10000,
["ratio"]=10000,
["round"]=1
}
@@ -24656,7 +24656,7 @@ local skill = {
["effect"]={
{
["type"]="shield",
- ["num"]=2000,
+ ["num"]=1000,
["ratio"]=10000,
["round"]=3
},
@@ -24769,22 +24769,10 @@ local skill = {
["num"]=20000,
["ratio"]=10000,
["round"]=0
- },
- {
- ["type"]="imprison",
- ["num"]=0,
- ["ratio"]=10000,
- ["round"]=2
- },
- {
- ["type"]="corrupt",
- ["num"]=7500,
- ["ratio"]=10000,
- ["round"]=2
}
},
["obj"]=2,
- ["cd"]=3,
+ ["cd"]=4,
["cd_start"]=0,
["shake_time"]=200,
["shake_type"]=6,
@@ -24808,11 +24796,11 @@ local skill = {
["type"]="normal_attack_add",
["num"]=2,
["ratio"]=10000,
- ["round"]=3
+ ["round"]=2
}
},
- ["obj"]=1,
- ["cd"]=3,
+ ["obj"]=2,
+ ["cd"]=4,
["cd_start"]=0
},
[30197]={
@@ -24896,7 +24884,7 @@ local skill = {
}
},
["obj"]=1,
- ["cd"]=10,
+ ["cd"]=11,
["cd_start"]=0
},
[30201]={
@@ -24911,7 +24899,7 @@ local skill = {
}
},
["obj"]=1,
- ["cd"]=10,
+ ["cd"]=11,
["cd_start"]=2
},
[30202]={
@@ -24926,7 +24914,7 @@ local skill = {
}
},
["obj"]=1,
- ["cd"]=10,
+ ["cd"]=11,
["cd_start"]=4
},
[30203]={
@@ -24941,7 +24929,7 @@ local skill = {
}
},
["obj"]=1,
- ["cd"]=10,
+ ["cd"]=11,
["cd_start"]=6
},
[30204]={
@@ -24956,7 +24944,7 @@ local skill = {
}
},
["obj"]=1,
- ["cd"]=10,
+ ["cd"]=11,
["cd_start"]=8
},
[30205]={
@@ -24965,7 +24953,7 @@ local skill = {
["effect"]={
{
["type"]="hurt",
- ["num"]=40000,
+ ["num"]=20000,
["ratio"]=10000,
["round"]=0
},
@@ -24977,7 +24965,7 @@ local skill = {
}
},
["obj"]=2,
- ["cd"]=3,
+ ["cd"]=9,
["cd_start"]=0,
["shake_time"]=200,
["shake_type"]=6,
@@ -24993,7 +24981,7 @@ local skill = {
["effect"]={
{
["type"]="hurt",
- ["num"]=40000,
+ ["num"]=20000,
["ratio"]=10000,
["round"]=0
},
@@ -25005,8 +24993,8 @@ local skill = {
}
},
["obj"]=2,
- ["cd"]=3,
- ["cd_start"]=1,
+ ["cd"]=9,
+ ["cd_start"]=3,
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
@@ -25021,7 +25009,7 @@ local skill = {
["effect"]={
{
["type"]="hurt",
- ["num"]=40000,
+ ["num"]=20000,
["ratio"]=10000,
["round"]=0
},
@@ -25033,8 +25021,8 @@ local skill = {
}
},
["obj"]=2,
- ["cd"]=3,
- ["cd_start"]=2,
+ ["cd"]=9,
+ ["cd_start"]=6,
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]={
@@ -25131,7 +25119,7 @@ local skill = {
["effect"]={
{
["type"]="shield",
- ["num"]=2000,
+ ["num"]=1000,
["ratio"]=10000,
["round"]=2
}
@@ -25141,7 +25129,7 @@ local skill = {
2,
0
},
- ["cd"]=3,
+ ["cd"]=4,
["cd_start"]=0,
["shake_time"]=200,
["shake_type"]=6,
@@ -25167,7 +25155,7 @@ local skill = {
2,
0
},
- ["cd"]=3,
+ ["cd"]=4,
["cd_start"]=1,
["shake_time"]=200,
["shake_type"]=6,
@@ -25193,7 +25181,7 @@ local skill = {
2,
0
},
- ["cd"]=3,
+ ["cd"]=4,
["cd_start"]=2,
["shake_time"]=200,
["shake_type"]=6,
@@ -25277,21 +25265,25 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_dec_dmg_all_add",
+ ["type"]="dec_dmg_all_add",
["num"]=5000,
["ratio"]=10000,
- ["round"]=999
+ ["round"]=0
}
},
["obj"]=1
},
[30219]={
+ ["skill_type"]=9,
+ ["skill_type_parameter"]={
+ 12500
+ },
["effect_type"]=1,
["trigger"]=1,
["effect"]={
{
["type"]="hurt",
- ["num"]=80000,
+ ["num"]=20000,
["ratio"]=10000,
["round"]=0
},
@@ -25307,7 +25299,7 @@ local skill = {
2,
0
},
- ["cd"]=4,
+ ["cd"]=5,
["cd_start"]=0,
["shake_time"]=200,
["shake_type"]=6,
@@ -25318,10 +25310,6 @@ local skill = {
["fx_self"]=200099
},
[30220]={
- ["skill_type"]=9,
- ["skill_type_parameter"]={
- 12500
- },
["effect_type"]=1,
["trigger"]=1,
["effect"]={
@@ -25337,7 +25325,7 @@ local skill = {
2,
0
},
- ["cd"]=4,
+ ["cd"]=5,
["cd_start"]=2,
["shake_time"]=200,
["shake_type"]=6,
@@ -25421,10 +25409,10 @@ local skill = {
["trigger"]=2,
["effect"]={
{
- ["type"]="forever_thorns",
+ ["type"]="thorns",
["num"]=1000,
["ratio"]=10000,
- ["round"]=999
+ ["round"]=0
}
},
["obj"]=1
@@ -25434,8 +25422,8 @@ local skill = {
["trigger"]=1,
["effect"]={
{
- ["type"]="rebirth",
- ["num"]=62500,
+ ["type"]="undead",
+ ["num"]=0,
["ratio"]=10000,
["round"]=2
},
@@ -25451,7 +25439,7 @@ local skill = {
2,
0
},
- ["cd"]=6,
+ ["cd"]=4,
["cd_start"]=2,
["shake_time"]=200,
["shake_type"]=6,
@@ -25474,7 +25462,7 @@ local skill = {
2,
0
},
- ["cd"]=6,
+ ["cd"]=7,
["cd_start"]=0,
["name_act"]="skill01"
},
@@ -25491,7 +25479,7 @@ local skill = {
2,
0
},
- ["cd"]=6,
+ ["cd"]=8,
["cd_start"]=1,
["name_act"]="skill01"
},
@@ -25529,38 +25517,6 @@ local skill = {
["cd_start"]=4,
["name_act"]="skill01"
},
- [30230]={
- ["effect_type"]=1,
- ["trigger"]=1,
- ["effect"]={
- {
- ["type"]="rebirth",
- ["num"]=62500,
- ["ratio"]=10000,
- ["round"]=2
- },
- {
- ["type"]="heal",
- ["num"]=125000,
- ["ratio"]=10000,
- ["round"]=1
- }
- },
- ["obj"]=1,
- ["skill_position"]={
- 2,
- 0
- },
- ["cd"]=6,
- ["cd_start"]=5,
- ["shake_time"]=200,
- ["shake_type"]=6,
- ["sound_hit"]={
- 10018
- },
- ["name_act"]="skill01",
- ["fx_self"]=200099
- },
[40001]={
["effect_type"]=1,
["trigger"]=1,
@@ -30487,6 +30443,6 @@ local skill = {
}
}
local config = {
-data=skill,count=1103
+data=skill,count=1102
}
return config
\ No newline at end of file
diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua
index 4cc49935..ef1a83a2 100644
--- a/lua/app/config/strings/cn/global.lua
+++ b/lua/app/config/strings/cn/global.lua
@@ -527,27 +527,18 @@ local localization_global =
["DUNGEON_RUNE_TIP_4"] = "血量回复至50%",
["DUNGEON_RUNE_TIP_5"] = "回合数+5!",
["UNFINISHED"] = "未完成",
- ["RUNES_DESC_1"] = "符文铸台:{0}级",
- ["RUNES_DESC_2"] = "符文套装",
- ["RUNES_DESC_3"] = "符文铸台{0}级解锁",
- ["RUNES_DESC_4"] = "一键淬炼",
- ["RUNES_DESC_5"] = "淬炼",
- ["RUNES_DESC_6"] = "符文",
- ["RUNES_DESC_7"] = "符文铸台等级",
- ["RUNES_DESC_8"] = "1.消耗符文精粹提升符文铸台等级。\n2.符文铸台等级提升将解锁付文栏,有概率淬炼出高品质符文。\n3.所有英雄符文铸台等级互通。\n4.同一种属性,最多只会出现2条。",
- ["RUNES_DESC_9"] = "符文套装效果",
- ["RUNES_DESC_10"] = "生命套装",
- ["RUNES_DESC_11"] = "攻击套装",
- ["RUNES_DESC_12"] = "增伤套装",
- ["RUNES_DESC_13"] = "暴击套装",
- ["RUNES_DESC_14"] = "爆伤套装",
- ["RUNES_DESC_15"] = "Lv1-2件套:{0}",
- ["RUNES_DESC_16"] = "Lv2-4件套:{0}",
- ["RUNES_DESC_17"] = "符文每日礼包",
- ["RUNES_DESC_18"] = "强化材料不足",
- ["RUNES_DESC_19"] = "符文精华不足,洋葱头也没办法",
- ["RUNES_DESC_20"] = "符文之塔获得",
- ["RUNES_DESC_21"] = "一键淬炼,只有在出现S和SS符文或符文精粹不足时停止,是否开始?",
+
+ ["DUNGEON_RUNE_DESC_1"]= "目标",
+ ["DUNGEON_RUNE_DESC_2"] = "再次挑战",
+ ["DUNGEON_RUNE_DESC_3"] = "通关获得",
+ ["DUNGEON_RUNE_DESC_4"] = "扫荡获得",
+ ["DUNGEON_RUNE_DESC_5"] = "通关后可扫荡",
+ ["DUNGEON_RUNE_DESC_6"] = "战绩",
+ ["DUNGEON_RUNE_DESC_7"] = "狠心拒绝",
+ ["DUNGEON_RUNE_DESC_8"] = "本赛季",
+ ["DUNGEON_RUNE_DESC_9"] = "上赛季",
+ ["DUNGEON_RUNE_DESC_10"] = "最高:{0}",
+ ["DUNGEON_RUNE_DESC_11"] = "回合数:{0}",
}
return localization_global
\ No newline at end of file
diff --git a/lua/app/config/strings/cn/skill_rogue.lua b/lua/app/config/strings/cn/skill_rogue.lua
index 3d2c2f78..b2abe9f9 100644
--- a/lua/app/config/strings/cn/skill_rogue.lua
+++ b/lua/app/config/strings/cn/skill_rogue.lua
@@ -876,28 +876,28 @@ local skill_rogue = {
["desc"]="九尾祥瑞激活所需能量-2。"
},
[2400400]={
- ["desc"]="解锁啊,打!:使用后本次伤害提升,并额外造成多次大量技能伤害。"
+ ["desc"]="解锁双截龙棍:使用后本次伤害提升,并额外造成多次大量技能伤害。"
},
[2400401]={
- ["desc"]="啊,打!技能伤害提升。"
+ ["desc"]="双截龙棍技能伤害提升。"
},
[2400402]={
- ["desc"]="啊,打!沿+方向可额外消除4格。"
+ ["desc"]="双截龙棍沿+方向可额外消除4格。"
},
[2400403]={
["desc"]="龙哥普攻有5%概率附加眩晕效果,1回合。"
},
[2400404]={
- ["desc"]="啊,打!沿X方向可额外消除4格。"
+ ["desc"]="双截龙棍沿X方向可额外消除4格。"
},
[2400405]={
- ["desc"]="啊,打!可附加流血效果,2回合。"
+ ["desc"]="双截龙棍可附加流血效果,2回合。"
},
[2400406]={
["desc"]="Combo:龙哥普攻对冰霜和流血敌人额外增伤。"
},
[2400407]={
- ["desc"]="啊,打!附加的眩晕效果概率提高至10%,回合数+1。"
+ ["desc"]="双截龙棍附加的眩晕效果概率提高至10%,回合数+1。"
},
[3400400]={
["desc"]="解锁刺杀艺术:使用后本次伤害提升,并额外造成多次大量技能伤害。"
@@ -936,7 +936,7 @@ local skill_rogue = {
["desc"]="飞棺降物附加的冰霜效果,回合数+1。"
},
[4400404]={
- ["desc"]="Combo:已逝行者普攻腐败敌人将恢复生命。"
+ ["desc"]="Combo:已逝行者普攻对腐败敌人将恢复生命。"
},
[4400405]={
["desc"]="飞棺降物释放后为团队附加重生效果,1回合。"
diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua
index 36ebca08..a61ad7e6 100644
--- a/lua/app/global/global_const.lua
+++ b/lua/app/global/global_const.lua
@@ -21,6 +21,7 @@ local CONST_PATHS = {
CollectionConst = "app/module/collection/collection_const",
ActivityConst = "app/module/activity/activity_const",
FourteenDayConst = "app/module/activity/fourteen_day/fourteen_day_const",
+ DungeonRuneConst = "app/module/dungeon_rune/dungeon_rune_const",
}
if EDITOR_MODE then
@@ -230,6 +231,7 @@ GConst.ATLAS_PATH = {
ACT_HEROFUND = "assets/arts/atlas/ui/act_herofund.asset",
ACT_BOSS_RUSH = "assets/arts/atlas/ui/act_bossrush.asset",
ACT_COMMON = "assets/arts/atlas/ui/act_common.asset",
+ UI_DUNGEON_RUNE = "assets/arts/atlas/ui/dungeon_rune.asset",
}
GConst.TOUCH_EVENT = {
diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua
index 38a1a0d0..16aab34b 100644
--- a/lua/app/module/battle/battle_const.lua
+++ b/lua/app/module/battle/battle_const.lua
@@ -89,6 +89,7 @@ BattleConst.BATTLE_TYPE = {
DUNGEON_WEAPON = "6",
DUNGEON_ARMOR = "7",
ACT_BOSS_RUSH = "8",
+ DUNGEON_RUNE = "9",
}
BattleConst.IS_PVP_BATTLE = {
@@ -103,6 +104,7 @@ BattleConst.FORMATION_TYPE = {
DUNGEON_WEAPON = "4", -- 武器副本
DUNGEON_ARMOR = "5", -- 支线副本
BOSS_RUSH = "6", -- boss rush
+ DUNGEON_RUNE = "7", -- 符文副本
}
BattleConst.TYPEOF_LUA_COMP = {
@@ -237,6 +239,8 @@ BattleConst.SPECIAL_DAMAGE_OR_CURE_TYPE = {
ROUND_BEGIN_HEAL = "round_begin_heal",
KILL_MAX_ELEMENT_AND_HEAL = "kill_max_element_and_heal",
BE_SUCKED = "be_sucked",
+
+ AD_REBIRTH = "ad_rebirth",
}
BattleConst.SKILL_RECORD_DATA_NAME = {
diff --git a/lua/app/module/battle/battle_manager.lua b/lua/app/module/battle/battle_manager.lua
index 319571fe..2452aff6 100644
--- a/lua/app/module/battle/battle_manager.lua
+++ b/lua/app/module/battle/battle_manager.lua
@@ -15,6 +15,7 @@ local BATTLE_CONTROLLER = {
[BattleConst.BATTLE_TYPE.DUNGEON_WEAPON] = "app/module/battle/controller/battle_controller_dungeon_weapon",
[BattleConst.BATTLE_TYPE.DUNGEON_ARMOR] = "app/module/battle/controller/battle_controller_dungeon_armor",
[BattleConst.BATTLE_TYPE.ACT_BOSS_RUSH] = "app/module/battle/controller/battle_controller_boss_rush",
+ [BattleConst.BATTLE_TYPE.DUNGEON_RUNE] = "app/module/battle/controller/battle_controller_dungeon_rune",
}
function BattleManager:showPauseUI(battleType, battleController)
@@ -71,6 +72,15 @@ function BattleManager:showBossRushBattleResultUI(battleType, combatReport, task
})
end
+function BattleManager:showBattleRuneResultUI(battleType, rewards, combatReport, remainRound)
+ UIManager:showUI("app/ui/battle/battle_rune_result_ui", {
+ battleType = battleType,
+ combatReport = combatReport,
+ rewards = rewards,
+ remainRound = remainRound,
+ })
+end
+
function BattleManager:showBoxOpenUI(rewards, callback)
UIManager:showUI("app/ui/battle/battle_box_open_ui", {rewards = rewards, callback = callback})
end
diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua
index 440946c1..d3c7e39a 100644
--- a/lua/app/module/battle/component/battle_unit_comp.lua
+++ b/lua/app/module/battle/component/battle_unit_comp.lua
@@ -1659,7 +1659,7 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d
end
local shieldHpBefore = self.unitEntity:getShieldHp()
- local hpRealReduce, shieldWorkOn = self.unitEntity:takeDamageOrCure(num)
+ local hpRealReduce, shieldWorkOn = self.unitEntity:takeDamageOrCure(num, self)
if hpRealReduce < 0 and self.side == BattleConst.SIDE_DEF then -- 实际掉血了
self:addBattleExp(atker, hpRealReduce)
end
@@ -2224,6 +2224,7 @@ function BattleUnitComp:cancelPassiveSkillEffect(skill)
end
function BattleUnitComp:rebirth()
+ self.isClear = false
self.currState = UNIT_STATE.INIT
self.unitEntity:rebirth()
end
diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua
index 9a38032f..0a5ba17b 100644
--- a/lua/app/module/battle/controller/battle_base_controller.lua
+++ b/lua/app/module/battle/controller/battle_base_controller.lua
@@ -129,6 +129,16 @@ function BattleBaseController:getMonsterHpAddition()
return 0
end
+-- 怪物攻击力固定
+function BattleBaseController:getMonsterAtkFixed()
+ return 0
+end
+
+-- 怪物血量固定
+function BattleBaseController:getMonsterHpFixed()
+ return 0
+end
+
-- 需要额外加载的资源
function BattleBaseController:loadOtherRes(callback)
return callback()
@@ -494,6 +504,8 @@ function BattleBaseController:init(params, snapshot)
self.waitingFillCount = 0
self.needWaitingBoardOver = nil
self.curWaveMonsterDead = false
+ self.totalBreakedGridType = {}
+ self.totalEliminateCountMap = {}
self.curActionSide = SIDE_ATK
self:resetSideActionCount()
@@ -1150,20 +1162,18 @@ function BattleBaseController:enterNextTeamAction()
self:hideCombo()
self:hideCounterAttack()
- if self:checkTeamIsDead(function() self:enterRoundEnd() end) then
- return
- end
-
- if not self.battleTeamActionList or not self.battleTeamActionList[1] then
- self:enterRoundEnd()
- return
- end
-
- local action = table.remove(self.battleTeamActionList, 1)
- action()
+ self:checkTeamIsDead(function() self:enterRoundEnd() end, function()
+ if not self.battleTeamActionList or not self.battleTeamActionList[1] then
+ self:enterRoundEnd()
+ return
+ end
+
+ local action = table.remove(self.battleTeamActionList, 1)
+ action()
+ end)
end
-function BattleBaseController:checkTeamIsDead(callback)
+function BattleBaseController:checkTeamIsDead(callback, falseCallback)
local defTeam = self.battleData:getDefTeam()
local atkTeam = self.battleData:getAtkTeam()
if atkTeam:getIsDead() and defTeam:getIsDead() then -- 都死了,直接结算
@@ -1197,7 +1207,9 @@ function BattleBaseController:checkTeamIsDead(callback)
return true
end
- return false
+ if falseCallback then
+ falseCallback()
+ end
end
function BattleBaseController:getIsAtkStep()
@@ -1238,11 +1250,9 @@ function BattleBaseController:enterRoundEnd()
self.atkTeam:onRoundEnd()
self.defTeam:onRoundEnd()
- if self:checkTeamIsDead(function() self:enterNextWave() end) then
- return
- end
-
- self:onRoundEnd()
+ self:checkTeamIsDead(function() self:enterNextWave() end, function()
+ self:onRoundEnd()
+ end)
end
function BattleBaseController:onRoundEnd(toNextWave)
@@ -1346,6 +1356,10 @@ function BattleBaseController:onLinkOver()
end)
end, self.curActionSide)
+ for element, count in pairs(elementTypeMap) do
+ self.totalEliminateCountMap[element] = (self.totalEliminateCountMap[element] or 0) + count
+ end
+
self.eliminateCount = self.eliminateCount + 1
self.eliminateTotalCount = self.eliminateTotalCount + 1
if count > self.maxLinkCount then
@@ -1444,7 +1458,9 @@ function BattleBaseController:dealGridBreak(posId, condition, time, breakedMap,
aniUnit.breakSfxName = entity:getBreakSfx()
aniUnit.callback = function()
- self.lastRoundBreakedGridType[entity:getGridType()] = true
+ local gridType = entity:getGridType()
+ self.lastRoundBreakedGridType[gridType] = true
+ self.totalBreakedGridType[gridType] = (self.totalBreakedGridType[gridType] or 0) + 1
entity:tryBreakGrid(condition)
if entity:getIsIdle() then
self:dealGridEdge(posId)
@@ -2185,6 +2201,9 @@ function BattleBaseController:getRandomGridInfo()
for typeName, typeNum in pairs(BattleConst.ELEMENT_TYPE) do
if not self:getSealElementType()[typeNum] and self:getSkillEntityByElement(typeNum) then
local weight = ((map[typeNum] or 0) + 1) * BattleConst.ELEMENT_WIGHT
+ if self.elementWeightMap and self.elementWeightMap[typeNum] then
+ weight = weight + self.elementWeightMap[typeNum]
+ end
if weight > BattleConst.MAX_ELEMENT_WIGHT then
weight = BattleConst.MAX_ELEMENT_WIGHT
end
diff --git a/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua b/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua
new file mode 100644
index 00000000..c79db9c5
--- /dev/null
+++ b/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua
@@ -0,0 +1,378 @@
+local BattleController = require "app/module/battle/controller/battle_controller"
+local BattleControllerDungeonRune = class("BattleControllerDungeonRune", BattleController)
+local BattleConst = GConst.BattleConst
+local SIDE_ATK = BattleConst.SIDE_ATK
+local SIDE_DEF = BattleConst.SIDE_DEF
+local PASSIVE_EVENT = BattleConst.PASSIVE_EVENT
+local UNIT_STATE = BattleConst.UNIT_STATE
+
+function BattleControllerDungeonRune:getBoardConfig()
+ return ConfigManager:getConfig("chapter_board_rune")
+end
+
+function BattleControllerDungeonRune:getChapterConfig()
+ return ConfigManager:getConfig("chapter_dungeon_rune")
+end
+
+function BattleControllerDungeonRune:getChapterId()
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ return runeData:getCurFightChapterId()
+end
+
+function BattleControllerDungeonRune:initOther()
+ self.canRebirthTimes = 1 -- 每次只能复活一次
+ self.dungeonRuneRemainRoundCount = self:getChapterConfig()[self.chapterId].round or 1
+
+ if self.battleUI then
+ self.battleUI:refreshWave(self.dungeonRuneRemainRoundCount, GConst.ATLAS_PATH.COMMON, "common_dec_15")
+ end
+end
+
+-- 怪物攻击力固定
+function BattleControllerDungeonRune:getMonsterAtkFixed()
+ if not self.monsterAtkFixed then
+ self.monsterAtkFixed = self:getChapterConfig()[self.chapterId].atk or 0
+ end
+ return self.monsterAtkFixed
+end
+
+-- 怪物血量固定
+function BattleControllerDungeonRune:getMonsterHpFixed()
+ if not self.monsterHpFixed then
+ self.monsterHpFixed = self:getChapterConfig()[self.chapterId].hp or 0
+ end
+ return self.monsterHpFixed
+end
+
+function BattleControllerDungeonRune:getMaxWave()
+ self:getInitBoard()
+ if not self.cacheMaxWave then
+ self.cacheMaxWave = #self.monsterList
+ if self.cacheMaxWave > 1 then
+ self.cacheMaxWave = 9999999 -- 无限波次
+ end
+ end
+ return self.cacheMaxWave
+end
+
+function BattleControllerDungeonRune:enterNextWave()
+ local waveIndex = self:getWaveIndex()
+ if waveIndex ~= 0 and self.curWaveMonsterDead then
+ if self.isBossWave then
+ self:addTaskProgress(BattleConst.BATTLE_TASK_FIELD.KILL_BOSS, 1)
+ else
+ self:addTaskProgress(BattleConst.BATTLE_TASK_FIELD.KILL_NORMAL_MONSTER, 1)
+ end
+ self:setTaskProgress(BattleConst.BATTLE_TASK_FIELD.PASS_WAVE, waveIndex)
+ end
+
+ -- 完成任务
+ local taskOver = self:getRuneTaskAllOver()
+ if self.curWaveMonsterDead and taskOver then
+ self.victory = true
+ self:postWaveOver(false)
+ self:battleEnd()
+ return
+ end
+
+ if waveIndex >= self.maxWaveIndex then
+ self.victory = self.curWaveMonsterDead
+ self:postWaveOver(not self.curWaveMonsterDead)
+ self:battleEnd()
+ return
+ end
+
+ local atkTeam = self.battleData:getAtkTeam()
+ if not atkTeam or atkTeam:getIsDead() then
+ if self:tryShowRebirth(function() self:onEnterNextWave() end) then
+ return
+ end
+
+ self.victory = false
+ self:postWaveOver(true)
+ self:battleEnd()
+ return
+ end
+
+ self:onEnterNextWave()
+end
+
+function BattleControllerDungeonRune:onEnterNextWave()
+ local waveIndex = self:getWaveIndex()
+ if waveIndex ~= 0 then -- 第一波
+ self:postWaveOver(false)
+ end
+
+ self.curWaveMonsterDead = false
+ self:addWaveIndex(1)
+ waveIndex = self:getWaveIndex()
+ self:refreshWave(waveIndex)
+ if waveIndex == 1 then -- 第一波
+ self.needWaitingBoardOver = true
+ self:generateBoard(true)
+ else
+ -- 上报关卡结束
+ self.defTeam:prepare()
+ end
+
+ self.waveDurationTime = 0
+ self.eliminateCount = 0
+
+ self:snapshotBattleInfo()
+
+ self.isBossWave = self.defTeam:getMainUnit().unitEntity:getIsBoss()
+ self:postFightStart()
+ if not self.needWaitingBoardOver then
+ self:enterRoundBegin()
+ end
+ if not self.isBossWave then
+ self.battleUI:hideBuffTips()
+ end
+end
+
+function BattleControllerDungeonRune:enterRoundBegin()
+ if self.dungeonRuneRemainRoundCount <= 0 then
+ if self.canRebirthTimes > 0 then
+ ModuleManager.DungeonRuneManager:showRebirthUI(function()
+ self.canRebirthTimes = self.canRebirthTimes - 1
+ self.dungeonRuneRemainRoundCount = self.dungeonRuneRemainRoundCount + 5 -- 5回合
+ self.dungeonRuneRemainRoundCount = self.dungeonRuneRemainRoundCount - 1
+ if self.battleUI then
+ self.battleUI:refreshWave(self.dungeonRuneRemainRoundCount + 1, GConst.ATLAS_PATH.COMMON, "common_dec_15")
+ end
+ BattleController.enterRoundBegin(self)
+ end, function()
+ self.victory = false
+ self:postWaveOver(false)
+ self:battleEnd()
+ end, false)
+ else
+ self.victory = false
+ self:postWaveOver(false)
+ self:battleEnd()
+ end
+ return
+ end
+
+ self.dungeonRuneRemainRoundCount = self.dungeonRuneRemainRoundCount - 1
+ if self.battleUI then
+ self.battleUI:refreshWave(self.dungeonRuneRemainRoundCount + 1, GConst.ATLAS_PATH.COMMON, "common_dec_15")
+ end
+ BattleController.enterRoundBegin(self)
+end
+
+function BattleControllerDungeonRune:getNextMonsterId(waveIndex)
+ self:getInitBoard()
+ waveIndex = waveIndex or self:getWaveIndex() + 1
+ local monsterIndex = math.random(1, #self.monsterList)
+ return self.monsterList[monsterIndex]
+end
+
+function BattleControllerDungeonRune:getInitBoard()
+ if not self.boradList then
+ self.boradList = {}
+ self.fixedRandomGrid = {}
+ self.mysteryBoxIndexMap = {}
+ self.monsterList = {}
+ self.elementWeightMap = {}
+
+ local boardCfg = self:getBoardConfig()
+ local info = self:getChapterConfig()[self.chapterId]
+ if info then
+ self.monsterList = GFunc.getTable(info.monster)
+ local cfg = boardCfg[info.chapter_board]
+ if cfg then
+ table.insert(self.boradList, {board = GFunc.getTable(cfg.board), gridEdge = GFunc.getTable(cfg.grid_edge)})
+ end
+ if info.weights then
+ for index, v in ipairs(info.weights) do
+ self.elementWeightMap[v[1]] = v[2]
+ end
+ end
+ end
+ end
+
+ return self.boradList, self.fixedRandomGrid, self.mysteryBoxIndexMap
+end
+
+function BattleControllerDungeonRune:onLoadComplete(...)
+ -- 处理技能
+ local unlockAllSkill = function(side)
+ local skillPool = self.battleData:getSkillPool(side)
+ if skillPool then
+ for elementType, list in pairs(skillPool) do -- 先遍历一下未解锁的技能
+ if not self.battleData:isUnlockedSkillElementType(elementType, side) then
+ local skillEntity = self.battleData:getSkillEntityByElement(elementType, side)
+ if skillEntity then
+ local skillId = skillEntity:getUnlockId()
+ if skillId then
+ self:dealSelectSkill(skillId, nil, side)
+ end
+ end
+ for _, skillId in ipairs(list) do
+ self:dealSelectSkill(skillId, nil, side)
+ end
+ end
+ end
+ self.battleUI:refreshSkill(nil, nil, side)
+ end
+ end
+ unlockAllSkill(SIDE_ATK)
+
+ BattleController.onLoadComplete(self, ...)
+end
+
+function BattleControllerDungeonRune:enterRoundEnd()
+ self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_END
+ local defTeam = self.battleData:getDefTeam()
+ if not defTeam or defTeam:getIsDead() then -- 怪物死了, 直接进入刷新逻辑
+ self.curWaveMonsterDead = true
+ self.atkTeam:onRoundEnd()
+ self:enterNextWave()
+ return
+ end
+
+ local atkTeam = self.battleData:getAtkTeam()
+ if not atkTeam or atkTeam:getIsDead() then -- 英雄死了, 直接结算
+ if self:tryShowRebirth(function() self:enterRoundEnd() end) then
+ return
+ end
+
+ self.defTeam:onRoundEnd()
+ self:enterNextWave()
+ return
+ end
+
+ self.atkTeam:onRoundEnd()
+ self.defTeam:onRoundEnd()
+
+ self:checkTeamIsDead(function() self:enterNextWave() end, function()
+ self:onRoundEnd()
+ end)
+end
+
+function BattleControllerDungeonRune:checkTeamIsDead(callback, falseCallback)
+ if self:tryShowRebirth(function()
+ BattleController.checkTeamIsDead(self, callback, falseCallback)
+ end) then
+ return true
+ end
+ BattleController.checkTeamIsDead(self, callback, falseCallback)
+end
+
+function BattleControllerDungeonRune:tryShowRebirth(callback)
+ local atkTeam = self.battleData:getAtkTeam()
+ if atkTeam:getIsDead() and self.canRebirthTimes > 0 then
+ ModuleManager.DungeonRuneManager:showRebirthUI(function()
+ self.canRebirthTimes = self.canRebirthTimes - 1
+ local mainUnit = self.atkTeam:getMainUnit()
+ mainUnit:rebirth()
+ local hp = mainUnit.unitEntity:getMaxHp() * 5000 // GConst.BattleConst.DEFAULT_FACTOR -- 回血50%
+ local x = mainUnit:takeDamageOrCure(mainUnit, hp, GConst.BattleConst.EFFECT_TYPE.HEAL, 0, BattleConst.SPECIAL_DAMAGE_OR_CURE_TYPE.AD_REBIRTH)
+ local hpPercent = mainUnit.unitEntity:getHpPercent()
+ self:refreshHp(mainUnit:getSide(), mainUnit.unitEntity:getHp(), hpPercent)
+ self.atkTeam:checkPassiveEvent(PASSIVE_EVENT.HP_LOWER_THAN, mainUnit, hpPercent)
+
+ mainUnit:changeState(UNIT_STATE.IDLE)
+ mainUnit:initPosition()
+
+ if callback then
+ callback()
+ end
+ end, function()
+ self.canRebirthTimes = self.canRebirthTimes - 1
+ if callback then
+ callback()
+ end
+ end, true)
+ return true
+ end
+end
+
+function BattleControllerDungeonRune:controllBattleEnd()
+ self.combatReport = {
+ battleType = GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE,
+ wave = self:getWaveIndex(),
+ victory = self.victory,
+ }
+ local atkReport = {}
+ local teamEntity = self.battleData:getAtkTeam()
+ local members = teamEntity:getAllMembers()
+ for k, v in pairs(members) do
+ local report = {
+ heroId = v:getId(),
+ dmg = v:getDamageCount(),
+ }
+ table.insert(atkReport, report)
+ end
+ self.combatReport.atkReport = atkReport
+ if not self.victory then
+ self.combatReport.wave = self.combatReport.wave - 1
+ end
+ ModuleManager.DungeonRuneManager:reqFightSettlement(self.chapterId, self.combatReport, self.taskProgress, self.dungeonRuneRemainRoundCount)
+end
+
+function BattleControllerDungeonRune:postWaveOver(atkDead, isQuit)
+ local deathType = BIReport.FIGHT_DEATH_TYPE.SURVIVE
+ local waveEndType = BIReport.FIGHT_WAVE_END_TYPE.WIN
+ if atkDead then
+ if self.isBossWave then
+ deathType = BIReport.FIGHT_DEATH_TYPE.BOSS_FAIL
+ else
+ deathType = BIReport.FIGHT_DEATH_TYPE.NORMAL_FAIL
+ end
+ waveEndType = BIReport.FIGHT_WAVE_END_TYPE.FAIL
+ end
+
+ if isQuit then
+ waveEndType = BIReport.FIGHT_WAVE_END_TYPE.QUIT
+ end
+
+ local duration = self.waveDurationTime
+ local totalTime = self.totalDurationTime
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ local startTimes = runeData:getChapterFightCount(self.chapterId)
+ local isFirstWin = false
+ if runeData:getPassedMaxId() < self.chapterId and self.victory then
+ isFirstWin = true
+ end
+
+ local isFianlStep = self:getWaveIndex() >= self.maxWaveIndex
+
+ BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE, self.battleData, self.chapterId, self:getWaveIndex(), duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount)
+end
+
+function BattleControllerDungeonRune:postFightStart()
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ local startTimes = runeData:getChapterFightCount(self.chapterId)
+ local unlockMaxChapter = runeData:getPassedMaxId() + 1
+ BIReport:postFightBegin(GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE, self:getWaveIndex(), self.chapterId, unlockMaxChapter, startTimes)
+end
+
+function BattleControllerDungeonRune:getRuneTaskNumByType(taskInfo)
+ local taskType = taskInfo[1]
+ local taskParams1 = taskInfo[2]
+ if taskType == GConst.DungeonRuneConst.TASK_TYPE.ELIMINATION_ELEMENT then
+ return self.totalEliminateCountMap[taskParams1] or 0
+ elseif taskType == GConst.DungeonRuneConst.TASK_TYPE.BREAK_GRID_TYPE then
+ return self.totalBreakedGridType[taskParams1] or 0
+ elseif taskType == GConst.DungeonRuneConst.TASK_TYPE.KILL_MONSTER then
+ return self:getTaskProgress()[GConst.BattleConst.BATTLE_TASK_FIELD.KILL_NORMAL_MONSTER]
+ end
+end
+
+function BattleControllerDungeonRune:getRuneTaskAllOver()
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ local chapterCondition = runeData:getChapterCondition(self.chapterId)
+ local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(self, chapterCondition)
+ local taskOver = true
+ for type, info in pairs(taskProgress) do
+ if not info.over then
+ taskOver = false
+ break
+ end
+ end
+ return taskOver
+end
+
+return BattleControllerDungeonRune
\ No newline at end of file
diff --git a/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua.meta b/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua.meta
new file mode 100644
index 00000000..6c29cb7b
--- /dev/null
+++ b/lua/app/module/battle/controller/battle_controller_dungeon_rune.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: aa826860d0ee7514cb97e9987cc81970
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/module/dungeon_rune.meta b/lua/app/module/dungeon_rune.meta
new file mode 100644
index 00000000..91257a63
--- /dev/null
+++ b/lua/app/module/dungeon_rune.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 653e48d52b890da40841ac8132ae8139
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/lua/app/module/dungeon_rune/dungeon_rune_const.lua b/lua/app/module/dungeon_rune/dungeon_rune_const.lua
new file mode 100644
index 00000000..23f29d2b
--- /dev/null
+++ b/lua/app/module/dungeon_rune/dungeon_rune_const.lua
@@ -0,0 +1,52 @@
+local BattleConst = GConst.BattleConst
+local DungeonRuneConst = {}
+
+DungeonRuneConst.RANK_MAX_NUM = 50
+
+DungeonRuneConst.TASK_TYPE = {
+ PASS_ROUND = 0,
+ ELIMINATION_ELEMENT = 1,
+ BREAK_GRID_TYPE = 2,
+ KILL_MONSTER = 3
+}
+
+DungeonRuneConst.TASK_ICON = {
+ [DungeonRuneConst.TASK_TYPE.PASS_ROUND] = "dungeon_rune_task_7",
+ [DungeonRuneConst.TASK_TYPE.ELIMINATION_ELEMENT] = {
+ [BattleConst.ELEMENT_TYPE.RED] = "dungeon_rune_task_4",
+ [BattleConst.ELEMENT_TYPE.YELLOW] = "dungeon_rune_task_5",
+ [BattleConst.ELEMENT_TYPE.GREEN] = "dungeon_rune_task_2",
+ [BattleConst.ELEMENT_TYPE.BLUE] = "dungeon_rune_task_1",
+ [BattleConst.ELEMENT_TYPE.PURPLE] = "dungeon_rune_task_3",
+ },
+ [DungeonRuneConst.TASK_TYPE.BREAK_GRID_TYPE] = {
+ [2] = "dungeon_rune_task_stone_2",
+ [3] = "dungeon_rune_task_stone_1",
+ [4] = "dungeon_rune_task_vine",
+ [5] = "dungeon_rune_task_ice",
+ [7] = "dungeon_rune_task_stone_3",
+ [12] = "dungeon_rune_task_stump_1",
+ [13] = "dungeon_rune_task_jelly",
+ [18] = "dungeon_rune_task_stump_1",
+ [19] = "dungeon_rune_task_stump_2",
+ [20] = "dungeon_rune_task_stump_3",
+ [21] = "dungeon_rune_task_blister",
+ [22] = "dungeon_rune_task_silt",
+ [23] = "dungeon_rune_task_poisonous_mist",
+ [24] = "dungeon_rune_task_altar_1",
+ [25] = "dungeon_rune_task_altar_2",
+ [26] = "dungeon_rune_task_altar_3",
+ [27] = "dungeon_rune_task_circle",
+ [28] = "dungeon_rune_task_stalactite_1",
+ [29] = "dungeon_rune_task_stalactite_2",
+ [30] = "dungeon_rune_task_stalactite_3",
+ [31] = "dungeon_rune_task_iron_1",
+ [32] = "dungeon_rune_task_iron_2",
+ [33] = "dungeon_rune_task_iron_3",
+ [34] = "dungeon_rune_task_lava",
+ [35] = "dungeon_rune_task_tussock",
+ },
+ [DungeonRuneConst.TASK_TYPE.KILL_MONSTER] = "dungeon_rune_task_8",
+}
+
+return DungeonRuneConst
\ No newline at end of file
diff --git a/lua/app/module/dungeon_rune/dungeon_rune_const.lua.meta b/lua/app/module/dungeon_rune/dungeon_rune_const.lua.meta
new file mode 100644
index 00000000..51f1fe03
--- /dev/null
+++ b/lua/app/module/dungeon_rune/dungeon_rune_const.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: c88e1d5421d798f4daa8186bfd7e2512
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/module/dungeon_rune/dungeon_rune_manager.lua b/lua/app/module/dungeon_rune/dungeon_rune_manager.lua
new file mode 100644
index 00000000..6111ff66
--- /dev/null
+++ b/lua/app/module/dungeon_rune/dungeon_rune_manager.lua
@@ -0,0 +1,206 @@
+local DungeonRuneManager = class("DungeonRuneManager", BaseModule)
+
+function DungeonRuneManager:showMainUI()
+ UIManager:showUI("app/ui/dungeon_rune/dungeon_rune_main_ui")
+end
+
+function DungeonRuneManager:showFightUI(id)
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ if not runeData:canFight(id) then
+ GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.PASS_REQUIRE))
+ return
+ end
+
+ local params = {id = id}
+ local isBoss = runeData:isBossChapter(id)
+ if isBoss then
+ UIManager:showUI("app/ui/dungeon_rune/dungeon_rune_boss_fight_ui", params)
+ else
+ UIManager:showUI("app/ui/dungeon_rune/dungeon_rune_fight_ui", params)
+ end
+end
+
+function DungeonRuneManager:showTaskUI(id)
+ local params = {id = id}
+ UIManager:showUI("app/ui/dungeon_rune/dungeon_rune_task_ui", params)
+end
+
+function DungeonRuneManager:showRebirthUI(adCallback, closeCallback, isHpOver)
+ UIManager:showUI("app/ui/dungeon_rune/dungeon_rune_rebirth_ui",{adCallback = adCallback, refuseCallback = closeCallback, isHpOver = isHpOver})
+end
+
+function DungeonRuneManager:reqFight(id)
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ if not runeData:canFight(id) then
+ GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.PASS_REQUIRE))
+ return
+ end
+
+ local passed = runeData:passedChapter(id)
+ if not passed and not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GLOD_WING, 1, true) then
+ return
+ end
+
+ local heroes = {}
+ local formation = DataManager.FormationData:getDungeonRuneFormation()
+ for matchType, heroId in pairs(formation) do
+ if heroId > 0 then
+ table.insert(heroes, heroId)
+ end
+ end
+ self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeStartReq, {id = id, heroes = heroes}, {}, self.rspFight, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_START)
+end
+
+function DungeonRuneManager:rspFight(result)
+ if result.err_code == GConst.ERROR_STR.SUCCESS then
+ if not result.reqData then
+ return
+ end
+
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ runeData:setCurFightChapterId(result.reqData.id)
+ local params = {
+ atkFormation = {}
+ }
+ local formation = DataManager.FormationData:getDungeonRuneFormation()
+ for elementType, heroId in pairs(formation) do
+ local heroEntity = DataManager.HeroData:getHeroById(heroId)
+ if heroEntity then
+ params.atkFormation[elementType] = heroEntity
+ end
+ end
+ ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE, params, function()
+ UIManager:closeAllUI()
+ ModuleManager.MaincityManager:showMainCityUI()
+ self:showMainUI()
+ end)
+ end
+end
+
+function DungeonRuneManager:reqFightSettlement(chapterId, combatReport, taskProgress, remainRound)
+ local parmas = {
+ id = chapterId,
+ win = combatReport.victory,
+ task_stat = taskProgress,
+ combatReport = combatReport,
+ remainRound = remainRound,
+ }
+ self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeSettlementReq, parmas, {}, self.rspFightSettlement, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_SETTLEMENT)
+end
+
+function DungeonRuneManager:rspFightSettlement(result)
+ if result.err_code == GConst.ERROR_STR.SUCCESS then
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ local passId = runeData:getPassedMaxId()
+ if result.reqData then
+ if result.reqData.win then
+ runeData:updatePassedMaxId(result.reqData.id, result.max_id)
+ runeData:updatePassRound(result.reqData.id, result.reqData.task_stat[GConst.BattleConst.BATTLE_TASK_FIELD.TOTAL_TURN] or 0)
+ end
+ ModuleManager.BattleManager:showBattleRuneResultUI(GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE, result.rewards, result.reqData.combatReport, result.reqData.remainRound)
+ end
+ if passId ~= runeData:getPassedMaxId() then
+ local data = {}
+ data.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
+ CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)
+ end
+
+ if result.reqData then
+ local taskStat = result.reqData.task_stat
+ if taskStat then
+ ModuleManager.TaskManager:addFightTaskProgress(taskStat)
+ end
+ end
+ runeData:setDirty()
+ end
+end
+
+function DungeonRuneManager:reqSweep(id)
+ if not GFunc.checkCost(GConst.ItemConst.ITEM_ID_SLIVER_WING, 1, true) then
+ return
+ end
+
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ if not runeData:canSweep(id) then
+ return
+ end
+
+ self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneFarmReq, {id = id}, {}, self.rspSweep, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_SWEEP)
+end
+
+function DungeonRuneManager:rspSweep(result)
+ if result.err_code == GConst.ERROR_STR.SUCCESS then
+ GFunc.showRewardBox(result.rewards)
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ runeData:setDirty()
+ end
+end
+
+function DungeonRuneManager:reqRebirth(isHpOver)
+ self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneAdReq, {}, {}, self.rspRebirth)
+end
+
+function DungeonRuneManager:rspRebirth(result)
+ if result.err_code == GConst.ERROR_STR.SUCCESS then
+ EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BATTLE_REBIRTH)
+ end
+end
+
+function DungeonRuneManager:reqFormation(formation)
+ if not DataManager.FormationData:formationIsFull(GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE) then
+ GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_8))
+ return
+ end
+
+ local heroes = {}
+ for matchType, heroId in pairs(formation) do
+ if heroId and heroId > 0 then
+ table.insert(heroes, heroId)
+ end
+ end
+ local params = {
+ heroes = heroes
+ }
+ self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeHeroesReq, params, {}, self.rspFormation)
+end
+
+function DungeonRuneManager:rspFormation(result)
+ if result.err_code == GConst.ERROR_STR.SUCCESS then
+ EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORMATION_CHANGE, {type = GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE})
+ end
+end
+
+function DungeonRuneManager:getTaskStatus(battleControllerRune, taskInfo)
+ local taskProgress = {}
+ for index, condition in ipairs(taskInfo) do
+ local progress = battleControllerRune:getRuneTaskNumByType(condition)
+ if progress then
+ taskProgress[condition[1]] = {
+ progress = progress,
+ totalProgress = condition[3],
+ over = progress >= condition[3]
+ }
+ end
+ end
+
+ return taskProgress
+end
+
+function DungeonRuneManager:reqBuySliverWing(count)
+ if not count then
+ return
+ end
+ self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneBuySliverReq, {buy_count = count}, {}, self.rspBuySliverWing, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_BUY_WING)
+end
+
+function DungeonRuneManager:rspBuySliverWing(result)
+ if result.err_code == GConst.ERROR_STR.SUCCESS then
+ GFunc.showRewardBox(result.rewards)
+ if result.reqData then
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ runeData:addSliverWingBuyCount(result.reqData.buy_count)
+ end
+ end
+end
+
+return DungeonRuneManager
\ No newline at end of file
diff --git a/lua/app/module/dungeon_rune/dungeon_rune_manager.lua.meta b/lua/app/module/dungeon_rune/dungeon_rune_manager.lua.meta
new file mode 100644
index 00000000..80c93687
--- /dev/null
+++ b/lua/app/module/dungeon_rune/dungeon_rune_manager.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 76e45e325e924d2479fff20458daeea3
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/module/item/item_const.lua b/lua/app/module/item/item_const.lua
index 560531a4..7a87a188 100644
--- a/lua/app/module/item/item_const.lua
+++ b/lua/app/module/item/item_const.lua
@@ -17,6 +17,8 @@ ItemConst.ITEM_ID_RANDOM_FRAGMENT = 19
ItemConst.ITEM_ID_ARENA_BOUNTY_EXP = 21
ItemConst.ITEM_ID_ARENA_TICKET = 22
ItemConst.ITEM_ID_FOURTEEN_DAY_EXCHANGE = 51
+ItemConst.ITEM_ID_GLOD_WING = 49
+ItemConst.ITEM_ID_SLIVER_WING = 50
ItemConst.ITEM_TYPE = {
RES = 1,
diff --git a/lua/app/proto/proto_msg_type.lua b/lua/app/proto/proto_msg_type.lua
index b13da0d9..45f655cc 100644
--- a/lua/app/proto/proto_msg_type.lua
+++ b/lua/app/proto/proto_msg_type.lua
@@ -61,6 +61,8 @@ local ProtoMsgType = {
[1068771132] = "ReconnectRsp",
[1070841461] = "LoginReq",
[1070843294] = "LoginRsp",
+ [1150265172] = "ActivityPVPDailyRewardsReq",
+ [1150267005] = "ActivityPVPDailyRewardsRsp",
[1163725920] = "ChapterRuneAdReq",
[1163727753] = "ChapterRuneAdRsp",
[1283733956] = "ActivityPVPMatchReq",
@@ -150,8 +152,6 @@ local ProtoMsgType = {
[2524881546] = "PVPRecordHistoryRsp",
[2553351971] = "ChapterDailyChallengeStartReq",
[2553353804] = "ChapterDailyChallengeStartRsp",
- [2566705464] = "ChapterRuneChallengeFarmReq",
- [2566707297] = "ChapterRuneChallengeFarmRsp",
[2581180989] = "MailListReq",
[2581182822] = "MailListRsp",
[2620369240] = "SevenDayRewardReq",
@@ -206,13 +206,9 @@ local ProtoMsgType = {
[3224232332] = "SevenDayTaskRewardRsp",
[3274332802] = "BossRushBountyUnlockReq",
[3274334635] = "BossRushBountyUnlockRsp",
- [3289898743] = "ChapterRuneRankReq",
- [3289900576] = "ChapterRuneRankRsp",
[3309820798] = "HeroPutOnReq",
[3309822631] = "HeroPutOnRsp",
[3341173994] = "BountyBoughtNtf",
- [3353409448] = "ChapterRuneRankRewardReq",
- [3353411281] = "ChapterRuneRankRewardRsp",
[3359969683] = "ChapterGoldChallengeSettlementReq",
[3359971516] = "ChapterGoldChallengeSettlementRsp",
[3363939655] = "TaskDailyAdReq",
@@ -250,8 +246,6 @@ local ProtoMsgType = {
[3739568306] = "SummerDataRsp",
[3741702491] = "MallDailyOverDayReq",
[3741704324] = "MallDailyOverDayRsp",
- [3742313244] = "ChapterRunePlayerInfoReq",
- [3742315077] = "ChapterRunePlayerInfoRsp",
[3757169544] = "BountyRewardReq",
[3757171377] = "BountyRewardRsp",
[3762291611] = "ActivityPVPStartReq",
@@ -355,6 +349,8 @@ local ProtoMsgType = {
ReconnectRsp = 1068771132,
LoginReq = 1070841461,
LoginRsp = 1070843294,
+ ActivityPVPDailyRewardsReq = 1150265172,
+ ActivityPVPDailyRewardsRsp = 1150267005,
ChapterRuneAdReq = 1163725920,
ChapterRuneAdRsp = 1163727753,
ActivityPVPMatchReq = 1283733956,
@@ -444,8 +440,6 @@ local ProtoMsgType = {
PVPRecordHistoryRsp = 2524881546,
ChapterDailyChallengeStartReq = 2553351971,
ChapterDailyChallengeStartRsp = 2553353804,
- ChapterRuneChallengeFarmReq = 2566705464,
- ChapterRuneChallengeFarmRsp = 2566707297,
MailListReq = 2581180989,
MailListRsp = 2581182822,
SevenDayRewardReq = 2620369240,
@@ -500,13 +494,9 @@ local ProtoMsgType = {
SevenDayTaskRewardRsp = 3224232332,
BossRushBountyUnlockReq = 3274332802,
BossRushBountyUnlockRsp = 3274334635,
- ChapterRuneRankReq = 3289898743,
- ChapterRuneRankRsp = 3289900576,
HeroPutOnReq = 3309820798,
HeroPutOnRsp = 3309822631,
BountyBoughtNtf = 3341173994,
- ChapterRuneRankRewardReq = 3353409448,
- ChapterRuneRankRewardRsp = 3353411281,
ChapterGoldChallengeSettlementReq = 3359969683,
ChapterGoldChallengeSettlementRsp = 3359971516,
TaskDailyAdReq = 3363939655,
@@ -544,8 +534,6 @@ local ProtoMsgType = {
SummerDataRsp = 3739568306,
MallDailyOverDayReq = 3741702491,
MallDailyOverDayRsp = 3741704324,
- ChapterRunePlayerInfoReq = 3742313244,
- ChapterRunePlayerInfoRsp = 3742315077,
BountyRewardReq = 3757169544,
BountyRewardRsp = 3757171377,
ActivityPVPStartReq = 3762291611,
@@ -649,6 +637,8 @@ local ProtoMsgType = {
ReconnectRsp = "ReconnectRsp",
LoginReq = "LoginReq",
LoginRsp = "LoginRsp",
+ ActivityPVPDailyRewardsReq = "ActivityPVPDailyRewardsReq",
+ ActivityPVPDailyRewardsRsp = "ActivityPVPDailyRewardsRsp",
ChapterRuneAdReq = "ChapterRuneAdReq",
ChapterRuneAdRsp = "ChapterRuneAdRsp",
ActivityPVPMatchReq = "ActivityPVPMatchReq",
@@ -738,8 +728,6 @@ local ProtoMsgType = {
PVPRecordHistoryRsp = "PVPRecordHistoryRsp",
ChapterDailyChallengeStartReq = "ChapterDailyChallengeStartReq",
ChapterDailyChallengeStartRsp = "ChapterDailyChallengeStartRsp",
- ChapterRuneChallengeFarmReq = "ChapterRuneChallengeFarmReq",
- ChapterRuneChallengeFarmRsp = "ChapterRuneChallengeFarmRsp",
MailListReq = "MailListReq",
MailListRsp = "MailListRsp",
SevenDayRewardReq = "SevenDayRewardReq",
@@ -794,13 +782,9 @@ local ProtoMsgType = {
SevenDayTaskRewardRsp = "SevenDayTaskRewardRsp",
BossRushBountyUnlockReq = "BossRushBountyUnlockReq",
BossRushBountyUnlockRsp = "BossRushBountyUnlockRsp",
- ChapterRuneRankReq = "ChapterRuneRankReq",
- ChapterRuneRankRsp = "ChapterRuneRankRsp",
HeroPutOnReq = "HeroPutOnReq",
HeroPutOnRsp = "HeroPutOnRsp",
BountyBoughtNtf = "BountyBoughtNtf",
- ChapterRuneRankRewardReq = "ChapterRuneRankRewardReq",
- ChapterRuneRankRewardRsp = "ChapterRuneRankRewardRsp",
ChapterGoldChallengeSettlementReq = "ChapterGoldChallengeSettlementReq",
ChapterGoldChallengeSettlementRsp = "ChapterGoldChallengeSettlementRsp",
TaskDailyAdReq = "TaskDailyAdReq",
@@ -838,8 +822,6 @@ local ProtoMsgType = {
SummerDataRsp = "SummerDataRsp",
MallDailyOverDayReq = "MallDailyOverDayReq",
MallDailyOverDayRsp = "MallDailyOverDayRsp",
- ChapterRunePlayerInfoReq = "ChapterRunePlayerInfoReq",
- ChapterRunePlayerInfoRsp = "ChapterRunePlayerInfoRsp",
BountyRewardReq = "BountyRewardReq",
BountyRewardRsp = "BountyRewardRsp",
ActivityPVPStartReq = "ActivityPVPStartReq",
diff --git a/lua/app/ui/battle/battle_rune_result_ui.lua b/lua/app/ui/battle/battle_rune_result_ui.lua
new file mode 100644
index 00000000..1c4ea205
--- /dev/null
+++ b/lua/app/ui/battle/battle_rune_result_ui.lua
@@ -0,0 +1,335 @@
+local BattleRuneResultUI = class("BattleRuneResultUI", BaseUI)
+
+local RUNE_TASK_CELL = "app/ui/dungeon_rune/cell/rune_task_cell"
+local UNIT_RESULT_RERPORT_CELL = "app/ui/battle/cell/unit_result_report_cell"
+local MAX_SCROLL_SHOW_COUNT = 10
+
+function BattleRuneResultUI:getPrefabPath()
+ return "assets/prefabs/ui/battle/battle_rune_result_ui.prefab"
+end
+
+function BattleRuneResultUI:ctor(params)
+ if EDITOR_MODE then
+ Logger.printTable(params)
+ end
+ -- 通用
+ self.battleType = params.battleType
+ self.isWin = params.combatReport.victory
+ self.rewards = params.rewards
+ self.remainRound = params.remainRound
+
+ -- pve特有
+ self.atkReport = params.combatReport.atkReport
+ self.wave = params.wave
+
+ self.totalDmg = 0
+ if self.atkReport then
+ for _, info in ipairs(self.atkReport) do
+ self.totalDmg = self.totalDmg + info.dmg
+ end
+ end
+
+ self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ self.chapterId = ModuleManager.BattleManager.battleController.chapterId
+end
+
+function BattleRuneResultUI:onClose()
+ if self.animNode then
+ self.animNode:Kill()
+ self.animNode = nil
+ end
+ if self.animRewards then
+ for idx, anim in pairs(self.animRewards) do
+ if anim then
+ anim:Kill()
+ end
+ end
+ end
+end
+
+function BattleRuneResultUI:onLoadRootComplete()
+ local uiMap = self.root:genAllChildren()
+
+ self.continue = uiMap["battle_rune_result_ui.continue"]
+ -- 胜利节点
+ self.victoryNode = uiMap["battle_rune_result_ui.victory_node"]
+ self.victoryMask = uiMap["battle_rune_result_ui.victory_node.mask_v"]
+ self.victoryTxTitle = uiMap["battle_rune_result_ui.victory_node.title_bg.desc"]
+ self.victorySpine = uiMap["battle_rune_result_ui.victory_node.ui_spine_obj"]
+ self.victoryUnitNode = uiMap["battle_rune_result_ui.victory_node.unit_node"]
+ -- 失败节点
+ self.defeatNode = uiMap["battle_rune_result_ui.defeat_node"]
+ self.defeatMask = uiMap["battle_rune_result_ui.defeat_node.mask_d"]
+ self.defeatTxTitle = uiMap["battle_rune_result_ui.defeat_node.title_bg.desc"]
+ self.defeatSpine = uiMap["battle_rune_result_ui.defeat_node.ui_spine_obj"]
+ self.defeatUnitNode = uiMap["battle_rune_result_ui.defeat_node.unit_node"]
+ -- 战斗信息
+ self.unitNode = uiMap["battle_rune_result_ui.unit_node"]
+ self.unitImgBattleIcon = uiMap["battle_rune_result_ui.unit_node.icon"]
+ self.unitTxDesc1 = uiMap["battle_rune_result_ui.unit_node.desc_1"]
+ self.unitTxDesc2 = uiMap["battle_rune_result_ui.unit_node.desc_2"]
+ self.unitTxDesc3 = uiMap["battle_rune_result_ui.unit_node.desc_3"]
+ self.unitTxDesc3 = uiMap["battle_rune_result_ui.unit_node.desc_3"]
+ self.unitImgReportV = uiMap["battle_rune_result_ui.unit_node.report_img_v"]
+ self.unitImgReportD = uiMap["battle_rune_result_ui.unit_node.report_img_d"]
+ if not self.unitResultReportCells then
+ self.unitResultReportCells = {}
+ for index = 1, 5 do
+ self.unitResultReportCells[index] = CellManager:addCellComp(uiMap["battle_rune_result_ui.unit_node.unit_result_report_cell_" .. index], UNIT_RESULT_RERPORT_CELL)
+ end
+ end
+ -- 奖励节点
+ self.rewardNode = uiMap["battle_rune_result_ui.reward_node"]
+ self.rewardTxTitle = uiMap["battle_rune_result_ui.reward_title"]
+ self.rewardScrollRect = uiMap["battle_rune_result_ui.reward_node.scroll_rect"]
+ self.rewardScrollRectComp = self.rewardScrollRect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
+ self.descRoundMin = uiMap["battle_rune_result_ui.reward_node.desc"]
+ self.imgRoundmIn = uiMap["battle_rune_result_ui.reward_node.icon"]
+ self.imgRoundNew = uiMap["battle_rune_result_ui.reward_node.icon_new"]
+ self.descRoundMin:setVisible(false)
+ self.imgRoundmIn:setVisible(false)
+
+ -- 任务节点
+ self.taskNode = uiMap["battle_rune_result_ui.task_node"]
+ self.runeTaskCells = {}
+ for index = 1, 3 do
+ self.runeTaskCells[index] = {}
+ self.runeTaskCells[index].cell = CellManager:addCellComp(uiMap["battle_rune_result_ui.task_node.rune_task_cell_" .. index], RUNE_TASK_CELL)
+ self.runeTaskCells[index].desc = uiMap["battle_rune_result_ui.task_node.desc_" .. index]
+ self.runeTaskCells[index].descUnDone = uiMap["battle_rune_result_ui.task_node.desc_undone_" .. index]
+ self.runeTaskCells[index].check = uiMap["battle_rune_result_ui.task_node.check_" .. index]
+ end
+
+ self.victoryMask:addClickListener(function()
+ self:onClickMask()
+ end)
+ self.defeatMask:addClickListener(function()
+ self:onClickMask()
+ end)
+end
+
+function BattleRuneResultUI:onClickMask()
+ if not self.isWin then
+ ModuleManager.BattleManager:endBattleAndExit()
+ else
+ if not self.showRewardInfo then
+ self.showRewardInfo = true
+ self:refreshRewards()
+ else
+ ModuleManager.BattleManager:endBattleAndExit()
+ end
+ end
+end
+
+function BattleRuneResultUI:onRefresh()
+ if self.isWin then
+ self:refreshVictoryNode()
+ AudioManager:playEffect(AudioManager.EFFECT_ID.BATTLE_VICTORY)
+ else
+ self:refreshDefeatNode()
+ AudioManager:playEffect(AudioManager.EFFECT_ID.BATTLE_DEFEAT)
+ end
+ self:refreshUnitInfo()
+
+ if self.runeData:isBossChapter(self.chapterId) then
+ self.showRewardInfo = true
+ self:refreshRewards()
+ else
+ self:refreshTaskNode()
+ end
+end
+
+function BattleRuneResultUI:refreshVictoryNode()
+ self.victoryNode:setVisible(true)
+ self.unitImgReportV:setVisible(true)
+ self.defeatNode:setVisible(false)
+ self.unitImgReportD:setVisible(false)
+
+ self.victorySpine:playAnimComplete("born", false, true, function()
+ self.victorySpine:playAnim("idle", true, true)
+ end)
+
+ self:showNodeAnim(self.victoryUnitNode, self.unitNode)
+end
+
+function BattleRuneResultUI:refreshDefeatNode()
+ self.victoryNode:setVisible(false)
+ self.unitImgReportV:setVisible(false)
+ self.defeatNode:setVisible(true)
+ self.unitImgReportD:setVisible(true)
+
+ self.defeatTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_6))
+ self.defeatSpine:playAnimComplete("born", false, true, function()
+ self.defeatSpine:playAnim("idle", true, true)
+ end)
+
+ self:showNodeAnim(self.defeatUnitNode, self.unitNode)
+end
+
+-- 播放节点动画
+function BattleRuneResultUI:showNodeAnim(parent, node)
+ if not parent then
+ node:setVisible(false)
+ return
+ else
+ node:setVisible(true)
+ end
+ node:setParent(parent, false)
+ node:setAnchoredPosition(0, 0)
+ local canvasNode = parent:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
+
+ self.animNode = self.root:createBindTweenSequence()
+ self.animNode:Insert(0, canvasNode:DOFade(0, 0))
+ self.animNode:Insert(0.1, canvasNode:DOFade(1, 0))
+ self.animNode:Insert(0, parent:getTransform():DOScale(0, 0))
+ self.animNode:Insert(0.1, parent:getTransform():DOScale(0.35, 0))
+ self.animNode:Insert(0.13, parent:getTransform():DOScale(1.1, 0.16))
+ self.animNode:Insert(0.26, parent:getTransform():DOScale(1, 0.14))
+ self.animNode:OnComplete(function()
+ self.animNode = nil
+ end)
+end
+
+function BattleRuneResultUI:refreshTaskNode()
+ self.taskNode:setVisible(true)
+ self.rewardNode:setVisible(false)
+
+ local id = self.chapterId
+ if not id then
+ return
+ end
+
+ local chapterCondition = self.runeData:getChapterCondition(id)
+ if not chapterCondition then
+ return
+ end
+
+ local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(ModuleManager.BattleManager.battleController, chapterCondition)
+
+ for index, objs in ipairs(self.runeTaskCells) do
+ local condition = chapterCondition[index + 1]
+ if condition then
+ objs.cell:getBaseObject():setActive(true)
+ local desc = self.runeData:getConditionDesc(condition)
+ local over = false
+ if taskProgress[condition[1]] then
+ local info = taskProgress[condition[1]]
+ over = info.over
+ local color = "#FF4949"
+ if over then
+ color = "#49FF49"
+ end
+ desc = desc .. string.format("(%s/%s)", color, info.progress, info.totalProgress)
+ end
+ objs.cell:refresh(condition)
+ objs.desc:setText(self.runeData:getConditionDesc(condition))
+ if over then
+ objs.descUnDone:setText(GConst.EMPTY_STRING)
+ objs.check:setVisible(true)
+ else
+ objs.descUnDone:setText(GConst.UNFINISHED)
+ objs.check:setVisible(false)
+ end
+ else
+ objs.cell:getBaseObject():setActive(false)
+ objs.desc:setText(GConst.EMPTY_STRING)
+ objs.descUnDone:setText(GConst.EMPTY_STRING)
+ objs.check:setVisible(false)
+ end
+ end
+end
+
+function BattleRuneResultUI:refreshRewards()
+ self.animRewards = {}
+ self.taskNode:setVisible(false)
+ self.rewardNode:setVisible(true)
+
+ self.rewardTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC))
+ self.continue:setText(I18N:getGlobalText(I18N.GlobalConst.CONTINUE_DESC))
+ self.rewardScrollRectComp:addInitCallback(function()
+ return GConst.TYPEOF_LUA_CLASS.REWARD_CELL
+ end)
+ self.rewardScrollRectComp:addRefreshCallback(function(index, cell)
+ cell:refresh(self.rewards[index])
+ if index <= MAX_SCROLL_SHOW_COUNT and self.animRewards[index] == nil then
+ self.animRewards[index] = self:showRewardAppearAnim(index, cell)
+ end
+ end)
+
+ self.rewardScrollRectComp:setFadeArgs(0.05, 0.3)
+ self.rewardScrollRectComp:clearCells()
+ local rewardCount = #self.rewards
+ if rewardCount > MAX_SCROLL_SHOW_COUNT then
+ local comp = self.rewardScrollRect:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_SCROLL_RECT)
+ comp.movementType = CS.UnityEngine.UI.ScrollRect.MovementType.Elastic
+ self.rewardScrollRectComp:setPerLineNum(5)
+ self.rewardScrollRect:setSizeDeltaX(560)
+ else
+ local comp = self.rewardScrollRect:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_SCROLL_RECT)
+ comp.movementType = CS.UnityEngine.UI.ScrollRect.MovementType.Clamped
+ if rewardCount >= 5 then
+ self.rewardScrollRectComp:setPerLineNum(5)
+ self.rewardScrollRect:setSizeDeltaX(560)
+ elseif rewardCount <= 0 then
+ self.rewardScrollRectComp:setPerLineNum(1)
+ self.rewardScrollRect:setSizeDeltaX(560)
+ else
+ self.rewardScrollRectComp:setPerLineNum(rewardCount)
+ self.rewardScrollRect:setSizeDeltaX(112*rewardCount)
+ end
+ end
+ self.rewardScrollRectComp:refillCells(rewardCount)
+
+ -- local id = self.chapterId
+ -- self.descRoundMin:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, self.runeData:getChapterPassRound(id)))
+ -- GFunc.centerImgAndTx(self.imgRoundmIn, self.descRoundMin, 10)
+ -- self.imgRoundNew:setVisible(self.runeData:getTagRoundNew() == true)
+end
+
+function BattleRuneResultUI:refreshUnitInfo()
+ if not self.atkReport then
+ self.unitNode:setVisible(false)
+ return
+ end
+
+ self.unitNode:setVisible(true)
+ for index, cell in ipairs(self.unitResultReportCells) do
+ local info = self.atkReport[index]
+ cell:getBaseObject():setVisible(info ~= nil)
+ if info then
+ cell:refresh(info, self.totalDmg)
+ end
+ end
+
+ self.unitTxDesc2:setText(self.wave)
+ self.unitTxDesc3:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_7, GFunc.num2Str(self.totalDmg)))
+
+ local iconName = "common_dec_15"
+ local round = self.remainRound or 0
+ self.unitTxDesc2:setText(round)
+ self.unitTxDesc1:setText(I18N:getGlobalText(I18N.GlobalConst.ROUND_LEFT))
+ self.unitImgBattleIcon:setSprite(GConst.ATLAS_PATH.COMMON, iconName)
+
+ GFunc.centerImgAndTx(self.unitImgBattleIcon, self.unitTxDesc2, 7)
+end
+
+-- 展示结算奖励的出现动画
+function BattleRuneResultUI:showRewardAppearAnim(idx, cell)
+ local canvasGroup = cell.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
+ local selfObj = cell.baseObject
+ local delay = (idx - 1) * 0.05
+ local scaleX = selfObj:fastGetLocalScale()
+
+ local animRewardAppear = selfObj:createBindTweenSequence()
+ animRewardAppear:Insert(0, canvasGroup:DOFade(0, 0))
+ animRewardAppear:Insert(0, selfObj:getTransform():DOScale(scaleX * 0.6, 0))
+ animRewardAppear:Insert(0.3 + delay, selfObj:getTransform():DOScale(scaleX * 1.1, 0.1))
+ animRewardAppear:Insert(0.3 + delay, canvasGroup:DOFade(1, 0.1))
+ animRewardAppear:Insert(0.4 + delay, selfObj:getTransform():DOScale(scaleX * 1, 0.13))
+ animRewardAppear:OnComplete(function()
+ animRewardAppear = nil
+ end)
+ return animRewardAppear
+end
+
+return BattleRuneResultUI
\ No newline at end of file
diff --git a/lua/app/ui/battle/battle_rune_result_ui.lua.meta b/lua/app/ui/battle/battle_rune_result_ui.lua.meta
new file mode 100644
index 00000000..e3676e64
--- /dev/null
+++ b/lua/app/ui/battle/battle_rune_result_ui.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: b737376fab2a5a741891d32e7371e8ad
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua
index 7a4e33b5..f4cd4d23 100644
--- a/lua/app/ui/battle/battle_ui.lua
+++ b/lua/app/ui/battle/battle_ui.lua
@@ -479,6 +479,17 @@ function BattleUI:refreshTaskBtn()
taskBtn:addClickListener(function()
ModuleManager.DungeonArmorManager:showBattleTaskUI()
end)
+ elseif self.battleController.battleType == GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE then
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ if runeData:isBossChapter(self.battleController.chapterId) then
+ taskBtn:setActive(false)
+ else
+ taskBtn:setSprite(GConst.ATLAS_PATH.BATTLE, "battle_btn_task_3")
+ taskBtn:setActive(true)
+ taskBtn:addClickListener(function()
+ ModuleManager.DungeonRuneManager:showTaskUI(self.battleController.chapterId)
+ end)
+ end
else
taskBtn:setActive(false)
end
diff --git a/lua/app/ui/common/common_formation_ui.lua b/lua/app/ui/common/common_formation_ui.lua
index 82e854c6..6a7d8b02 100644
--- a/lua/app/ui/common/common_formation_ui.lua
+++ b/lua/app/ui/common/common_formation_ui.lua
@@ -41,6 +41,8 @@ function CommonFormationUI:onLoadRootComplete()
ModuleManager.DungeonArmorManager:reqFormation(formation)
elseif self.formationType == GConst.BattleConst.FORMATION_TYPE.BOSS_RUSH then
ModuleManager.ActBossRushManager:reqFormation(formation)
+ elseif self.formationType == GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE then
+ ModuleManager.DungeonRuneManager:reqFormation(formation)
else
self:closeUI()
end
diff --git a/lua/app/ui/currency_bar/cell/currency_cell.lua b/lua/app/ui/currency_bar/cell/currency_cell.lua
index 1edccdd7..52fbf20a 100644
--- a/lua/app/ui/currency_bar/cell/currency_cell.lua
+++ b/lua/app/ui/currency_bar/cell/currency_cell.lua
@@ -52,6 +52,19 @@ function ResourceCell:show(itemId, hideAddImg)
ModuleManager.CommerceManager:showBuyArenaTicketUI()
end)
self.addImg:setVisible(true)
+ elseif itemId == GConst.ItemConst.ITEM_ID_SLIVER_WING then
+ self.baseObject:addClickListener(function()
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ local reward = {
+ type = GConst.REWARD_TYPE.ITEM,
+ id = GConst.ItemConst.ITEM_ID_SLIVER_WING,
+ num = 1
+ }
+ ModuleManager.CommonManager:showExchangeUI(1, runeData:getRemainSliverWingCount(), reward, runeData:getBuySliverCost(), function(count)
+ ModuleManager.DungeonRuneManager:reqBuySliverWing(count)
+ end)
+ end)
+ self.addImg:setVisible(true)
else
self.baseObject:removeClickListener()
self.addImg:setVisible(false)
diff --git a/lua/app/ui/daily_challenge/cell/task_cell.lua b/lua/app/ui/daily_challenge/cell/task_cell.lua
index fb72df6a..25696456 100644
--- a/lua/app/ui/daily_challenge/cell/task_cell.lua
+++ b/lua/app/ui/daily_challenge/cell/task_cell.lua
@@ -1,6 +1,6 @@
local TaskCell = class("TaskCell", BaseCell)
-local ICON_BG = {"daily_bg_1", "daily_bg_2"}
+local ICON_BG = {"common_board_131", "common_board_132"}
local ICON = {"daily_task_1", "daily_task_2"}
function TaskCell:refresh(taskInfo, customProgress)
@@ -8,7 +8,7 @@ function TaskCell:refresh(taskInfo, customProgress)
customProgress = customProgress or 0
local uiMap = self:getUIMap()
local icon = complete and ICON_BG[2] or ICON_BG[1]
- uiMap["task_cell.task_icon_bg"]:setSprite(GConst.ATLAS_PATH.DAILY_CHALLENGE, icon)
+ uiMap["task_cell.task_icon_bg"]:setSprite(GConst.ATLAS_PATH.COMMON, icon)
icon = complete and ICON[2] or ICON[1]
uiMap["task_cell.task_icon"]:setSprite(GConst.ATLAS_PATH.DAILY_CHALLENGE, icon)
uiMap["task_cell.desc"]:setText(DataManager.DailyChallengeData:getTaskDesc(taskInfo.task_id, true, customProgress))
diff --git a/lua/app/ui/dungeon/dungeon_board_cell.lua b/lua/app/ui/dungeon/dungeon_board_cell.lua
index a8b672e6..158ba427 100644
--- a/lua/app/ui/dungeon/dungeon_board_cell.lua
+++ b/lua/app/ui/dungeon/dungeon_board_cell.lua
@@ -1,5 +1,11 @@
local DungeonBoardCell = class("DungeonBoardCell", BaseCell)
+local HIDE_REWARD_MODULE = {
+ [ModuleManager.MODULE_KEY.DUNGEON_WEAPON] = true,
+ [ModuleManager.MODULE_KEY.DUNGEON_ARMOR] = true,
+ [ModuleManager.MODULE_KEY.RUNES_OPEN] = true,
+}
+
function DungeonBoardCell:init()
self.uiMap = self:getUIMap()
@@ -95,8 +101,7 @@ function DungeonBoardCell:refreshInfo()
end
function DungeonBoardCell:refreshRewards()
- if self.moduleKey == ModuleManager.MODULE_KEY.DUNGEON_WEAPON or
- self.moduleKey == ModuleManager.MODULE_KEY.DUNGEON_ARMOR then
+ if HIDE_REWARD_MODULE[self.moduleKey] then
self.itemReward:getBaseObject():setActive(false)
else
self.itemReward:getBaseObject():setActive(true)
diff --git a/lua/app/ui/dungeon_armor/cell/task_cell.lua b/lua/app/ui/dungeon_armor/cell/task_cell.lua
index ce019987..9240b313 100644
--- a/lua/app/ui/dungeon_armor/cell/task_cell.lua
+++ b/lua/app/ui/dungeon_armor/cell/task_cell.lua
@@ -1,12 +1,12 @@
local TaskCell = class("TaskCell", BaseCell)
-local ICON_BG = {"dungeon_armor_bg_9", "dungeon_armor_bg_10"}
+local ICON_BG = {"common_board_131", "common_board_132"}
local ICON = {"dungeon_armor_star_2", "dungeon_armor_star_1"}
function TaskCell:refresh(desc, over)
local uiMap = self:getUIMap()
local icon = over and ICON_BG[2] or ICON_BG[1]
- uiMap["task_cell.task_icon_bg"]:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, icon)
+ uiMap["task_cell.task_icon_bg"]:setSprite(GConst.ATLAS_PATH.COMMON, icon)
icon = over and ICON[2] or ICON[1]
uiMap["task_cell.task_icon"]:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, icon)
uiMap["task_cell.desc"]:setText(desc)
diff --git a/lua/app/ui/dungeon_rune.meta b/lua/app/ui/dungeon_rune.meta
new file mode 100644
index 00000000..1ee663b1
--- /dev/null
+++ b/lua/app/ui/dungeon_rune.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2e72a01d8b6402048b886bf2c7cacf3d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/lua/app/ui/dungeon_rune/cell.meta b/lua/app/ui/dungeon_rune/cell.meta
new file mode 100644
index 00000000..574520f1
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e148733f22b59274a82b62d49cd69ef0
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/lua/app/ui/dungeon_rune/cell/rank_cell.lua b/lua/app/ui/dungeon_rune/cell/rank_cell.lua
new file mode 100644
index 00000000..fb17643f
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell/rank_cell.lua
@@ -0,0 +1,69 @@
+local RankCell = class("RankCell", BaseCell)
+
+local RANK_ICON = {
+ "act_ranking_1",
+ "act_ranking_2",
+ "act_ranking_3"
+}
+
+local RANK_BG = {
+ "act_ranking_bg_1",
+ "act_ranking_bg_2",
+ "act_ranking_bg_3",
+ "act_ranking_bg_4"
+}
+
+function RankCell:refresh(index, info)
+ local uiMap = self:getUIMap()
+ if not self.playerHeadCell then
+ self.playerHeadCell = CellManager:addCellComp(uiMap["rank_reward_cell.bg.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL)
+ end
+ local indexStr = index
+ if index > GConst.DungeonRuneConst.RANK_MAX_NUM then
+ indexStr = GConst.DungeonRuneConst.RANK_MAX_NUM .. "+"
+ end
+ uiMap["act_rank_cell.tx_rank"]:setText(indexStr)
+ local imgRank = uiMap["act_rank_cell.img_rank"]
+ if RANK_ICON[index] then
+ imgRank:setVisible(true)
+ imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_ICON[index])
+ uiMap["act_rank_cell.tx_rank"]:setText(GConst.EMPTY_STRING)
+ else
+ imgRank:setVisible(false)
+ end
+
+ local imgBg = uiMap["act_rank_cell.bg"]
+ if RANK_BG[index] then
+ imgBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_BG[index])
+ else
+ imgBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_BG[4])
+ end
+
+ local txName = uiMap["act_rank_cell.tx_name"]
+ local txWave = uiMap["act_rank_cell.tx_wave"]
+ local txRound = uiMap["act_rank_cell.tx_round"]
+
+ if info then
+ txName:setText(info.name)
+ txWave:setText(info.wave)
+ txRound:setText(info.round)
+ self.playerHeadCell:getBaseObject():addClickListener(function()
+ ModuleManager.ActBossRushManager:reqOtherPlayerInfo(info.id, function(formation)
+ if not self.playerHeadCell or not self.playerHeadCell:getBaseObject() or self.playerHeadCell:getBaseObject():isDestroyed() then
+ return
+ end
+ ModuleManager.TipsManager:showHeroFormation(self.playerHeadCell:getBaseObject(), formation)
+ end)
+ end)
+ self.playerHeadCell:refresh(info.avatar, info.avatar_frame, false)
+ else
+ txName:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_8))
+ txWave:setText("--")
+ txRound:setText("--")
+ self.playerHeadCell:getBaseObject():addClickListener(nil)
+ self.playerHeadCell:refresh(3001, 1000, false) -- 默认
+ end
+
+end
+
+return RankCell
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/cell/rank_cell.lua.meta b/lua/app/ui/dungeon_rune/cell/rank_cell.lua.meta
new file mode 100644
index 00000000..822be13c
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell/rank_cell.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: f20246d319f738042a589da98b7edbb7
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/cell/rune_battle_task_cell.lua b/lua/app/ui/dungeon_rune/cell/rune_battle_task_cell.lua
new file mode 100644
index 00000000..b580eea4
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell/rune_battle_task_cell.lua
@@ -0,0 +1,11 @@
+local RuneBattleTaskCell = class("RuneBattleTaskCell", BaseCell)
+
+function RuneBattleTaskCell:refresh(desc, taskInfo, over)
+ local uiMap = self:getUIMap()
+ uiMap["task_cell.desc"]:setText(desc)
+ uiMap["task_cell.check"]:setVisible(over)
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ uiMap["task_cell.task_icon"]:setSprite(runeData:getConditionIcon(taskInfo))
+end
+
+return RuneBattleTaskCell
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/cell/rune_battle_task_cell.lua.meta b/lua/app/ui/dungeon_rune/cell/rune_battle_task_cell.lua.meta
new file mode 100644
index 00000000..b5914df2
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell/rune_battle_task_cell.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 0b2e9067ce994544dbf16af57c6fadf2
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua b/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua
new file mode 100644
index 00000000..3b87e3b0
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua
@@ -0,0 +1,91 @@
+local RuneChapterCell = class("RuneChapterCell", BaseCell)
+
+local BG = {
+ "assets/arts/textures/background/dungeon_rune/dungeon_equip_bg_3.png",
+ "assets/arts/textures/background/dungeon_rune/dungeon_equip_bg_2.png",
+ "assets/arts/textures/background/dungeon_rune/dungeon_equip_bg_5.png",
+}
+
+function RuneChapterCell:refresh(id, index, isFinal, chapterListCount)
+ local uiMap = self:getUIMap()
+ local bg = uiMap["chapter_cell.bg"]
+ local touchNode = uiMap["chapter_cell.touch_node"]
+ if not isFinal then
+ local bgAsset = BG[2]
+ local isLeft = index % 2 ~= 0
+ if isLeft then
+ bgAsset = BG[1]
+ touchNode:setAnchoredPositionX(-190)
+ else
+ touchNode:setAnchoredPositionX(190)
+ end
+ if chapterListCount - 1 == index then
+ bgAsset = BG[3]
+ end
+ bg:setTexture(bgAsset)
+ bg:setVisible(chapterListCount ~= index)
+ end
+
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ local maxPassedId = runeData:getPassedMaxId()
+ local fightBg = uiMap["chapter_cell.touch_node.bg"]
+ local curBg = uiMap["chapter_cell.touch_node.bg_cur"]
+ local lightImg = uiMap["chapter_cell.touch_node.img_light"]
+ local sweep = uiMap["chapter_cell.touch_node.sweep_bg"]
+ local descMinRound = uiMap["chapter_cell.touch_node.bg.desc_min_round"]
+ descMinRound:setVisible(false)
+ lightImg:setVisible(false)
+ sweep:setVisible(false)
+ local passed = false
+ if runeData:curFight(id) then -- 正在可打的
+ curBg:setVisible(true)
+ fightBg:setVisible(false)
+
+ local layer = uiMap["chapter_cell.touch_node.bg_cur.desc"]
+ layer:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, id))
+ else
+ curBg:setVisible(false)
+ fightBg:setVisible(true)
+
+ local layer = uiMap["chapter_cell.touch_node.bg.desc"]
+ layer:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, id))
+ local lock = uiMap["chapter_cell.touch_node.bg.lock"]
+ if maxPassedId >= id then -- 已通关的
+ passed = true
+ local canSweep = runeData:canSweep(id)
+ sweep:setVisible(canSweep)
+ if canSweep then
+ uiMap["chapter_cell.touch_node.sweep_bg.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
+ end
+ lock:setVisible(false)
+ layer:setAnchoredPositionX(0)
+ -- lightImg:setVisible(true)
+ -- descMinRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, runeData:getChapterPassRound(id)))
+ -- descMinRound:setVisible(true)
+ else
+ lock:setVisible(true)
+ GFunc.centerImgAndTx(lock, layer, 5)
+ end
+ end
+
+ if not self.rewardCells then
+ self.rewardCells = {}
+ for i = 1, 2 do
+ self.rewardCells[i] = CellManager:addCellComp(uiMap["chapter_cell.touch_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
+ end
+ end
+
+ local rewards = runeData:getChapterRewards(id)
+ for i, cell in ipairs(self.rewardCells) do
+ if rewards[i] then
+ cell:refreshByConfig(rewards[i], passed, passed)
+ end
+ end
+end
+
+function RuneChapterCell:addClickListener(func)
+ local uiMap = self:getUIMap()
+ uiMap["chapter_cell.touch_node"]:addClickListener(func)
+end
+
+return RuneChapterCell
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua.meta b/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua.meta
new file mode 100644
index 00000000..3a4c5f67
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell/rune_chapter_cell.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: c088d6f33138d9f408a31d192f2ece9e
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/cell/rune_task_cell.lua b/lua/app/ui/dungeon_rune/cell/rune_task_cell.lua
new file mode 100644
index 00000000..c8220505
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell/rune_task_cell.lua
@@ -0,0 +1,38 @@
+local RuneTaskCell = class("RuneTaskCell", BaseCell)
+
+local BG = {"common_board_131", "common_board_132"} -- 紫绿
+
+function RuneTaskCell:refresh(taskInfo)
+ local uiMap = self:getUIMap()
+ local bg = uiMap["rune_task_cell.bg"]
+ local icon = uiMap["rune_task_cell.icon"]
+ local point = uiMap["rune_task_cell.point"]
+ local desc = uiMap["rune_task_cell.desc"]
+ local taskType = taskInfo[1]
+ local taskParams1 = taskInfo[2]
+ local taskParams2 = taskInfo[3]
+
+ local taskNum = 0
+ if taskType == GConst.DungeonRuneConst.TASK_TYPE.PASS_ROUND then
+ taskNum = taskParams1
+ else
+ taskNum = taskParams2 or 0
+ end
+
+ local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ icon:setSprite(runeData:getConditionIcon(taskInfo))
+
+ desc:setText(taskNum)
+
+ self:hidePoint(false)
+end
+
+function RuneTaskCell:hidePoint(hide)
+ local uiMap = self:getUIMap()
+ local point = uiMap["rune_task_cell.point"]
+ local desc = uiMap["rune_task_cell.desc"]
+ point:setVisible(not hide)
+ desc:setVisible(not hide)
+end
+
+return RuneTaskCell
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/cell/rune_task_cell.lua.meta b/lua/app/ui/dungeon_rune/cell/rune_task_cell.lua.meta
new file mode 100644
index 00000000..d5dfbc25
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/cell/rune_task_cell.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: da93c46173e2d15498c62350462e5213
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_boss_fight_ui.lua b/lua/app/ui/dungeon_rune/dungeon_rune_boss_fight_ui.lua
new file mode 100644
index 00000000..633b78ea
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_boss_fight_ui.lua
@@ -0,0 +1,164 @@
+local DungeonRuneBossFightUI = class("DungeonRuneBossFightUI", BaseUI)
+
+local RUNE_TASK_CELL = "app/ui/dungeon_rune/cell/rune_task_cell"
+
+function DungeonRuneBossFightUI:isFullScreen()
+ return false
+end
+
+function DungeonRuneBossFightUI:getPrefabPath()
+ return "assets/prefabs/ui/dungeon_rune/dungeon_rune_boss_fight_ui.prefab"
+end
+
+function DungeonRuneBossFightUI:ctor(params)
+ self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+
+ self.id = params.id
+end
+
+function DungeonRuneBossFightUI:onLoadRootComplete()
+ self:_display()
+ self:_addListeners()
+ self:_bind()
+end
+
+function DungeonRuneBossFightUI:_display()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_boss_fight_ui.bg.title.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, self.id))
+ uiMap["dungeon_rune_boss_fight_ui.bg.btn_again.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_2))
+ local spineName, spineScale = self.runeData:getChapterMonsterSpine(self.id)
+ local spineObject = uiMap["dungeon_rune_boss_fight_ui.bg.banner.ui_spine_obj"]
+ spineObject:setVisible(false)
+ spineObject:loadAssetAsync(spineName, function()
+ spineObject:playAnim("idle", true, true, true)
+ spineObject:setLocalScale(spineScale, spineScale, spineScale)
+ spineObject:setVisible(true)
+ end, true)
+
+ local i18Config = self.runeData:getChapterMonsterI18N(self.id)
+ uiMap["dungeon_rune_boss_fight_ui.bg.desc_1"]:setText(i18Config.name)
+ uiMap["dungeon_rune_boss_fight_ui.bg.desc_2"]:setText(i18Config.desc)
+
+ self:refreshTargetInfo()
+ self:refreshRewardInfo()
+ self:refreshFightBtn()
+end
+
+function DungeonRuneBossFightUI:_addListeners()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_boss_fight_ui.bg.btn_close"]:addClickListener(function()
+ self:closeUI()
+ end)
+
+ uiMap["dungeon_rune_boss_fight_ui.bg.btn"]:addClickListener(function()
+ local passed = self.runeData:passedChapter(self.id)
+ if passed then
+ ModuleManager.DungeonRuneManager:reqSweep(self.id)
+ else
+ ModuleManager.DungeonRuneManager:reqFight(self.id)
+ end
+ end)
+
+ uiMap["dungeon_rune_boss_fight_ui.bg.btn_again"]:addClickListener(function()
+ ModuleManager.DungeonRuneManager:reqFight(self.id)
+ end)
+end
+
+function DungeonRuneBossFightUI:_bind()
+ self:bind(self.runeData, "isDirty", function()
+ self:refreshFightBtn()
+ end)
+end
+
+function DungeonRuneBossFightUI:refreshTargetInfo()
+ local uiMap = self.root:genAllChildren()
+ if not self.taskRuneCell then
+ self.taskRuneCell = CellManager:addCellComp(uiMap["dungeon_rune_boss_fight_ui.bg.banner.rune_task_cell"], RUNE_TASK_CELL)
+ end
+
+ local chapterCondition = self.runeData:getChapterCondition(self.id)
+ if chapterCondition[1] then
+ self.taskRuneCell:refresh(chapterCondition[1])
+ self.taskRuneCell:addClickListener(function()
+ ModuleManager.TipsManager:showDescTips(self.runeData:getConditionDesc(chapterCondition[1]), self.taskRuneCell:getBaseObject())
+ end)
+ end
+end
+
+function DungeonRuneBossFightUI:refreshRewardInfo()
+ local uiMap = self.root:genAllChildren()
+ local passed = self.runeData:passedChapter(self.id)
+ local title = uiMap["dungeon_rune_boss_fight_ui.bg.desc_3"]
+
+ local descPassRound = uiMap["dungeon_rune_boss_fight_ui.bg.desc_4"]
+ local imgPassIcon = uiMap["dungeon_rune_boss_fight_ui.bg.icon"]
+ local rewardNode = uiMap["dungeon_rune_boss_fight_ui.bg.reward_node"]
+
+ if not self.rewardCells then
+ self.rewardCells = {}
+ for i = 1, 4 do
+ self.rewardCells[i] = CellManager:addCellComp(uiMap["dungeon_rune_boss_fight_ui.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
+ end
+ end
+
+ local rewards = self.runeData:getChapterRewards(self.id)
+ if passed then
+ title:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_4))
+ -- local round = self.runeData:getChapterPassRound(self.id)
+ imgPassIcon:setActive(false)
+ descPassRound:setText(GConst.EMPTY_STRING)
+ descPassRound:setAnchoredPositionX(0)
+ -- descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, round))
+ -- imgPassIcon:setActive(true)
+ GFunc.centerImgAndTx(imgPassIcon, descPassRound, 5)
+ rewards = self.runeData:getChapterSweepRewards(self.id)
+ else
+ imgPassIcon:setActive(false)
+ descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_5))
+ descPassRound:setAnchoredPositionX(0)
+ title:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_3))
+ end
+
+ for index, cell in ipairs(self.rewardCells) do
+ local reward = rewards[index]
+ if reward then
+ cell:refreshByConfig(reward)
+ cell:getBaseObject():setActive(true)
+ else
+ cell:getBaseObject():setActive(false)
+ end
+ end
+
+ rewardNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout()
+end
+
+function DungeonRuneBossFightUI:refreshFightBtn()
+ local uiMap = self.root:genAllChildren()
+ local btn = uiMap["dungeon_rune_boss_fight_ui.bg.btn"]
+ local btnAgain = uiMap["dungeon_rune_boss_fight_ui.bg.btn_again"]
+
+ local icon = uiMap["dungeon_rune_boss_fight_ui.bg.btn.icon"]
+ local num = uiMap["dungeon_rune_boss_fight_ui.bg.btn.num"]
+ local desc = uiMap["dungeon_rune_boss_fight_ui.bg.btn.desc"]
+
+ local passed = self.runeData:passedChapter(self.id)
+ if passed then
+ desc:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
+ num:setText(1)
+ icon:setSprite(ModuleManager.ItemManager:getItemIcon(GConst.ItemConst.ITEM_ID_SLIVER_WING))
+ GFunc.centerImgAndTx(icon, num, 5)
+ btn:setAnchoredPositionX(130)
+ btnAgain:setActive(true)
+ btn:setLocalScale(0.9, 0.9, 0.9)
+ else
+ desc:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE))
+ num:setText(1)
+ icon:setSprite(ModuleManager.ItemManager:getItemIcon(GConst.ItemConst.ITEM_ID_GLOD_WING))
+ GFunc.centerImgAndTx(icon, num, 5)
+ btn:setAnchoredPositionX(0)
+ btnAgain:setActive(false)
+ btn:setLocalScale(1, 1, 1)
+ end
+end
+
+return DungeonRuneBossFightUI
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_boss_fight_ui.lua.meta b/lua/app/ui/dungeon_rune/dungeon_rune_boss_fight_ui.lua.meta
new file mode 100644
index 00000000..e38e3278
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_boss_fight_ui.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 71b109a8c9790d448834c8eb0e079b6b
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_fight_ui.lua b/lua/app/ui/dungeon_rune/dungeon_rune_fight_ui.lua
new file mode 100644
index 00000000..81d08f13
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_fight_ui.lua
@@ -0,0 +1,137 @@
+local DungeonRuneFightUI = class("DungeonRuneFightUI", BaseUI)
+
+local RUNE_TASK_CELL = "app/ui/dungeon_rune/cell/rune_task_cell"
+
+function DungeonRuneFightUI:isFullScreen()
+ return false
+end
+
+function DungeonRuneFightUI:getPrefabPath()
+ return "assets/prefabs/ui/dungeon_rune/dungeon_rune_fight_ui.prefab"
+end
+
+function DungeonRuneFightUI:ctor(params)
+ self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+
+ self.id = params.id
+end
+
+function DungeonRuneFightUI:onLoadRootComplete()
+ self:_display()
+ self:_addListeners()
+end
+
+function DungeonRuneFightUI:_display()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_fight_ui.bg.title.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, self.id))
+ uiMap["dungeon_rune_fight_ui.bg.desc_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_1))
+ self:refreshTargetInfo()
+ self:refreshRewardInfo()
+ self:refreshFightBtn()
+end
+
+function DungeonRuneFightUI:_addListeners()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_fight_ui.bg.btn_close"]:addClickListener(function()
+ self:closeUI()
+ end)
+
+ uiMap["dungeon_rune_fight_ui.bg.btn"]:addClickListener(function()
+ ModuleManager.DungeonRuneManager:reqFight(self.id)
+ end)
+end
+
+function DungeonRuneFightUI:refreshTargetInfo()
+ local uiMap = self.root:genAllChildren()
+ if not self.taskRuneCells then
+ self.taskRuneCells = {}
+ for i = 1, 4 do
+ self.taskRuneCells[i] = CellManager:addCellComp(uiMap["dungeon_rune_fight_ui.bg.rune_task_cell_" .. i], RUNE_TASK_CELL)
+ end
+ end
+
+ local chapterCondition = self.runeData:getChapterCondition(self.id)
+ for index, cell in ipairs(self.taskRuneCells) do
+ local info = chapterCondition[index]
+ if info then
+ cell:refresh(info)
+ cell:getBaseObject():setActive(true)
+ cell:addClickListener(function()
+ ModuleManager.TipsManager:showDescTips(self.runeData:getConditionDesc(info), cell:getBaseObject())
+ end)
+ else
+ cell:getBaseObject():setActive(false)
+ end
+ end
+ uiMap["dungeon_rune_fight_ui.bg.task_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout()
+end
+
+function DungeonRuneFightUI:refreshRewardInfo()
+ local uiMap = self.root:genAllChildren()
+ local passed = self.runeData:passedChapter(self.id)
+ local descPassRound = uiMap["dungeon_rune_fight_ui.bg.desc_3"]
+ local imgPassIcon = uiMap["dungeon_rune_fight_ui.bg.icon"]
+ local rewardNode = uiMap["dungeon_rune_fight_ui.bg.reward_node"]
+ rewardNode:setActive(not passed)
+ descPassRound:setVisible(passed)
+ imgPassIcon:setVisible(passed)
+ if passed then
+ descPassRound:setVisible(false)
+ imgPassIcon:setVisible(false)
+ -- local round = self.runeData:getChapterPassRound(self.id)
+ -- descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, round))
+ -- GFunc.centerImgAndTx(imgPassIcon, descPassRound, 5)
+ else
+ if not self.rewardCells then
+ self.rewardCells = {}
+ for i = 1, 4 do
+ self.rewardCells[i] = CellManager:addCellComp(uiMap["dungeon_rune_fight_ui.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
+ end
+ end
+
+ local rewards = self.runeData:getChapterRewards(self.id)
+ for index, cell in ipairs(self.rewardCells) do
+ local reward = rewards[index]
+ if reward then
+ cell:refreshByConfig(reward)
+ cell:getBaseObject():setActive(true)
+ else
+ cell:getBaseObject():setActive(false)
+ end
+ end
+
+ rewardNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout()
+ end
+end
+
+function DungeonRuneFightUI:refreshFightBtn()
+ local uiMap = self.root:genAllChildren()
+ local title = uiMap["dungeon_rune_fight_ui.bg.desc_2"]
+
+ local iconBg = uiMap["dungeon_rune_fight_ui.bg.btn.icon_bg"]
+ local icon = uiMap["dungeon_rune_fight_ui.bg.btn.icon"]
+ local num = uiMap["dungeon_rune_fight_ui.bg.btn.num"]
+ local desc = uiMap["dungeon_rune_fight_ui.bg.btn.desc"]
+
+ local descAgain = uiMap["dungeon_rune_fight_ui.bg.btn.desc_again"]
+ local passed = self.runeData:passedChapter(self.id)
+ local notPass = not passed
+ iconBg:setVisible(notPass)
+ icon:setVisible(notPass)
+ num:setVisible(notPass)
+ desc:setVisible(notPass)
+ descAgain:setVisible(passed)
+ if passed then
+ descAgain:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_2))
+ -- title:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_6))
+ title:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_3))
+ else
+ desc:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE))
+ num:setText(1)
+ icon:setSprite(ModuleManager.ItemManager:getItemIcon(GConst.ItemConst.ITEM_ID_GLOD_WING))
+ GFunc.centerImgAndTx(icon, num, 5)
+ title:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_3))
+ end
+end
+
+return DungeonRuneFightUI
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_fight_ui.lua.meta b/lua/app/ui/dungeon_rune/dungeon_rune_fight_ui.lua.meta
new file mode 100644
index 00000000..a8cc2f4f
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_fight_ui.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 2af4b972f5eef6245b50e9b61bc9ccb5
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_main_ui.lua b/lua/app/ui/dungeon_rune/dungeon_rune_main_ui.lua
new file mode 100644
index 00000000..1ef256f2
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_main_ui.lua
@@ -0,0 +1,130 @@
+local DungeonRuneMainUI = class("DungeonRuneMainUI", BaseUI)
+
+local RUNE_CHAPTER_CELL = "app/ui/dungeon_rune/cell/rune_chapter_cell"
+
+function DungeonRuneMainUI:getCurrencyParams()
+ if self.currencyParams == nil then
+ self.currencyParams = {
+ itemIds = {
+ GConst.ItemConst.ITEM_ID_SLIVER_WING,
+ GConst.ItemConst.ITEM_ID_GLOD_WING,
+ },
+ showType = GConst.CURRENCY_TYPE.HORIZONTAL
+ }
+ end
+ return self.currencyParams
+end
+
+function DungeonRuneMainUI:onPressBackspace()
+ self:closeUI()
+end
+
+function DungeonRuneMainUI:getPrefabPath()
+ return "assets/prefabs/ui/dungeon_rune/dungeon_rune_main_ui.prefab"
+end
+
+function DungeonRuneMainUI:ctor()
+ self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ self.chapterList = {}
+ self.chapterListCount = 0
+ for id, info in ipairs(ConfigManager:getConfig(self.runeData:getConfigName())) do
+ table.insert(self.chapterList, id)
+ self.chapterListCount = self.chapterListCount + 1
+ end
+ self.chapterListCount = self.chapterListCount - 1
+ self.lastChapterId = table.remove(self.chapterList)
+ self.targetId = self.runeData:getPassedMaxId()
+ if self.targetId <= 0 then
+ self.targetId = 1
+ end
+end
+
+function DungeonRuneMainUI:onLoadRootComplete()
+ self:_display()
+ self:_addListeners()
+ self:_bind()
+end
+
+function DungeonRuneMainUI:_display()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_main_ui.banner.btn_formation.tx_ok"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_4))
+ self:refreshScrollrect()
+ self:refreshFormation()
+end
+
+function DungeonRuneMainUI:_addListeners()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_main_ui.banner.btn_formation"]:addClickListener(function()
+ ModuleManager.CommonManager:showFormationUI(GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE)
+ end)
+
+ uiMap["dungeon_rune_main_ui.banner.btn_back"]:addClickListener(function()
+ self:closeUI()
+ end)
+end
+
+function DungeonRuneMainUI:_bind()
+ self:bind(self.runeData, "isDirty", function()
+ self:refreshFormation()
+ self:refreshAllCells()
+ end)
+
+ self:bind(DataManager.FormationData, "dirty", function()
+ self:refreshFormation()
+ end)
+
+ self:bind(DataManager.HeroData, "isDirty", function()
+ self:refreshFormation()
+ end)
+end
+
+function DungeonRuneMainUI:refreshFormation()
+ if not self.formationComp then
+ local uiMap = self.root:genAllChildren()
+ self.formationComp = uiMap["dungeon_rune_main_ui.hero_formation_comp"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.HERO_FORMATION_COMP)
+ end
+ self.formationComp:refreshByFormation(DataManager.FormationData:getDungeonRuneFormation())
+end
+
+function DungeonRuneMainUI:refreshScrollrect()
+ local uiMap = self.root:genAllChildren()
+ if not self.scrollRect then
+ self.scrollRect = uiMap["dungeon_rune_main_ui.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
+ self.scrollRect:addInitCallback(function()
+ return RUNE_CHAPTER_CELL
+ end)
+ self.scrollRect:addRefreshCallback(function(index, cell)
+ cell:refresh(self.chapterList[index], index, false, self.chapterListCount)
+ end)
+ self.scrollRect:addInitFinishCallback(function(cell)
+ cell:addClickListener(function()
+ self:onClickCell(self.chapterList[cell:getIndex()])
+ end)
+ end)
+ end
+ self.scrollRect:refillCells(self.chapterListCount, nil, self.targetId)
+
+ local content = uiMap["dungeon_rune_main_ui.scrollrect.viewport.content"]
+ content:setSizeDeltaY(279 * (self.chapterListCount - 1) + 966)
+ if not self.lastChapterCell then
+ self.lastChapterCell = CellManager:addCellComp(uiMap["dungeon_rune_main_ui.scrollrect.viewport.content.last_cell"], RUNE_CHAPTER_CELL)
+ end
+ self.lastChapterCell:refresh(self.lastChapterId, nil, true)
+ self.lastChapterCell:addClickListener(function()
+ self:onClickCell(self.lastChapterId)
+ end)
+end
+
+function DungeonRuneMainUI:refreshAllCells()
+ if not self.scrollRect then
+ return
+ end
+
+ self.scrollRect:refreshAll()
+end
+
+function DungeonRuneMainUI:onClickCell(id)
+ ModuleManager.DungeonRuneManager:showFightUI(id)
+end
+
+return DungeonRuneMainUI
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_main_ui.lua.meta b/lua/app/ui/dungeon_rune/dungeon_rune_main_ui.lua.meta
new file mode 100644
index 00000000..d0e4b095
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_main_ui.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 8354d453e6a43954b9411e730327a55e
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_rank_ui.lua b/lua/app/ui/dungeon_rune/dungeon_rune_rank_ui.lua
new file mode 100644
index 00000000..d3e15c43
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_rank_ui.lua
@@ -0,0 +1,242 @@
+local DungeonRuneRankUI = class("DungeonRuneRankUI", BaseUI)
+
+local RANK_ICON = {
+ "act_ranking_1",
+ "act_ranking_2",
+ "act_ranking_3"
+}
+local PAGE_ICON = {"common_menu_1", "common_menu_2"}
+local RANK_CELL = "app/ui/dungeon_rune/cell/rank_cell"
+
+local PAGE_TYPE = {
+ TODAY = 1,
+ LAST_DAY = 2,
+ REWARD = 3,
+}
+
+local PAGE_TX = {
+ [PAGE_TYPE.LAST_DAY] = I18N.GlobalConst.DUNGEON_RUNE_DESC_9,
+ [PAGE_TYPE.TODAY] = I18N.GlobalConst.DUNGEON_RUNE_DESC_8,
+ [PAGE_TYPE.REWARD] = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_22,
+}
+
+function DungeonRuneRankUI:isFullScreen()
+ return false
+end
+
+function DungeonRuneRankUI:getPrefabPath()
+ return "assets/prefabs/ui/dungeon_rune/dungeon_rune_rank_ui.prefab"
+end
+
+function DungeonRuneRankUI:ctor()
+ self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+end
+
+function DungeonRuneRankUI:onLoadRootComplete()
+ self:initScrollrect()
+ self:_display()
+ self:_addListeners()
+ self:_bind()
+
+ self:switchPage(PAGE_TYPE.TODAY)
+
+ self:refreshTime()
+ if self.actCountdownSid then
+ self:unscheduleGlobal(self.actCountdownSid)
+ end
+ self.actCountdownSid = self:scheduleGlobal(function()
+ self:refreshTime()
+ end, 1)
+end
+
+function DungeonRuneRankUI:_display()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_rank_ui.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_5))
+ uiMap["dungeon_rune_rank_ui.bg.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_TIP_1))
+end
+
+function DungeonRuneRankUI:_addListeners()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_rank_ui.bg.close_btn"]:addClickListener(function()
+ self:closeUI()
+ end)
+end
+
+function DungeonRuneRankUI:_bind()
+ self:bind(self.runeData, "isDirty", function()
+ self:refreshRankNode()
+ self:refreshMyRankInfo()
+ self:refreshPages()
+ end)
+end
+
+function DungeonRuneRankUI:initScrollrect()
+ if self.scrollRectComp then
+ return
+ end
+
+ local uiMap = self.root:genAllChildren()
+ self.scrollRectComp = uiMap["dungeon_rune_rank_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
+ self.scrollRectComp:addInitCallback(function()
+ return RANK_CELL
+ end)
+ self.scrollRectComp:addRefreshCallback(function(index, cell)
+ local info = self.rankList[index + 3]
+ cell:refresh(index, info)
+ end)
+ self.scrollRectComp:clearCells()
+ self.scrollRectComp:setTotalCount(0)
+end
+
+function DungeonRuneRankUI:refreshRankNode()
+ if self.curPage == PAGE_TYPE.LAST_DAY then
+ self.rankList = self.runeData:getLastRankInfo()
+ elseif self.curPage == PAGE_TYPE.TODAY then
+ self.rankList = self.runeData:getCurRankInfo()
+ else
+ self.rankList = {}
+ end
+ self.scrollRectComp:refillCells(#self.rankList)
+end
+
+function DungeonRuneRankUI:refreshPages()
+ if not self.pageObjs then
+ local uiMap = self.root:genAllChildren()
+ self.pageObjs = {}
+ for i = 1, 3 do
+ self.pageObjs[i] = {
+ page = uiMap["dungeon_rune_rank_ui.bg.page_" .. i],
+ tx1 = uiMap["dungeon_rune_rank_ui.bg.page_" .. i .. ".tx"],
+ tx2 = uiMap["dungeon_rune_rank_ui.bg.page_" .. i .. ".tx_hl"],
+ }
+ self.pageObjs[i].page:addClickListener(function()
+ self:switchPage(i)
+ end)
+ end
+ end
+ for index, objs in ipairs(self.pageObjs) do
+ if index == self.curPage then
+ objs.page:setSprite(GConst.ATLAS_PATH.COMMON, PAGE_ICON[1])
+ objs.page:setAnchoredPositionY(-56)
+ objs.tx1:setText(GConst.EMPTY_STRING)
+ objs.tx2:setText(I18N:getGlobalText(PAGE_TX[index]))
+ else
+ objs.page:setSprite(GConst.ATLAS_PATH.COMMON, PAGE_ICON[2])
+ objs.page:setAnchoredPositionY(-45)
+ objs.tx1:setText(I18N:getGlobalText(PAGE_TX[index]))
+ objs.tx2:setText(GConst.EMPTY_STRING)
+ end
+ end
+
+ if self.runeData:canGetRankReward() then
+ self.pageObjs[3].page:addRedPoint(77, -6.5, 1)
+ else
+ self.pageObjs[3].page:removeRedPoint()
+ end
+end
+
+function DungeonRuneRankUI:switchPage(page)
+ if self.curPage == page then
+ return
+ end
+ self.curPage = page
+ self:refreshRankNode()
+ self:refreshPages()
+ self:refreshMyRankInfo()
+end
+
+function DungeonRuneRankUI:refreshMyRankInfo()
+ local info
+ local canGot = self.runeData:canGetRankReward()
+
+ if self.curPage == PAGE_TYPE.TODAY then
+ info = self.runeData:getCurRankSelfInfo()
+ else
+ info = self.runeData:getLastSelfInfo()
+ end
+
+ local rank = info and info.rank or 0
+ local layer = info and info.wave or 0
+ local round = info and info.round or 0
+ local uiMap = self.root:genAllChildren()
+ if not self.playerHeadCell then
+ self.playerHeadCell = CellManager:addCellComp(uiMap["dungeon_rune_rank_ui.bg.my_node.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL)
+ self.selfRewardCells = {}
+ for i = 1, 3 do
+ self.selfRewardCells[i] = CellManager:addCellComp(uiMap["dungeon_rune_rank_ui.bg.my_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
+ end
+ end
+
+ self.playerHeadCell:refresh()
+ uiMap["dungeon_rune_rank_ui.bg.my_node.tx_name"]:setText(DataManager.PlayerData:getNickname())
+ local rankObj = uiMap["dungeon_rune_rank_ui.bg.my_node.tx_rank"]
+ if not rank or rank <= 0 then
+ rankObj:setText("--")
+ else
+ rankObj:setText(rank)
+ if rank > GConst.DungeonRuneConst.RANK_MAX_NUM then
+ rankObj:setText(GConst.DungeonRuneConst.RANK_MAX_NUM .. "+")
+ end
+ end
+
+ local imgRank = uiMap["dungeon_rune_rank_ui.bg.my_node.img_rank"]
+ if RANK_ICON[rank] then
+ imgRank:setVisible(true)
+ imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_ICON[rank])
+ rankObj:setText(GConst.EMPTY_STRING)
+ else
+ imgRank:setVisible(false)
+ end
+
+ local layerObj = uiMap["dungeon_rune_rank_ui.bg.my_node.tx_max"]
+ if not layer then
+ layerObj:setText("--")
+ else
+ layerObj:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_10, layer))
+ end
+
+ local roundObj = uiMap["dungeon_rune_rank_ui.bg.my_node.tx_round"]
+ if not round then
+ roundObj:setText("--")
+ else
+ roundObj:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_11, round))
+ end
+
+ local got = self.runeData:isGotRankReward()
+ local rewards
+ if canGot then
+ rewards = self.runeData:getRankRewards(rank)
+ else
+ info = self.runeData:getCurRankSelfInfo()
+ rewards = self.runeData:getRankRewards(info.rank or 0)
+ got = false
+ end
+
+ for index, cell in ipairs(self.selfRewardCells) do
+ if rewards and rewards[index] then
+ cell:refreshByConfig(rewards[index], got, got)
+ cell:getBaseObject():setActive(true)
+ if canGot then
+ cell:showFrameAnimation()
+ cell:addClickListener(function()
+ ModuleManager.ActBossRushManager:reqRankReward()
+ end)
+ else
+ cell:hideFrameAnimation()
+ cell:addClickListener(nil)
+ end
+ else
+ cell:getBaseObject():setActive(false)
+ end
+ end
+end
+
+function DungeonRuneRankUI:refreshTime()
+ local uiMap = self.root:genAllChildren()
+ local remainTime = self.runeData:getCloseTime()
+ local str
+ str = Time:formatNumTimeStr(remainTime)
+ uiMap["dungeon_rune_rank_ui.bg.time_node.tx_time"]:setText(str)
+end
+
+return DungeonRuneRankUI
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_rank_ui.lua.meta b/lua/app/ui/dungeon_rune/dungeon_rune_rank_ui.lua.meta
new file mode 100644
index 00000000..d818e552
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_rank_ui.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: ba762d026c5c762449d0473a87c6f1cf
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_rebirth_ui.lua b/lua/app/ui/dungeon_rune/dungeon_rune_rebirth_ui.lua
new file mode 100644
index 00000000..947dc208
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_rebirth_ui.lua
@@ -0,0 +1,69 @@
+local DungeonRuneRebirthUI = class("DungeonRuneRebirthUI", BaseUI)
+
+function DungeonRuneRebirthUI:isFullScreen()
+ return false
+end
+
+function DungeonRuneRebirthUI:getPrefabPath()
+ return "assets/prefabs/ui/dungeon_rune/dungeon_rune_rebirth_ui.prefab"
+end
+
+function DungeonRuneRebirthUI:ctor(params)
+ self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+ self.adCallback = params.adCallback
+ self.refuseCallback = params.refuseCallback
+ self.isHpOver = params.isHpOver
+end
+
+function DungeonRuneRebirthUI:onLoadRootComplete()
+ self:_display()
+ self:_addListeners()
+end
+
+function DungeonRuneRebirthUI:_display()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_rebirth_ui.title_bg_img.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_TIP_2))
+ uiMap["dungeon_rune_rebirth_ui.title_bg_img.content_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_TIP_3))
+ local desc2
+ if self.isHpOver then
+ desc2 = I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_TIP_4)
+ else
+ desc2 = I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_TIP_5)
+ end
+ uiMap["dungeon_rune_rebirth_ui.title_bg_img.content_tx_2"]:setText(desc2)
+ uiMap["dungeon_rune_rebirth_ui.title_bg_img.desc_close"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_7))
+
+ local freeObj = uiMap["dungeon_rune_rebirth_ui.title_bg_img.ok_btn.text"]
+ freeObj:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE))
+ local freeAd = uiMap["dungeon_rune_rebirth_ui.title_bg_img.ok_btn.icon"]
+ GFunc.centerImgAndTx(freeAd, freeObj, 5)
+end
+
+function DungeonRuneRebirthUI:_addListeners()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_rebirth_ui.title_bg_img.desc_close"]:addClickListener(function()
+ self:closeUI()
+ local callback = self.refuseCallback
+ self.refuseCallback = nil
+ if callback then
+ callback()
+ end
+ end)
+
+ uiMap["dungeon_rune_rebirth_ui.title_bg_img.ok_btn"]:addClickListener(function()
+ SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.DUNGEON_RUNE_REBIRTH, function()
+ ModuleManager.DungeonRuneManager:reqRebirth(self.isHpOver)
+ end)
+ end)
+
+ self:addEventListener(EventManager.CUSTOM_EVENT.BATTLE_REBIRTH, function()
+ self:closeUI()
+ local callback = self.adCallback
+ self.adCallback = nil
+ if callback then
+ callback()
+ end
+ end)
+end
+
+return DungeonRuneRebirthUI
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_rebirth_ui.lua.meta b/lua/app/ui/dungeon_rune/dungeon_rune_rebirth_ui.lua.meta
new file mode 100644
index 00000000..568c8965
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_rebirth_ui.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 242d1a044e6b85b49b34a4f19b338670
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua b/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua
new file mode 100644
index 00000000..1ca3764e
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua
@@ -0,0 +1,71 @@
+local DungeonRuneTaskUI = class("DungeonRuneTaskUI", BaseUI)
+
+local TASK_CELL = "app/ui/dungeon_rune/cell/rune_battle_task_cell"
+
+function DungeonRuneTaskUI:isFullScreen()
+ return false
+end
+
+function DungeonRuneTaskUI:getPrefabPath()
+ return "assets/prefabs/ui/dungeon_rune/dungeon_rune_task_ui.prefab"
+end
+
+function DungeonRuneTaskUI:ctor(params)
+ self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
+
+ self.id = params.id
+end
+
+function DungeonRuneTaskUI:onLoadRootComplete()
+ self:_display()
+ self:_addListeners()
+end
+
+function DungeonRuneTaskUI:_display()
+ local uiMap = self.root:genAllChildren()
+ if not self.taskCells then
+ self.taskCells = {}
+ for i = 1, 3 do
+ self.taskCells[i] = CellManager:addCellComp(uiMap["dungeon_rune_task_ui.bg.task_cell_" .. i], TASK_CELL)
+ end
+ end
+
+ local chapterCondition = self.runeData:getChapterCondition(self.id)
+ local count = 0
+ local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(ModuleManager.BattleManager.battleController, chapterCondition)
+ for index, cell in ipairs(self.taskCells) do
+ local condition = chapterCondition[index + 1]
+ if condition then
+ cell:getBaseObject():setActive(true)
+ local desc = self.runeData:getConditionDesc(condition)
+ local over = false
+ if taskProgress[condition[1]] then
+ local info = taskProgress[condition[1]]
+ over = info.over
+ local color = "#FF4949"
+ if over then
+ color = "#49FF49"
+ end
+ desc = desc .. string.format("(%s/%s)", color, info.progress, info.totalProgress)
+ end
+ cell:refresh(desc, condition, over)
+ count = count + 1
+ else
+ cell:getBaseObject():setActive(false)
+ end
+ end
+
+ local y = 124 + 152 * count
+ uiMap["dungeon_rune_task_ui.bg"]:setSizeDeltaY(y)
+
+ uiMap["dungeon_rune_task_ui.bg.title_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME))
+end
+
+function DungeonRuneTaskUI:_addListeners()
+ local uiMap = self.root:genAllChildren()
+ uiMap["dungeon_rune_task_ui.bg.close_btn"]:addClickListener(function()
+ self:closeUI()
+ end)
+end
+
+return DungeonRuneTaskUI
\ No newline at end of file
diff --git a/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua.meta b/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua.meta
new file mode 100644
index 00000000..9feea18f
--- /dev/null
+++ b/lua/app/ui/dungeon_rune/dungeon_rune_task_ui.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 5bd4bedbba775b54ca1f753a24aa19ad
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/ui/hero/hero_comp.lua b/lua/app/ui/hero/hero_comp.lua
index ed3b4f52..f8c1d7b7 100644
--- a/lua/app/ui/hero/hero_comp.lua
+++ b/lua/app/ui/hero/hero_comp.lua
@@ -96,6 +96,8 @@ function HeroComp:refresh(battleType)
self:refreshDungeonArmorFormation()
elseif self.battleType == GConst.BattleConst.FORMATION_TYPE.BOSS_RUSH then
self:refreshBossRushFormation()
+ elseif self.battleType == GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE then
+ self:refreshDungeonRuneFormation()
end
end
@@ -181,6 +183,19 @@ function HeroComp:refreshBossRushFormation()
self:refreshScrollRect()
end
+function HeroComp:refreshDungeonRuneFormation()
+ self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_TITLE))
+ self.rimgTopBG:setTexture("assets/arts/textures/background/hero/hero_bg_1.png")
+ self.curFormation = DataManager.FormationData:getDungeonRuneFormation()
+
+ self.onClickUseFunc = function(id, type)
+ DataManager.FormationData:upHeroToFormation(self.battleType, type, id)
+ self:refreshDungeonRuneFormation()
+ end
+
+ self:refreshScrollRect()
+end
+
function HeroComp:refreshScrollRect()
self.heroList = DataManager.HeroData:getAllHeroesSort(self.battleType) -- 每次都重新算一次
diff --git a/lua/app/userdata/battle/battle_base_data.lua b/lua/app/userdata/battle/battle_base_data.lua
index 381b2fbc..c8e78492 100644
--- a/lua/app/userdata/battle/battle_base_data.lua
+++ b/lua/app/userdata/battle/battle_base_data.lua
@@ -864,6 +864,14 @@ function BattleBaseData:addMonster(monsterId, newTeam, battleController)
if battleController then
hp = hp * (DEFAULT_FACTOR + battleController:getMonsterHpAddition()) // DEFAULT_FACTOR
atk = atk * (DEFAULT_FACTOR + battleController:getMonsterAtkAddition()) // DEFAULT_FACTOR
+ local atkFixed = battleController:getMonsterAtkFixed()
+ local hpFixed = battleController:getMonsterHpFixed()
+ if atkFixed > 0 then
+ atk = atkFixed // DEFAULT_FACTOR
+ end
+ if hpFixed > 0 then
+ hp = hpFixed // DEFAULT_FACTOR
+ end
end
local unitData = {
id = monsterId,
diff --git a/lua/app/userdata/battle/team/battle_team_entity.lua b/lua/app/userdata/battle/team/battle_team_entity.lua
index 664c4448..67ba561a 100644
--- a/lua/app/userdata/battle/team/battle_team_entity.lua
+++ b/lua/app/userdata/battle/team/battle_team_entity.lua
@@ -12,6 +12,7 @@ local MATCH_WEAKNESS_NAME = BattleConst.MATCH_WEAKNESS_NAME
local DEFAULT_FACTOR = BattleConst.DEFAULT_FACTOR
local BUFF_NAME = BattleConst.BUFF_NAME
local ATTR_NAME = BattleConst.ATTR_NAME
+local PASSIVE_EVENT = BattleConst.PASSIVE_EVENT
function BattleTeamEntity:ctor()
self.members = {}
@@ -367,7 +368,7 @@ function BattleTeamEntity:getCanRebirth()
return self:getAttrValue(ATTR_NAME.REBIRTH) > 0
end
-function BattleTeamEntity:takeDamageOrCure(num)
+function BattleTeamEntity:takeDamageOrCure(num, unitComp)
if self.isDead then
return 0
end
@@ -390,6 +391,7 @@ function BattleTeamEntity:takeDamageOrCure(num)
if hp <= 0 then -- 死了
hurtEventNum = -hpBefore
self:setAttrValue(ATTR_NAME.HP, 0)
+ unitComp:checkPassiveEvent(PASSIVE_EVENT.HP_LOWER_THAN, self, 0)
self:die()
elseif hp < maxhp then
hurtEventNum = num
diff --git a/lua/app/userdata/battle/team/battle_unit_entity.lua b/lua/app/userdata/battle/team/battle_unit_entity.lua
index 24c8af4c..85c4e1c1 100644
--- a/lua/app/userdata/battle/team/battle_unit_entity.lua
+++ b/lua/app/userdata/battle/team/battle_unit_entity.lua
@@ -284,8 +284,8 @@ function BattleUnitEntity:addActiveSkillReleaseCount(num)
self.activeSkillReleaseCount = self.activeSkillReleaseCount + num
end
-function BattleUnitEntity:takeDamageOrCure(num)
- return self.team:takeDamageOrCure(num)
+function BattleUnitEntity:takeDamageOrCure(num, unitComp)
+ return self.team:takeDamageOrCure(num, unitComp)
end
function BattleUnitEntity:getHp()
diff --git a/lua/app/userdata/dungeon/dungeon_armor_entity.lua b/lua/app/userdata/dungeon/dungeon_armor_entity.lua
index 49afb2a5..476d4933 100644
--- a/lua/app/userdata/dungeon/dungeon_armor_entity.lua
+++ b/lua/app/userdata/dungeon/dungeon_armor_entity.lua
@@ -127,7 +127,7 @@ function DungeonArmorEntity:isNoTotalLimit()
return true
end
-function DungeonBaseEntity:isNotShowLimitCount()
+function DungeonArmorEntity:isNotShowLimitCount()
return true
end
diff --git a/lua/app/userdata/dungeon/dungeon_base_entity.lua b/lua/app/userdata/dungeon/dungeon_base_entity.lua
index ab448e1e..c6f9d5e5 100644
--- a/lua/app/userdata/dungeon/dungeon_base_entity.lua
+++ b/lua/app/userdata/dungeon/dungeon_base_entity.lua
@@ -20,6 +20,10 @@ function DungeonBaseEntity:getIsAllTimeOpen()
return false
end
+function DungeonBaseEntity:getCloseTime()
+ return nil
+end
+
-- 获取副本配置名称
function DungeonBaseEntity:getConfigName()
return nil
diff --git a/lua/app/userdata/dungeon/dungeon_data.lua b/lua/app/userdata/dungeon/dungeon_data.lua
index fe5888b1..c68f58a7 100644
--- a/lua/app/userdata/dungeon/dungeon_data.lua
+++ b/lua/app/userdata/dungeon/dungeon_data.lua
@@ -5,6 +5,7 @@ local SORT_ORDER = {
[ModuleManager.MODULE_KEY.DUNGEON_SHARDS] = 2,
[ModuleManager.MODULE_KEY.DUNGEON_WEAPON] = 3,
[ModuleManager.MODULE_KEY.DUNGEON_ARMOR] = 4,
+ [ModuleManager.MODULE_KEY.RUNES_OPEN] = 5,
}
-- 所有活动副本数据
@@ -89,6 +90,18 @@ function DungeonData:initDungeonWeapon(data)
self:setDirty()
end
+-- 初始化符文副本数据
+function DungeonData:initDungeonRune(data)
+ if data == nil then
+ return
+ end
+
+ self:initAllDataClass()
+ self.dataDungeons[ModuleManager.MODULE_KEY.RUNES_OPEN]:init(data)
+ self.data.rune = data
+ self:setDirty()
+end
+
-- 初始化所有副本数据类
function DungeonData:initAllDataClass()
@@ -98,6 +111,7 @@ function DungeonData:initAllDataClass()
self.dataDungeons[ModuleManager.MODULE_KEY.DUNGEON_SHARDS] = require "app/userdata/dungeon/dungeon_shards_entity":create()
self.dataDungeons[ModuleManager.MODULE_KEY.DUNGEON_ARMOR] = require "app/userdata/dungeon/dungeon_armor_entity":create()
self.dataDungeons[ModuleManager.MODULE_KEY.DUNGEON_WEAPON] = require "app/userdata/dungeon/dungeon_weapon_entity":create()
+ self.dataDungeons[ModuleManager.MODULE_KEY.RUNES_OPEN] = require "app/userdata/dungeon/dungeon_rune_entity":create()
if EDITOR_MODE then
Logger.logHighlight("星期".. tostring(Time:getWeekByTimeStamp()))
@@ -234,6 +248,11 @@ function DungeonData:isActiveCycle(moduleKey, checkWeek)
return true
end
+ local closeTime = self.dataDungeons[moduleKey]:getCloseTime()
+ if closeTime and closeTime > 0 then
+ return true
+ end
+
for index, week in ipairs(self.dataDungeons[moduleKey]:getOpenWeekCycle()) do
if week == checkWeek then
return true
@@ -361,6 +380,10 @@ function DungeonData:getCloseTime(moduleKey)
return 1
end
+ if self.dataDungeons[moduleKey]:getCloseTime() then
+ return self.dataDungeons[moduleKey]:getCloseTime()
+ end
+
local isActive = true
local count = 0
while isActive do
diff --git a/lua/app/userdata/dungeon/dungeon_rune_entity.lua b/lua/app/userdata/dungeon/dungeon_rune_entity.lua
new file mode 100644
index 00000000..8fd67a0a
--- /dev/null
+++ b/lua/app/userdata/dungeon/dungeon_rune_entity.lua
@@ -0,0 +1,273 @@
+local DungeonBaseEntity = require "app/userdata/dungeon/dungeon_base_entity"
+local DungeonRuneEntity = class("DungeonRuneEntity", DungeonBaseEntity)
+
+local TASK_TYPE = GConst.DungeonRuneConst.TASK_TYPE
+
+function DungeonRuneEntity:ctor()
+ self.data.isDirty = false
+ self.maxPassedId = 0
+ self.runeInfo = {}
+end
+
+function DungeonRuneEntity:clear()
+ self.data.isDirty = false
+ DataManager:unregisterCrossDayFunc("DungeonRuneEntity")
+end
+
+function DungeonRuneEntity:init(data)
+ if EDITOR_MODE then
+ Logger.logHighlight("-----DungeonRuneEntity------")
+ Logger.printTable(data)
+ end
+
+ self.totalChallengeCount = data.total_challenge_count or 0
+ self.fightCountMap = data.stat_counts or {}
+ self.maxPassedId = data.max_challenge_id and (data.max_challenge_id - 1) or 0
+ self.runeInfo = data.turns or {}
+ self.heroes = data.heroes or {}
+ self.buySilverCount = data.buy_silver_count or 0
+
+ DataManager.FormationData:initFormationByType(GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE, self.heroes)
+ DataManager:registerCrossDayFunc("DungeonRuneEntity", function()
+ self.buySilverCount = 0
+ self:setDirty()
+ end)
+end
+
+function DungeonRuneEntity:setDirty()
+ self.data.isDirty = not self.data.isDirty
+end
+
+function DungeonRuneEntity:getModuleKey()
+ return ModuleManager.MODULE_KEY.RUNES_OPEN
+end
+
+function DungeonRuneEntity:getConfig(chapterId)
+ return ConfigManager:getConfig(self:getConfigName())[chapterId]
+end
+
+function DungeonRuneEntity:getConfigName()
+ return "chapter_dungeon_rune"
+end
+
+function DungeonRuneEntity:getTitleString()
+ return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_TITLE)
+end
+
+function DungeonRuneEntity:getRuleString()
+ return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_HELP)
+end
+
+function DungeonRuneEntity:getOpenWeekString()
+ return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC)
+end
+
+function DungeonRuneEntity:getBanner()
+ return "assets/arts/textures/background/dungeon/dungeon_bg_4.png"
+end
+
+function DungeonRuneEntity:getOpenTextColor()
+ return "#FFFFFF"
+end
+
+function DungeonRuneEntity:isNoTotalLimit()
+ return true
+end
+
+function DungeonRuneEntity:isNotShowLimitCount()
+ return true
+end
+
+function DungeonRuneEntity:getIsAllTimeOpen()
+ return true
+end
+
+function DungeonRuneEntity:onClickFight()
+ ModuleManager.DungeonRuneManager:showMainUI()
+end
+
+function DungeonRuneEntity:getTodayRemainLimitCount()
+ return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_GLOD_WING)
+end
+
+function DungeonRuneEntity:getBuySliverWingCost()
+ if not self.buySliverWingCost then
+ self.buySliverWingCost = GFunc.getConstReward("dungeon_rune_cost")
+ end
+ return self.buySliverWingCost
+end
+
+function DungeonRuneEntity:getPassedMaxId()
+ return self.maxPassedId
+end
+
+function DungeonRuneEntity:updatePassedMaxId(maxId)
+ if not maxId then
+ return
+ end
+ self.maxPassedId = maxId
+end
+
+function DungeonRuneEntity:canSweep(id)
+ if id > self.maxPassedId then
+ return false
+ end
+ if not self:isBossChapter(id) then
+ return false
+ end
+ return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_SLIVER_WING) > 0
+end
+
+function DungeonRuneEntity:canFight(id)
+ if self.maxPassedId + 1 >= id then
+ return true
+ end
+ return false
+end
+
+function DungeonRuneEntity:passedChapter(id)
+ return self.maxPassedId >= id
+end
+
+function DungeonRuneEntity:curFight(id)
+ return id == self.maxPassedId + 1
+end
+
+function DungeonRuneEntity:getChapterPassRound(id)
+ if not self.runeInfo[id] then
+ return 0
+ end
+ return self.runeInfo[id] or 0
+end
+
+function DungeonRuneEntity:updatePassRound(id, round)
+ local cur = self.runeInfo[id]
+ if not cur or cur > round then
+ self.runeInfo[id] = round
+ self:tagRoundNew()
+ end
+end
+
+function DungeonRuneEntity:tagRoundNew()
+ self.tagNew = true
+end
+
+function DungeonRuneEntity:getTagRoundNew()
+ return self.tagNew
+end
+
+function DungeonRuneEntity:getChapterRewards(id)
+ return self:getConfig(id).first_reward
+end
+
+function DungeonRuneEntity:getChapterSweepRewards(id)
+ return self:getConfig(id).sweep_reward
+end
+
+function DungeonRuneEntity:isBossChapter(id)
+ local cfg = self:getConfig(id)
+ return not cfg.monster[2] -- 只有一个怪物的就是boss关卡
+end
+
+function DungeonRuneEntity:getChapterCondition(id)
+ local cfg = self:getConfig(id)
+ if not self.cacheChaperCondition then
+ self.cacheChaperCondition = {}
+ end
+
+ if not self.cacheChaperCondition[id] then
+ self.cacheChaperCondition[id] = {}
+ table.insert(self.cacheChaperCondition[id], {0, cfg.round, 0})
+ if cfg.requirement then
+ for _, condition in ipairs(cfg.requirement) do
+ table.insert(self.cacheChaperCondition[id], GFunc.getTable(condition))
+ end
+ end
+ end
+
+ return self.cacheChaperCondition[id]
+end
+
+function DungeonRuneEntity:getConditionIcon(taskInfo)
+ local iconSprite
+ local iconConst = GConst.DungeonRuneConst.TASK_ICON[taskInfo[1]]
+ if type(iconConst) == "table" then
+ iconSprite = iconConst[taskInfo[2]]
+ else
+ iconSprite = iconConst
+ end
+
+ return GConst.ATLAS_PATH.UI_DUNGEON_RUNE, iconSprite
+end
+
+function DungeonRuneEntity:getConditionDesc(taskInfo)
+ local taskType = taskInfo[1]
+ local taskParams1 = taskInfo[2]
+ local taskParams2 = taskInfo[3]
+ if taskType == TASK_TYPE.PASS_ROUND then
+ return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_QUEST_1, taskParams1)
+ elseif taskType == TASK_TYPE.ELIMINATION_ELEMENT then
+ local desc = ModuleManager.HeroManager:getMatchTypeName(taskParams1, true)
+ return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_QUEST_2, taskParams2, desc)
+ elseif taskType == TASK_TYPE.BREAK_GRID_TYPE then
+ return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_QUEST_3, taskParams2)
+ elseif taskType == TASK_TYPE.KILL_MONSTER then
+ return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_QUEST_4, taskParams2)
+ end
+end
+
+function DungeonRuneEntity:getChapterMonsterSpine(id)
+ local cfg = self:getConfig(id)
+ local monsterId = cfg.monster[1]
+ local info = ConfigManager:getConfig("monster")[monsterId]
+ return info.model_id, info.model_ui
+end
+
+function DungeonRuneEntity:getChapterMonsterI18N(id)
+ local cfg = self:getConfig(id)
+ local monsterId = cfg.monster[1]
+ local info = ConfigManager:getConfig("monster")[monsterId]
+ local monsterBase = info.monster_base
+ return I18N:getConfig("monster_base")[monsterBase]
+end
+
+function DungeonRuneEntity:getCurFightChapterId()
+ return self.curFightChapterId or 1
+end
+
+function DungeonRuneEntity:setCurFightChapterId(chapterId)
+ self.curFightChapterId = chapterId
+end
+
+function DungeonRuneEntity:getChapterFightCount(id)
+ return self.fightCountMap[id] or 0
+end
+
+function DungeonRuneEntity:getSliverWingBuyCount()
+ return self.buySilverCount or 0
+end
+
+function DungeonRuneEntity:addSliverWingBuyCount(count)
+ self.buySilverCount = self.buySilverCount + count
+end
+
+function DungeonRuneEntity:getRemainSliverWingCount()
+ if not self.todayLimitSliverCount then
+ self.todayLimitSliverCount = GFunc.getConstIntValue("dungeon_rune_buylimit")
+ end
+ local count = self.todayLimitSliverCount - self:getSliverWingBuyCount()
+ if count <= 0 then
+ count = 0
+ end
+ return count
+end
+
+function DungeonRuneEntity:getBuySliverCost()
+ if not self.todayBuySliverCost then
+ self.todayBuySliverCost = GFunc.getConstReward("dungeon_rune_cost")
+ end
+
+ return self.todayBuySliverCost
+end
+
+return DungeonRuneEntity
\ No newline at end of file
diff --git a/lua/app/userdata/dungeon/dungeon_rune_entity.lua.meta b/lua/app/userdata/dungeon/dungeon_rune_entity.lua.meta
new file mode 100644
index 00000000..4c1bbac3
--- /dev/null
+++ b/lua/app/userdata/dungeon/dungeon_rune_entity.lua.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: b4d7cf896fcc1cd4dbe9ac46426cc9f8
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
diff --git a/lua/app/userdata/dungeon/dungeon_weapon_entity.lua b/lua/app/userdata/dungeon/dungeon_weapon_entity.lua
index 4db7637e..9e77c742 100644
--- a/lua/app/userdata/dungeon/dungeon_weapon_entity.lua
+++ b/lua/app/userdata/dungeon/dungeon_weapon_entity.lua
@@ -182,7 +182,7 @@ function DungeonWeaponEntity:doCachePassInfo(chapterId, info)
self:setDirty()
end
-function DungeonBaseEntity:getCachePassInfo(chapterId)
+function DungeonWeaponEntity:getCachePassInfo(chapterId)
if not self.cachePassInfo then
self.cachePassInfo = {}
end
diff --git a/lua/app/userdata/formation/formation_data.lua b/lua/app/userdata/formation/formation_data.lua
index 6628b3d7..37cb1a49 100644
--- a/lua/app/userdata/formation/formation_data.lua
+++ b/lua/app/userdata/formation/formation_data.lua
@@ -127,6 +127,15 @@ function FormationData:getBossRushFormation()
return formation
end
+function FormationData:getDungeonRuneFormation()
+ local formation = self:getFormation(GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE)
+ if table.nums(formation) <= 0 then
+ self:setFormation(GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE, self:getFormation(GConst.BattleConst.FORMATION_TYPE.STAGE)) -- 如果没有,则用默认关卡
+ formation = self:getFormation(GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE)
+ end
+ return formation
+end
+
function FormationData:getFormation(formationType)
local formation = self.formations[formationType]
if formation == nil then