装备副本
This commit is contained in:
parent
000bc5e926
commit
2ffd6e88ba
@ -122,6 +122,9 @@ BIReport.ITEM_GET_TYPE = {
|
|||||||
ARENA_SETTLEMENT = "ArenaSettlement",
|
ARENA_SETTLEMENT = "ArenaSettlement",
|
||||||
ARENA_GIFT = "ArenaGift",
|
ARENA_GIFT = "ArenaGift",
|
||||||
COLLECTION_HERO_REWARD = "CollectionHeroReward",
|
COLLECTION_HERO_REWARD = "CollectionHeroReward",
|
||||||
|
DUNGEON_WEAPON_CHALLENGE = "DungeonWeaponChallenge",
|
||||||
|
DUNGEON_WEAPON_END = "DungeonWeaponEnd",
|
||||||
|
DUNGEON_WEAPON_SWEEP = "DungeonWeaponSweep",
|
||||||
}
|
}
|
||||||
|
|
||||||
BIReport.ADS_CLICK_TYPE = {
|
BIReport.ADS_CLICK_TYPE = {
|
||||||
@ -167,6 +170,8 @@ BIReport.BATTLE_TYPE = {
|
|||||||
["3"] = "DungeonGold",
|
["3"] = "DungeonGold",
|
||||||
["4"] = "DungeonShards",
|
["4"] = "DungeonShards",
|
||||||
["5"] = "Arena",
|
["5"] = "Arena",
|
||||||
|
["6"] = "DungeonWeapon",
|
||||||
|
["7"] = "DungeonArmor",
|
||||||
}
|
}
|
||||||
|
|
||||||
BIReport.GIFT_TYPE = {
|
BIReport.GIFT_TYPE = {
|
||||||
|
|||||||
@ -133,11 +133,11 @@ function DataManager:initWithServerData(data)
|
|||||||
self.DailyChallengeData:init(data.chapter_daily_challenge)
|
self.DailyChallengeData:init(data.chapter_daily_challenge)
|
||||||
self.DungeonData:initDungeonGold(data.chapter_gold_challenge)
|
self.DungeonData:initDungeonGold(data.chapter_gold_challenge)
|
||||||
self.DungeonData:initDungeonShards(data.chapter_shards_challenge)
|
self.DungeonData:initDungeonShards(data.chapter_shards_challenge)
|
||||||
self.DungeonData:initDungeonWeapon(data.chapter_weapon_challenge)
|
|
||||||
self.DungeonData:initDungeonArmor(data.chapter_armor_challenge)
|
|
||||||
self.HeroData:init(data.bag.heroes)
|
self.HeroData:init(data.bag.heroes)
|
||||||
self.BagData:init(data.bag)
|
self.BagData:init(data.bag)
|
||||||
self.FormationData:init(data.fight_info)
|
self.FormationData:init(data.fight_info)
|
||||||
|
self.DungeonData:initDungeonWeapon(data.chapter_weapon_challenge)
|
||||||
|
self.DungeonData:initDungeonArmor(data.chapter_armor_challenge)
|
||||||
self.CollectionData:init(data.collection)
|
self.CollectionData:init(data.collection)
|
||||||
self.TutorialData:init(data.guide)
|
self.TutorialData:init(data.guide)
|
||||||
self.MailData:init(data.mail_info)
|
self.MailData:init(data.mail_info)
|
||||||
|
|||||||
@ -8,11 +8,7 @@ local chapter_dungeon_equip = {
|
|||||||
1
|
1
|
||||||
},
|
},
|
||||||
["monster"]={
|
["monster"]={
|
||||||
106,
|
101,
|
||||||
206,
|
|
||||||
306,
|
|
||||||
406,
|
|
||||||
506
|
|
||||||
},
|
},
|
||||||
["first_reward"]={
|
["first_reward"]={
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
@ -101,11 +97,7 @@ local chapter_dungeon_equip = {
|
|||||||
2
|
2
|
||||||
},
|
},
|
||||||
["monster"]={
|
["monster"]={
|
||||||
606,
|
101,
|
||||||
706,
|
|
||||||
806,
|
|
||||||
906,
|
|
||||||
1006
|
|
||||||
},
|
},
|
||||||
["first_reward"]={
|
["first_reward"]={
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
@ -194,11 +186,7 @@ local chapter_dungeon_equip = {
|
|||||||
3
|
3
|
||||||
},
|
},
|
||||||
["monster"]={
|
["monster"]={
|
||||||
1106,
|
101
|
||||||
1206,
|
|
||||||
1306,
|
|
||||||
1406,
|
|
||||||
1506
|
|
||||||
},
|
},
|
||||||
["first_reward"]={
|
["first_reward"]={
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
@ -287,11 +275,7 @@ local chapter_dungeon_equip = {
|
|||||||
4
|
4
|
||||||
},
|
},
|
||||||
["monster"]={
|
["monster"]={
|
||||||
1606,
|
101
|
||||||
1706,
|
|
||||||
1806,
|
|
||||||
1906,
|
|
||||||
2006
|
|
||||||
},
|
},
|
||||||
["first_reward"]={
|
["first_reward"]={
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
local LocalizationGlobalConst =
|
local LocalizationGlobalConst =
|
||||||
{
|
{
|
||||||
["DUNGEON_WEAPON_DESC_12"] = "DUNGEON_WEAPON_DESC_12",
|
|
||||||
["DUNGEON_WEAPON_DESC_13"] = "DUNGEON_WEAPON_DESC_13",
|
|
||||||
["DUNGEON_WEAPON_DESC_14"] = "DUNGEON_WEAPON_DESC_14",
|
|
||||||
MAIN_BTN_1 = "MAIN_BTN_1",
|
MAIN_BTN_1 = "MAIN_BTN_1",
|
||||||
QLT_DESC_1 = "QLT_DESC_1",
|
QLT_DESC_1 = "QLT_DESC_1",
|
||||||
QLT_DESC_2 = "QLT_DESC_2",
|
QLT_DESC_2 = "QLT_DESC_2",
|
||||||
@ -394,6 +391,11 @@ local LocalizationGlobalConst =
|
|||||||
ATTR_NORMAL_HURTP = "ATTR_NORMAL_HURTP",
|
ATTR_NORMAL_HURTP = "ATTR_NORMAL_HURTP",
|
||||||
ATTR_SKILL_HURTP = "ATTR_SKILL_HURTP",
|
ATTR_SKILL_HURTP = "ATTR_SKILL_HURTP",
|
||||||
ATTR_CURED = "ATTR_CURED",
|
ATTR_CURED = "ATTR_CURED",
|
||||||
|
DUNGEON_WEAPON_DESC_12 = "DUNGEON_WEAPON_DESC_12",
|
||||||
|
DUNGEON_WEAPON_DESC_13 = "DUNGEON_WEAPON_DESC_13",
|
||||||
|
DUNGEON_WEAPON_DESC_14 = "DUNGEON_WEAPON_DESC_14",
|
||||||
|
MOP_UP_DESC_1 = "MOP_UP_DESC_1",
|
||||||
|
MOP_UP_DESC_2 = "MOP_UP_DESC_2",
|
||||||
}
|
}
|
||||||
|
|
||||||
return LocalizationGlobalConst
|
return LocalizationGlobalConst
|
||||||
@ -520,27 +520,27 @@ local monster_base = {
|
|||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20039]={
|
[20039]={
|
||||||
["model_id"]="m20034",
|
["model_id"]="m20039",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20040]={
|
[20040]={
|
||||||
["model_id"]="m20035",
|
["model_id"]="m20040",
|
||||||
["body"]=1,
|
|
||||||
["model_ui"]=1.0
|
|
||||||
},
|
|
||||||
[20041]={
|
|
||||||
["model_id"]="m20036",
|
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20042]={
|
[20042]={
|
||||||
["model_id"]="m20037",
|
["model_id"]="m20042",
|
||||||
|
["body"]=1,
|
||||||
|
["model_ui"]=1.0
|
||||||
|
},
|
||||||
|
[20041]={
|
||||||
|
["model_id"]="m20041",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20043]={
|
[20043]={
|
||||||
["model_id"]="m20038",
|
["model_id"]="m20043",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
|
|||||||
@ -48,7 +48,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[506]={
|
[506]={
|
||||||
["monster_base"]=20043,
|
["monster_base"]=20041,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -117,7 +117,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[1006]={
|
[1006]={
|
||||||
["monster_base"]=20039,
|
["monster_base"]=20040,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -128,7 +128,8 @@ local monster_dungeon_equip = {
|
|||||||
30116
|
30116
|
||||||
},
|
},
|
||||||
["skill"]={
|
["skill"]={
|
||||||
10085
|
10085,
|
||||||
|
10129
|
||||||
},
|
},
|
||||||
["passive_skill"]={
|
["passive_skill"]={
|
||||||
10008
|
10008
|
||||||
@ -184,7 +185,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[1506]={
|
[1506]={
|
||||||
["monster_base"]=20040,
|
["monster_base"]=20039,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -252,7 +253,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[2006]={
|
[2006]={
|
||||||
["monster_base"]=20041,
|
["monster_base"]=20043,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -389,7 +390,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[3006]={
|
[3006]={
|
||||||
["monster_base"]=20043,
|
["monster_base"]=20041,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -458,7 +459,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[3506]={
|
[3506]={
|
||||||
["monster_base"]=20039,
|
["monster_base"]=20040,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -469,7 +470,8 @@ local monster_dungeon_equip = {
|
|||||||
30131
|
30131
|
||||||
},
|
},
|
||||||
["skill"]={
|
["skill"]={
|
||||||
10096
|
10096,
|
||||||
|
10129
|
||||||
},
|
},
|
||||||
["passive_skill"]={
|
["passive_skill"]={
|
||||||
10008
|
10008
|
||||||
@ -525,7 +527,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[4006]={
|
[4006]={
|
||||||
["monster_base"]=20040,
|
["monster_base"]=20039,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -593,7 +595,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[4506]={
|
[4506]={
|
||||||
["monster_base"]=20041,
|
["monster_base"]=20043,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -730,7 +732,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[5506]={
|
[5506]={
|
||||||
["monster_base"]=20043,
|
["monster_base"]=20041,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -799,7 +801,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[6006]={
|
[6006]={
|
||||||
["monster_base"]=20039,
|
["monster_base"]=20040,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -810,7 +812,8 @@ local monster_dungeon_equip = {
|
|||||||
30137
|
30137
|
||||||
},
|
},
|
||||||
["skill"]={
|
["skill"]={
|
||||||
10107
|
10107,
|
||||||
|
10129
|
||||||
},
|
},
|
||||||
["passive_skill"]={
|
["passive_skill"]={
|
||||||
10008
|
10008
|
||||||
@ -866,7 +869,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[6506]={
|
[6506]={
|
||||||
["monster_base"]=20040,
|
["monster_base"]=20039,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -934,7 +937,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[7006]={
|
[7006]={
|
||||||
["monster_base"]=20041,
|
["monster_base"]=20043,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -1071,7 +1074,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[8006]={
|
[8006]={
|
||||||
["monster_base"]=20043,
|
["monster_base"]=20041,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -1140,7 +1143,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[8506]={
|
[8506]={
|
||||||
["monster_base"]=20039,
|
["monster_base"]=20040,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -1151,7 +1154,8 @@ local monster_dungeon_equip = {
|
|||||||
30143
|
30143
|
||||||
},
|
},
|
||||||
["skill"]={
|
["skill"]={
|
||||||
10118
|
10118,
|
||||||
|
10129
|
||||||
},
|
},
|
||||||
["passive_skill"]={
|
["passive_skill"]={
|
||||||
10008
|
10008
|
||||||
@ -1207,7 +1211,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[9006]={
|
[9006]={
|
||||||
["monster_base"]=20040,
|
["monster_base"]=20039,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
@ -1275,7 +1279,7 @@ local monster_dungeon_equip = {
|
|||||||
["monster_exp"]=23000
|
["monster_exp"]=23000
|
||||||
},
|
},
|
||||||
[9506]={
|
[9506]={
|
||||||
["monster_base"]=20041,
|
["monster_base"]=20043,
|
||||||
["is_boss"]=2,
|
["is_boss"]=2,
|
||||||
["hp"]=240000000,
|
["hp"]=240000000,
|
||||||
["atk"]=1590000,
|
["atk"]=1590000,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,83 +1,83 @@
|
|||||||
local chapter_dungeon_equip = {
|
local chapter_dungeon_equip = {
|
||||||
[1]={
|
[1]={
|
||||||
["name"]="邪眸灯灵(第1层)",
|
["name"]="邪眸灯灵(第1层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他会使用邪眸制造<color=#ffde35>意念护盾</color>,护盾存在时他将是无敌的。"
|
||||||
},
|
},
|
||||||
[2]={
|
[2]={
|
||||||
["name"]="诅咒灯灵(第2层)",
|
["name"]="诅咒灯灵(第2层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他是一位古代有名的厨师,原本喜欢用美食帮助他人帮助他人,由于爱人的死去让他执着于找寻神灯而被神灯封印。他的美食也变成了<color=#ffde35>邪恶的诅咒</color>。"
|
||||||
},
|
},
|
||||||
[3]={
|
[3]={
|
||||||
["name"]="黄金灯灵(第3层)",
|
["name"]="黄金灯灵(第3层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他是来自远古的战士,由于探索了黄金财宝而被留在了黄金神灯之中。每一次战斗对他来说都在学习和强化自己,他的<color=#ffde35>攻击只会越来越强</color>。"
|
||||||
},
|
},
|
||||||
[4]={
|
[4]={
|
||||||
["name"]="古神灯灵(第4层)",
|
["name"]="古医灯灵(第4层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他本有一颗医者之心,为了治疗朋友的不治之症将自己的灵魂出卖给了邪神,残留的意识存在这神灯之中。他的医术能够让自己<color=#ffde35>不断恢复生命</color>。"
|
||||||
},
|
},
|
||||||
[5]={
|
[5]={
|
||||||
["name"]="霜峰灯灵(第5层)",
|
["name"]="霜峰灯灵(第5层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他本是冰雪山峰的部落首领,带领部落人民翻越雪山时遇上了雪崩,不甘的心他成为了霜峰灯灵。在懊悔的岁月里他领悟了<color=#ffde35>冰霜的奥秘</color>。"
|
||||||
},
|
},
|
||||||
[6]={
|
[6]={
|
||||||
["name"]="邪眸灯灵(第6层)",
|
["name"]="邪眸灯灵(第6层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他会使用邪眸制造<color=#ffde35>意念护盾</color>,护盾存在时他将是无敌的。"
|
||||||
},
|
},
|
||||||
[7]={
|
[7]={
|
||||||
["name"]="诅咒灯灵(第7层)",
|
["name"]="诅咒灯灵(第7层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他是一位古代有名的厨师,原本喜欢用美食帮助他人帮助他人,由于爱人的死去让他执着于找寻神灯而被神灯封印。他的美食也变成了<color=#ffde35>邪恶的诅咒</color>。"
|
||||||
},
|
},
|
||||||
[8]={
|
[8]={
|
||||||
["name"]="黄金灯灵(第8层)",
|
["name"]="黄金灯灵(第8层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他是来自远古的战士,由于探索了黄金财宝而被留在了黄金神灯之中。每一次战斗对他来说都在学习和强化自己,他的<color=#ffde35>攻击只会越来越强</color>。"
|
||||||
},
|
},
|
||||||
[9]={
|
[9]={
|
||||||
["name"]="古神灯灵(第9层)",
|
["name"]="古医灯灵(第9层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他本有一颗医者之心,为了治疗朋友的不治之症将自己的灵魂出卖给了邪神,残留的意识存在这神灯之中。他的医术能够让自己<color=#ffde35>不断恢复生命</color>。"
|
||||||
},
|
},
|
||||||
[10]={
|
[10]={
|
||||||
["name"]="霜峰灯灵(第10层)",
|
["name"]="霜峰灯灵(第10层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他本是冰雪山峰的部落首领,带领部落人民翻越雪山时遇上了雪崩,不甘的心他成为了霜峰灯灵。在懊悔的岁月里他领悟了<color=#ffde35>冰霜的奥秘</color>。"
|
||||||
},
|
},
|
||||||
[11]={
|
[11]={
|
||||||
["name"]="邪眸灯灵(第11层)",
|
["name"]="邪眸灯灵(第11层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他会使用邪眸制造<color=#ffde35>意念护盾</color>,护盾存在时他将是无敌的。"
|
||||||
},
|
},
|
||||||
[12]={
|
[12]={
|
||||||
["name"]="诅咒灯灵(第12层)",
|
["name"]="诅咒灯灵(第12层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他是一位古代有名的厨师,原本喜欢用美食帮助他人帮助他人,由于爱人的死去让他执着于找寻神灯而被神灯封印。他的美食也变成了<color=#ffde35>邪恶的诅咒</color>。"
|
||||||
},
|
},
|
||||||
[13]={
|
[13]={
|
||||||
["name"]="黄金灯灵(第13层)",
|
["name"]="黄金灯灵(第13层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他是来自远古的战士,由于探索了黄金财宝而被留在了黄金神灯之中。每一次战斗对他来说都在学习和强化自己,他的<color=#ffde35>攻击只会越来越强</color>。"
|
||||||
},
|
},
|
||||||
[14]={
|
[14]={
|
||||||
["name"]="古神灯灵(第14层)",
|
["name"]="古医灯灵(第14层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他本有一颗医者之心,为了治疗朋友的不治之症将自己的灵魂出卖给了邪神,残留的意识存在这神灯之中。他的医术能够让自己<color=#ffde35>不断恢复生命</color>。"
|
||||||
},
|
},
|
||||||
[15]={
|
[15]={
|
||||||
["name"]="霜峰灯灵(第15层)",
|
["name"]="霜峰灯灵(第15层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他本是冰雪山峰的部落首领,带领部落人民翻越雪山时遇上了雪崩,不甘的心他成为了霜峰灯灵。在懊悔的岁月里他领悟了<color=#ffde35>冰霜的奥秘</color>。"
|
||||||
},
|
},
|
||||||
[16]={
|
[16]={
|
||||||
["name"]="邪眸灯灵(第16层)",
|
["name"]="邪眸灯灵(第16层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他会使用邪眸制造<color=#ffde35>意念护盾</color>,护盾存在时他将是无敌的。"
|
||||||
},
|
},
|
||||||
[17]={
|
[17]={
|
||||||
["name"]="诅咒灯灵(第17层)",
|
["name"]="诅咒灯灵(第17层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他是一位古代有名的厨师,原本喜欢用美食帮助他人帮助他人,由于爱人的死去让他执着于找寻神灯而被神灯封印。他的美食也变成了<color=#ffde35>邪恶的诅咒</color>。"
|
||||||
},
|
},
|
||||||
[18]={
|
[18]={
|
||||||
["name"]="黄金灯灵(第18层)",
|
["name"]="黄金灯灵(第18层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他是来自远古的战士,由于探索了黄金财宝而被留在了黄金神灯之中。每一次战斗对他来说都在学习和强化自己,他的<color=#ffde35>攻击只会越来越强</color>。"
|
||||||
},
|
},
|
||||||
[19]={
|
[19]={
|
||||||
["name"]="古神灯灵(第19层)",
|
["name"]="古医灯灵(第19层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他本有一颗医者之心,为了治疗朋友的不治之症将自己的灵魂出卖给了邪神,残留的意识存在这神灯之中。他的医术能够让自己<color=#ffde35>不断恢复生命</color>。"
|
||||||
},
|
},
|
||||||
[20]={
|
[20]={
|
||||||
["name"]="霜峰灯灵(第20层)",
|
["name"]="霜峰灯灵(第20层)",
|
||||||
["desc"]="他掌控着拥有魔法能量的邪眸,被远古勇士囚禁在神灯之中。他使用邪眸制造意念护盾,护盾存在时将不受到伤害,每次命中将降低护盾层数,层数为0时护盾消失。"
|
["desc"]="他本是冰雪山峰的部落首领,带领部落人民翻越雪山时遇上了雪崩,不甘的心他成为了霜峰灯灵。在懊悔的岁月里他领悟了<color=#ffde35>冰霜的奥秘</color>。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -391,11 +391,13 @@ local localization_global =
|
|||||||
["ATTR_NORMAL_HURTP"] = "普攻增伤%",
|
["ATTR_NORMAL_HURTP"] = "普攻增伤%",
|
||||||
["ATTR_SKILL_HURTP"] = "技能增伤%",
|
["ATTR_SKILL_HURTP"] = "技能增伤%",
|
||||||
["ATTR_CURED"] = "治疗效果提升%",
|
["ATTR_CURED"] = "治疗效果提升%",
|
||||||
|
|
||||||
|
|
||||||
["DUNGEON_WEAPON_DESC_12"] = "最近没有通关",
|
["DUNGEON_WEAPON_DESC_12"] = "最近没有通关",
|
||||||
["DUNGEON_WEAPON_DESC_13"] = "今日扫荡次数已用完",
|
["DUNGEON_WEAPON_DESC_13"] = "今日扫荡次数已用完",
|
||||||
["DUNGEON_WEAPON_DESC_14"] = "查看",
|
["DUNGEON_WEAPON_DESC_14"] = "查看",
|
||||||
|
["MOP_UP_DESC_1"] = "扫荡完成",
|
||||||
|
["MOP_UP_DESC_2"] = "再次扫荡",
|
||||||
|
|
||||||
|
["DUNGEON_WEAPON_DESC_15"] = "最强灯神阵容",
|
||||||
}
|
}
|
||||||
|
|
||||||
return localization_global
|
return localization_global
|
||||||
@ -86,6 +86,8 @@ BattleConst.BATTLE_TYPE = {
|
|||||||
DUNGEON_GOLD = "3",
|
DUNGEON_GOLD = "3",
|
||||||
DUNGEON_SHARDS = "4",
|
DUNGEON_SHARDS = "4",
|
||||||
ARENA = "5",
|
ARENA = "5",
|
||||||
|
DUNGEON_WEAPON = "6",
|
||||||
|
DUNGEON_ARMOR = "7",
|
||||||
}
|
}
|
||||||
|
|
||||||
BattleConst.IS_PVP_BATTLE = {
|
BattleConst.IS_PVP_BATTLE = {
|
||||||
|
|||||||
@ -11,7 +11,9 @@ local BATTLE_CONTROLLER = {
|
|||||||
[BattleConst.BATTLE_TYPE.DAILY_CHALLENGE] = "app/module/battle/controller/battle_controller_daily_challenge",
|
[BattleConst.BATTLE_TYPE.DAILY_CHALLENGE] = "app/module/battle/controller/battle_controller_daily_challenge",
|
||||||
[BattleConst.BATTLE_TYPE.DUNGEON_GOLD] = "app/module/battle/controller/battle_controller_dungeon_gold",
|
[BattleConst.BATTLE_TYPE.DUNGEON_GOLD] = "app/module/battle/controller/battle_controller_dungeon_gold",
|
||||||
[BattleConst.BATTLE_TYPE.DUNGEON_SHARDS] = "app/module/battle/controller/battle_controller_dungeon_shards",
|
[BattleConst.BATTLE_TYPE.DUNGEON_SHARDS] = "app/module/battle/controller/battle_controller_dungeon_shards",
|
||||||
[BattleConst.BATTLE_TYPE.ARENA] = "app/module/battle/controller/battle_controller_arena"
|
[BattleConst.BATTLE_TYPE.ARENA] = "app/module/battle/controller/battle_controller_arena",
|
||||||
|
[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",
|
||||||
}
|
}
|
||||||
|
|
||||||
function BattleManager:showPauseUI(battleType, battleController)
|
function BattleManager:showPauseUI(battleType, battleController)
|
||||||
@ -22,7 +24,7 @@ function BattleManager:showPauseUI(battleType, battleController)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleManager:showBattleResultUI(battleType, rewards, combatReport, mysteryBoxIdx)
|
function BattleManager:showBattleResultUI(battleType, rewards, combatReport, mysteryBoxIdx, firstPassIdx, noMergeReward)
|
||||||
UIManager:showUI("app/ui/battle/battle_result_ui", {
|
UIManager:showUI("app/ui/battle/battle_result_ui", {
|
||||||
battleType = battleType,
|
battleType = battleType,
|
||||||
isWin = combatReport.victory,
|
isWin = combatReport.victory,
|
||||||
@ -30,7 +32,9 @@ function BattleManager:showBattleResultUI(battleType, rewards, combatReport, mys
|
|||||||
atkReport = combatReport.atkReport,
|
atkReport = combatReport.atkReport,
|
||||||
wave = combatReport.wave,
|
wave = combatReport.wave,
|
||||||
mysteryBoxIdx = mysteryBoxIdx or 0,
|
mysteryBoxIdx = mysteryBoxIdx or 0,
|
||||||
|
firstPassIdx = firstPassIdx or 0,
|
||||||
remainRound = combatReport.remainRound or 0,
|
remainRound = combatReport.remainRound or 0,
|
||||||
|
noMergeReward = noMergeReward,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,77 @@
|
|||||||
|
local BattleController = require "app/module/battle/controller/battle_controller"
|
||||||
|
local BattleControllerDungeonWeapon = class("BattleControllerDungeonWeapon", BattleController)
|
||||||
|
|
||||||
|
function BattleControllerDungeonWeapon:getBoardConfig()
|
||||||
|
return ConfigManager:getConfig("chapter_board_dungeon_equip")
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleControllerDungeonWeapon:getChapterConfig()
|
||||||
|
return ConfigManager:getConfig("chapter_dungeon_equip")
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleControllerDungeonWeapon:getChapterId()
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
return weaponData:getCurFightChapterId()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleControllerDungeonWeapon:controllBattleEnd()
|
||||||
|
self.combatReport = {
|
||||||
|
battleType = GConst.BattleConst.BATTLE_TYPE.DUNGEON_WEAPON,
|
||||||
|
wave = self.waveIndex,
|
||||||
|
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.DungeonWeaponManager:reqEndChallenge(self.chapterId, self.combatReport, self.taskProgress)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleControllerDungeonWeapon: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 weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
local startTimes = weaponData:getChapterFightCount(self.chapterId)
|
||||||
|
local isFirstWin = false
|
||||||
|
if weaponData:getPassedMaxId() < self.chapterId and self.victory then
|
||||||
|
isFirstWin = true
|
||||||
|
end
|
||||||
|
|
||||||
|
local isFianlStep = self.waveIndex >= self.maxWaveIndex
|
||||||
|
|
||||||
|
BIReport:postFightEnd(GConst.BattleConst.BATTLE_TYPE.DUNGEON_WEAPON, self.battleData, self.chapterId, self.waveIndex, duration, totalTime, self.eliminateCount, self.eliminateTotalCount, waveEndType, deathType, startTimes, isFirstWin, isFianlStep, self.maxLinkCount)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleControllerDungeonWeapon:postFightStart()
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
local startTimes = weaponData:getChapterFightCount(self.chapterId)
|
||||||
|
local unlockMaxChapter = weaponData:getPassedMaxId() + 1
|
||||||
|
BIReport:postFightBegin(GConst.BattleConst.BATTLE_TYPE.DUNGEON_WEAPON, self.waveIndex, self.chapterId, unlockMaxChapter, startTimes)
|
||||||
|
end
|
||||||
|
|
||||||
|
return BattleControllerDungeonWeapon
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c4928c1be06af084082b9ea721afed69
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||||
8
lua/app/module/common.meta
Normal file
8
lua/app/module/common.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 17207e19052e6f542b794c7243f97a02
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -15,4 +15,11 @@ function CommonManager:showMopUpUI(rewards, remainCount, callback, customtitleTx
|
|||||||
UIManager:showUI("app/ui/common/mop_up_ui", params)
|
UIManager:showUI("app/ui/common/mop_up_ui", params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function CommonManager:showFormationUI(formationType)
|
||||||
|
local params = {
|
||||||
|
formationType = formationType
|
||||||
|
}
|
||||||
|
UIManager:showUI("app/ui/common/common_formation_ui", params)
|
||||||
|
end
|
||||||
|
|
||||||
return CommonManager
|
return CommonManager
|
||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 67801c6593529c84d8b2f218d5c629a6
|
guid: f232addf6c4152a42ab0c464183a206f
|
||||||
ScriptedImporter:
|
ScriptedImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@ -5,7 +5,141 @@ function DungeonWeaponManager:showMainUI()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DungeonWeaponManager:showIntroductionUI(chapterId)
|
function DungeonWeaponManager:showIntroductionUI(chapterId)
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
local passInfo = weaponData:getCachePassInfo(chapterId)
|
||||||
|
if not passInfo then
|
||||||
|
self:reqPassInfo(chapterId)
|
||||||
|
end
|
||||||
UIManager:showUI("app/ui/dungeon_weapon/dungeon_weapon_introduction_ui", {chapterId = chapterId})
|
UIManager:showUI("app/ui/dungeon_weapon/dungeon_weapon_introduction_ui", {chapterId = chapterId})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponManager:reqFight(chapterId)
|
||||||
|
if not DataManager.FormationData:formationIsFull(GConst.BattleConst.FORMATION_TYPE.DUNGEON_WEAPON) then
|
||||||
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_8))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
if not weaponData:canFightChapter(chapterId) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local heroes = {}
|
||||||
|
local formation = DataManager.FormationData:getDungeonWeaponFormation()
|
||||||
|
for matchType, heroId in pairs(formation) do
|
||||||
|
if heroId > 0 then
|
||||||
|
table.insert(heroes, heroId)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local parmas = {chapter_weapon_id = chapterId, heroes = heroes}
|
||||||
|
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterWeaponChallengeStartReq, parmas, {}, self.rsqFight, BIReport.ITEM_GET_TYPE.DUNGEON_WEAPON_CHALLENGE)
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponManager:rsqFight(result)
|
||||||
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
weaponData:setCurFightChapterId(result.reqData.chapter_weapon_id)
|
||||||
|
local params = {
|
||||||
|
atkFormation = {}
|
||||||
|
}
|
||||||
|
local formation = DataManager.FormationData:getDungeonWeaponFormation()
|
||||||
|
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_WEAPON, params, function()
|
||||||
|
self:showMainUI()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponManager:reqEndChallenge(chapterId, combatReport, taskProgress)
|
||||||
|
local parmas = {
|
||||||
|
chapter_weapon_id = chapterId,
|
||||||
|
win = combatReport.victory,
|
||||||
|
task_stat = taskProgress,
|
||||||
|
combatReport = combatReport,
|
||||||
|
}
|
||||||
|
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterWeaponChallengeSettlementReq, parmas, {}, self.rsqEndChallenge, BIReport.ITEM_GET_TYPE.DUNGEON_WEAPON_END)
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponManager:rsqEndChallenge(result)
|
||||||
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
weaponData:refreshInfoOnSettlement(result.reqData.chapter_weapon_id, result)
|
||||||
|
|
||||||
|
local firstRewardsIdx = #result.first_rewards
|
||||||
|
local rewardCount = #result.rewards
|
||||||
|
if firstRewardsIdx > rewardCount then
|
||||||
|
firstRewardsIdx = rewardCount
|
||||||
|
end
|
||||||
|
local rewards = {}
|
||||||
|
for i = firstRewardsIdx + 1, rewardCount do
|
||||||
|
table.insert(rewards, result.rewards[i])
|
||||||
|
end
|
||||||
|
local newRewards = {}
|
||||||
|
GFunc.mergeRewards2(rewards, newRewards)
|
||||||
|
local resultRewards = {}
|
||||||
|
for i = 1, firstRewardsIdx do
|
||||||
|
table.insert(resultRewards, result.rewards[i])
|
||||||
|
end
|
||||||
|
for _, reward in ipairs(newRewards) do
|
||||||
|
table.insert(resultRewards, reward)
|
||||||
|
end
|
||||||
|
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.DUNGEON_WEAPON, resultRewards, result.reqData.combatReport, nil, firstRewardsIdx, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 请求扫荡副本
|
||||||
|
function DungeonWeaponManager:reqSweep(chapterId)
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
|
||||||
|
-- 判断次数
|
||||||
|
if weaponData:getRemianFarmCount() <= 0 then
|
||||||
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_13))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not weaponData:canFarmChapter(chapterId) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local parmas = {
|
||||||
|
chapter_weapon_id = chapterId,
|
||||||
|
}
|
||||||
|
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterWeaponChallengeFarmReq, parmas, {}, self.respSweep, BIReport.ITEM_GET_TYPE.DUNGEON_WEAPON_SWEEP)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 响应扫荡副本
|
||||||
|
function DungeonWeaponManager:respSweep(result)
|
||||||
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
weaponData:refreshInfoOnFarm(result)
|
||||||
|
|
||||||
|
local remainCount = weaponData:getRemianFarmCount()
|
||||||
|
-- 合并奖励
|
||||||
|
local newRewards = {}
|
||||||
|
GFunc.mergeRewards2(result.rewards, newRewards)
|
||||||
|
ModuleManager.CommonManager:showMopUpUI(newRewards, remainCount, function()
|
||||||
|
self:reqSweep(result.reqData.chapter_weapon_id)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponManager:reqPassInfo(chapterId)
|
||||||
|
local parmas = {
|
||||||
|
chapter_weapon_id = chapterId,
|
||||||
|
}
|
||||||
|
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterWeaponLatestPlayerInfoReq, parmas, {}, self.rspPassInfo)
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponManager:rspPassInfo(result)
|
||||||
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
|
weaponData:doCachePassInfo(result.reqData.chapter_weapon_id, result.players)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return DungeonWeaponManager
|
return DungeonWeaponManager
|
||||||
@ -16,6 +16,9 @@ function BattleResultUI:ctor(params)
|
|||||||
self.battleType = params.battleType
|
self.battleType = params.battleType
|
||||||
self.isWin = params.isWin
|
self.isWin = params.isWin
|
||||||
self.rewards = params.rewards
|
self.rewards = params.rewards
|
||||||
|
self.firstPassIdx = params.firstPassIdx or 0
|
||||||
|
self.noMergeReward = params.noMergeReward
|
||||||
|
|
||||||
-- pve特有
|
-- pve特有
|
||||||
self.atkReport = params.atkReport
|
self.atkReport = params.atkReport
|
||||||
self.wave = params.wave
|
self.wave = params.wave
|
||||||
@ -35,14 +38,10 @@ function BattleResultUI:ctor(params)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 相同奖励合并
|
if not self.noMergeReward then
|
||||||
for idx, reward in pairs(self.rewards) do
|
local newRewards = {}
|
||||||
for i = #self.rewards, idx + 1, -1 do
|
GFunc.mergeRewards2(self.rewards, newRewards)
|
||||||
if i ~= idx and reward.item.id == self.rewards[i].item.id then
|
self.rewards = newRewards
|
||||||
reward.item.count = reward.item.count + self.rewards[i].item.count
|
|
||||||
table.remove(self.rewards, i)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -360,6 +359,7 @@ function BattleResultUI:refreshRewards()
|
|||||||
self.animRewards[index] = self:showRewardAppearAnim(index, cell)
|
self.animRewards[index] = self:showRewardAppearAnim(index, cell)
|
||||||
end
|
end
|
||||||
cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_1")
|
cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_1")
|
||||||
|
cell:showFirstPass(index <= self.firstPassIdx)
|
||||||
end)
|
end)
|
||||||
if self:hasArenaBoxNode() then
|
if self:hasArenaBoxNode() then
|
||||||
self.rewardScrollRect:setSizeDeltaY(SCROLL_LINE_HEIGHT)
|
self.rewardScrollRect:setSizeDeltaY(SCROLL_LINE_HEIGHT)
|
||||||
|
|||||||
56
lua/app/ui/common/common_formation_ui.lua
Normal file
56
lua/app/ui/common/common_formation_ui.lua
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
local CommonFormationUI = class("CommonFormationUI", BaseUI)
|
||||||
|
|
||||||
|
function CommonFormationUI:showCommonBG()
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function CommonFormationUI:getPrefabPath()
|
||||||
|
return "assets/prefabs/ui/common/common_formation_ui.prefab"
|
||||||
|
end
|
||||||
|
|
||||||
|
function CommonFormationUI:getCurrencyParams()
|
||||||
|
if self.currencyParams == nil then
|
||||||
|
self.currencyParams = {
|
||||||
|
itemIds = {
|
||||||
|
GConst.ItemConst.ITEM_ID_GEM,
|
||||||
|
},
|
||||||
|
showType = GConst.CURRENCY_TYPE.HORIZONTAL
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return self.currencyParams
|
||||||
|
end
|
||||||
|
|
||||||
|
function CommonFormationUI:ctor(params)
|
||||||
|
self.formationType = params.formationType
|
||||||
|
end
|
||||||
|
|
||||||
|
function CommonFormationUI:onLoadRootComplete()
|
||||||
|
local uiMap = self.root:genAllChildren()
|
||||||
|
|
||||||
|
uiMap["common_formation_ui.banner.btn_ok.tx_ok"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_24))
|
||||||
|
uiMap["common_formation_ui.banner.btn_ok"]:addClickListener(function()
|
||||||
|
self:closeUI()
|
||||||
|
end)
|
||||||
|
|
||||||
|
local heroUI = uiMap["common_formation_ui.hero_ui"]
|
||||||
|
heroUI:initPrefabHelper()
|
||||||
|
heroUI:genAllChildren()
|
||||||
|
self.heroComp = heroUI:addLuaComponent("app/ui/hero/hero_comp")
|
||||||
|
|
||||||
|
self:bind(DataManager.HeroData, "isDirty", function()
|
||||||
|
self:onRefresh()
|
||||||
|
end)
|
||||||
|
self:bind(DataManager.BagData.ItemData, "dirty", function()
|
||||||
|
self:onRefresh()
|
||||||
|
end)
|
||||||
|
self:addEventListener(EventManager.CUSTOM_EVENT.GO_SHOP, function()
|
||||||
|
self:closeUI()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function CommonFormationUI:onRefresh()
|
||||||
|
self.heroComp:refresh(self.formationType)
|
||||||
|
end
|
||||||
|
|
||||||
|
return CommonFormationUI
|
||||||
10
lua/app/ui/common/common_formation_ui.lua.meta
Normal file
10
lua/app/ui/common/common_formation_ui.lua.meta
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a827eeea98715174b8206cb56f3cb4f4
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||||
@ -53,14 +53,27 @@ function DungeonBoardCell:refreshInfo()
|
|||||||
|
|
||||||
self.txOpen:setAnchoredPositionY(-110)
|
self.txOpen:setAnchoredPositionY(-110)
|
||||||
self.txStart:setText(I18N:getGlobalText(I18N.GlobalConst.START_DESC))
|
self.txStart:setText(I18N:getGlobalText(I18N.GlobalConst.START_DESC))
|
||||||
local time = DataManager.DungeonData:getRemainTimes(self.moduleKey)
|
if self.moduleKey == ModuleManager.MODULE_KEY.DUNGEON_WEAPON then
|
||||||
local timeStr = nil
|
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
if time <= 0 then
|
local time = weaponData:getRemianFarmCount()
|
||||||
timeStr = "<color=#FF6464>" .. time .. "</color>"
|
local timeStr = nil
|
||||||
|
if time <= 0 then
|
||||||
|
timeStr = "<color=#FF6464>" .. time .. "</color>"
|
||||||
|
else
|
||||||
|
timeStr = time
|
||||||
|
end
|
||||||
|
self.txTimes:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_5, timeStr))
|
||||||
else
|
else
|
||||||
timeStr = time
|
local time = DataManager.DungeonData:getRemainTimes(self.moduleKey)
|
||||||
|
local timeStr = nil
|
||||||
|
if time <= 0 then
|
||||||
|
timeStr = "<color=#FF6464>" .. time .. "</color>"
|
||||||
|
else
|
||||||
|
timeStr = time
|
||||||
|
end
|
||||||
|
self.txTimes:setText(I18N:getGlobalText(I18N.GlobalConst.TODAY_REMAIN_TIMES, timeStr))
|
||||||
end
|
end
|
||||||
self.txTimes:setText(I18N:getGlobalText(I18N.GlobalConst.TODAY_REMAIN_TIMES, timeStr))
|
|
||||||
self:refreshCountdown(self.txCountdown)
|
self:refreshCountdown(self.txCountdown)
|
||||||
else
|
else
|
||||||
self.btnStart:setVisible(false)
|
self.btnStart:setVisible(false)
|
||||||
@ -71,15 +84,19 @@ function DungeonBoardCell:refreshInfo()
|
|||||||
self.lockTxLock:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_OPEN))
|
self.lockTxLock:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_OPEN))
|
||||||
self:refreshCountdown(self.lockTxCountdown)
|
self:refreshCountdown(self.lockTxCountdown)
|
||||||
end
|
end
|
||||||
self.txTimes:setVisible(not DataManager.DungeonData:isNoTotalLimit(self.moduleKey))
|
|
||||||
|
|
||||||
GFunc.centerImgAndTx(self.lockIcon, self.lockTxLock, 10)
|
GFunc.centerImgAndTx(self.lockIcon, self.lockTxLock, 10)
|
||||||
GFunc.centerImgAndTx(self.lockIconCountdown, self.lockTxCountdown, 10)
|
GFunc.centerImgAndTx(self.lockIconCountdown, self.lockTxCountdown, 10)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonBoardCell:refreshRewards()
|
function DungeonBoardCell:refreshRewards()
|
||||||
local id = DataManager.DungeonData:getBoardShowRewardId(self.moduleKey)
|
if self.moduleKey == ModuleManager.MODULE_KEY.DUNGEON_WEAPON then
|
||||||
self.itemReward:refreshItemById(id, 0)
|
self.itemReward:getBaseObject():setActive(false)
|
||||||
|
else
|
||||||
|
self.itemReward:getBaseObject():setActive(true)
|
||||||
|
local id = DataManager.DungeonData:getBoardShowRewardId(self.moduleKey)
|
||||||
|
self.itemReward:refreshItemById(id, 0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonBoardCell:refreshCountdown(txCountdown)
|
function DungeonBoardCell:refreshCountdown(txCountdown)
|
||||||
|
|||||||
@ -41,14 +41,12 @@ function ChapterLayerCell:refresh(id)
|
|||||||
|
|
||||||
fightBtn:setSprite(GConst.ATLAS_PATH.COMMON, FIGHT_BTN[2])
|
fightBtn:setSprite(GConst.ATLAS_PATH.COMMON, FIGHT_BTN[2])
|
||||||
fightDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
|
fightDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
|
||||||
self.rewardCells[1]:refreshByConfig(config.must_drop[1])
|
|
||||||
self.rewardCells[2]:refreshByConfig(config.rand_drop[1])
|
|
||||||
self.rewardCells[3]:refreshByConfig(config.rand_drop[2])
|
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
|
self.rewardCells[i]:refreshByConfig(config.item_show[i])
|
||||||
self.rewardCells[i]:hideCountTx()
|
self.rewardCells[i]:hideCountTx()
|
||||||
end
|
end
|
||||||
fightBtn:addClickListener(function()
|
fightBtn:addClickListener(function()
|
||||||
Logger.logHighlight("扫荡")
|
ModuleManager.DungeonWeaponManager:reqSweep(id)
|
||||||
end)
|
end)
|
||||||
elseif weaponData:canFightChapter(id) then -- 可挑战
|
elseif weaponData:canFightChapter(id) then -- 可挑战
|
||||||
mask:setVisible(false)
|
mask:setVisible(false)
|
||||||
@ -60,16 +58,14 @@ function ChapterLayerCell:refresh(id)
|
|||||||
|
|
||||||
fightBtn:setSprite(GConst.ATLAS_PATH.COMMON, FIGHT_BTN[1])
|
fightBtn:setSprite(GConst.ATLAS_PATH.COMMON, FIGHT_BTN[1])
|
||||||
fightDesc:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE))
|
fightDesc:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE))
|
||||||
self.rewardCells[1]:refreshByConfig(config.must_drop[1])
|
|
||||||
self.rewardCells[2]:refreshByConfig(config.rand_drop[1])
|
|
||||||
self.rewardCells[3]:refreshByConfig(config.rand_drop[2])
|
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
|
self.rewardCells[i]:refreshByConfig(config.item_show[i])
|
||||||
self.rewardCells[i]:hideCountTx()
|
self.rewardCells[i]:hideCountTx()
|
||||||
end
|
end
|
||||||
self.rewardCells[4]:refreshByConfig(config.first_reward)
|
self.rewardCells[4]:refreshByConfig(config.first_reward)
|
||||||
self.rewardCells[4]:showFirstPass(true)
|
self.rewardCells[4]:showFirstPass(true)
|
||||||
fightBtn:addClickListener(function()
|
fightBtn:addClickListener(function()
|
||||||
Logger.logHighlight("挑战")
|
ModuleManager.DungeonWeaponManager:reqFight(id)
|
||||||
end)
|
end)
|
||||||
else -- 不可挑战
|
else -- 不可挑战
|
||||||
mask:setVisible(true)
|
mask:setVisible(true)
|
||||||
|
|||||||
@ -18,17 +18,18 @@ function DungeonWeaponMainUI:getPrefabPath()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DungeonWeaponMainUI:ctor()
|
function DungeonWeaponMainUI:ctor()
|
||||||
|
self.weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||||
self.chapterList = {}
|
self.chapterList = {}
|
||||||
self.targetId = nil
|
self.targetId = self.weaponData:getPassedMaxId()
|
||||||
for id, info in pairs(ConfigManager:getConfig("chapter_dungeon_equip")) do
|
for id, info in pairs(ConfigManager:getConfig("chapter_dungeon_equip")) do
|
||||||
table.insert(self.chapterList, id)
|
table.insert(self.chapterList, id)
|
||||||
if not self.targetId then
|
if not self.targetId then
|
||||||
self.targetId = id
|
self.targetId = id
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if id == then -- 最大可挑战章节
|
if id == self.weaponData:getPassedMaxId() + 1 and self.weaponData:canFightChapter(id) then -- 最大可挑战章节
|
||||||
-- self.targetId = id
|
self.targetId = id
|
||||||
-- end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -52,10 +53,25 @@ function DungeonWeaponMainUI:_addListeners()
|
|||||||
uiMap["dungeon_weapon_mian_ui.banner.btn_back"]:addClickListener(function()
|
uiMap["dungeon_weapon_mian_ui.banner.btn_back"]:addClickListener(function()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
uiMap["dungeon_weapon_mian_ui.banner.btn_formation"]:addClickListener(function()
|
||||||
|
ModuleManager.CommonManager:showFormationUI(GConst.BattleConst.FORMATION_TYPE.DUNGEON_WEAPON)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonWeaponMainUI:_bind()
|
function DungeonWeaponMainUI:_bind()
|
||||||
|
self:bind(self.weaponData, "isDirty", function()
|
||||||
|
self:refreshFormation()
|
||||||
|
self:refreshRemianNode()
|
||||||
|
end)
|
||||||
|
|
||||||
|
self:bind(DataManager.FormationData, "dirty", function()
|
||||||
|
self:refreshFormation()
|
||||||
|
end)
|
||||||
|
|
||||||
|
self:bind(DataManager.FormationData, "isDirty", function()
|
||||||
|
self:refreshFormation()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonWeaponMainUI:refreshScrollrect()
|
function DungeonWeaponMainUI:refreshScrollrect()
|
||||||
@ -84,8 +100,7 @@ function DungeonWeaponMainUI:refreshRemianNode()
|
|||||||
local uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
local node = uiMap["dungeon_weapon_mian_ui.remian_node"]
|
local node = uiMap["dungeon_weapon_mian_ui.remian_node"]
|
||||||
local txt = uiMap["dungeon_weapon_mian_ui.remian_node.desc"]
|
local txt = uiMap["dungeon_weapon_mian_ui.remian_node.desc"]
|
||||||
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
txt:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_5, self.weaponData:getRemianFarmCount() .. "/" .. self.weaponData:getDialyFarmLimit()))
|
||||||
txt:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_5, weaponData:getRemianFarmCount() .. "/" .. weaponData:getDialyFarmLimit()))
|
|
||||||
GFunc.expandImgToFitTx(node, txt, 16.5)
|
GFunc.expandImgToFitTx(node, txt, 16.5)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -91,6 +91,8 @@ function HeroComp:refresh(battleType)
|
|||||||
self:refreshArenaFightFormation()
|
self:refreshArenaFightFormation()
|
||||||
elseif self.battleType == GConst.BattleConst.FORMATION_TYPE.ARENA_DEFEND then
|
elseif self.battleType == GConst.BattleConst.FORMATION_TYPE.ARENA_DEFEND then
|
||||||
self:refreshArenaDefendFormation()
|
self:refreshArenaDefendFormation()
|
||||||
|
elseif self.battleType == GConst.BattleConst.FORMATION_TYPE.DUNGEON_WEAPON then
|
||||||
|
self:refreshDungeonWeaponFormation()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -135,6 +137,20 @@ function HeroComp:refreshArenaDefendFormation()
|
|||||||
self:refreshScrollRect()
|
self:refreshScrollRect()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 展示武器副本
|
||||||
|
function HeroComp:refreshDungeonWeaponFormation()
|
||||||
|
self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_15))
|
||||||
|
self.rimgTopBG:setTexture("assets/arts/textures/background/hero/hero_bg_1.png")
|
||||||
|
self.curFormation = DataManager.FormationData:getDungeonWeaponFormation()
|
||||||
|
|
||||||
|
self.onClickUseFunc = function(id, type)
|
||||||
|
DataManager.FormationData:upHeroToFormation(self.battleType, type, id)
|
||||||
|
self:refreshDungeonWeaponFormation()
|
||||||
|
end
|
||||||
|
|
||||||
|
self:refreshScrollRect()
|
||||||
|
end
|
||||||
|
|
||||||
function HeroComp:refreshScrollRect()
|
function HeroComp:refreshScrollRect()
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
local heroId = self.curFormation[i]
|
local heroId = self.curFormation[i]
|
||||||
|
|||||||
@ -25,7 +25,7 @@ function DungeonComp:init()
|
|||||||
return "app/ui/dungeon/dungeon_board_cell"
|
return "app/ui/dungeon/dungeon_board_cell"
|
||||||
end)
|
end)
|
||||||
self.scrollRectComp:addRefreshCallback(function(index, cell)
|
self.scrollRectComp:addRefreshCallback(function(index, cell)
|
||||||
cell:refresh(self.openDungeons[index])
|
cell:refresh(self.openDungeons[index].module)
|
||||||
end)
|
end)
|
||||||
self.scrollRectComp:setTotalCount(0)
|
self.scrollRectComp:setTotalCount(0)
|
||||||
self:refreshShow()
|
self:refreshShow()
|
||||||
|
|||||||
@ -116,7 +116,7 @@ function BaseTips:adaptWhenOverScreen(node, pivotX, pivotY)
|
|||||||
-- 右边超出屏幕
|
-- 右边超出屏幕
|
||||||
if math.abs(rightX) > halfWidth then
|
if math.abs(rightX) > halfWidth then
|
||||||
node:addAnchoredPosition(halfWidth - math.abs(rightX), 0)
|
node:addAnchoredPosition(halfWidth - math.abs(rightX), 0)
|
||||||
xOffset = xOffset + math.abs(leftX) - halfWidth
|
xOffset = xOffset + halfWidth - math.abs(rightX)
|
||||||
end
|
end
|
||||||
-- 上边超出屏幕
|
-- 上边超出屏幕
|
||||||
if math.abs(topY) > halfHeight then
|
if math.abs(topY) > halfHeight then
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
local DungeonData = class("DungeonData", BaseData)
|
local DungeonData = class("DungeonData", BaseData)
|
||||||
|
|
||||||
local SORT_ORDER = {
|
local SORT_ORDER = {
|
||||||
|
[ModuleManager.MODULE_KEY.DUNGEON_GOLD] = 1,
|
||||||
|
[ModuleManager.MODULE_KEY.DUNGEON_SHARDS] = 2,
|
||||||
|
[ModuleManager.MODULE_KEY.DUNGEON_WEAPON] = 3,
|
||||||
|
[ModuleManager.MODULE_KEY.DUNGEON_ARMOR] = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- 所有活动副本数据
|
-- 所有活动副本数据
|
||||||
@ -11,6 +14,11 @@ function DungeonData:ctor()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DungeonData:clear()
|
function DungeonData:clear()
|
||||||
|
if self.dataDungeons then
|
||||||
|
for _, entity in pairs(self.dataDungeons) do
|
||||||
|
entity:clear()
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 初始化金币副本数据
|
-- 初始化金币副本数据
|
||||||
@ -167,35 +175,33 @@ function DungeonData:getOpenDungeons()
|
|||||||
-- 开启且活跃
|
-- 开启且活跃
|
||||||
table.foreach(self.dungeonStage, function(module, s)
|
table.foreach(self.dungeonStage, function(module, s)
|
||||||
if self:isOpen(module) and self:isActive(module) then
|
if self:isOpen(module) and self:isActive(module) then
|
||||||
table.insert(openDungeons, module)
|
local count = self:getRemainTimes(module)
|
||||||
|
if count > 0 then
|
||||||
|
count = 100
|
||||||
|
else
|
||||||
|
count = 200
|
||||||
|
end
|
||||||
|
table.insert(openDungeons, {
|
||||||
|
sort = SORT_ORDER[module] + 1000 + count, -- 系数 + 开启1000 + 剩余次数
|
||||||
|
module = module
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
-- 开启且不活跃
|
-- 开启且不活跃
|
||||||
if not GFunc.isShenhe() then
|
if not GFunc.isShenhe() then
|
||||||
table.foreach(self.dungeonStage, function(module, s)
|
table.foreach(self.dungeonStage, function(module, s)
|
||||||
if self:isOpen(module) and not self:isActive(module) then
|
if self:isOpen(module) and not self:isActive(module) then
|
||||||
table.insert(openDungeons, module)
|
table.insert(openDungeons, {
|
||||||
|
sort = SORT_ORDER[module] + 2000, -- 系数 + 未开启2000
|
||||||
|
module = module
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 碎片和金币顺序特殊处理:策划要求,同时开启时,金币在碎片之上
|
table.sort(openDungeons, function(a, b)
|
||||||
if self:isActive(ModuleManager.MODULE_KEY.DUNGEON_GOLD) and self:isActive(ModuleManager.MODULE_KEY.DUNGEON_SHARDS) then
|
return a.sort < b.sort
|
||||||
local idxGold,idxShards = 0,0
|
end)
|
||||||
for idx, module in pairs(openDungeons) do
|
|
||||||
if module == ModuleManager.MODULE_KEY.DUNGEON_GOLD then
|
|
||||||
idxGold = idx
|
|
||||||
end
|
|
||||||
if module == ModuleManager.MODULE_KEY.DUNGEON_SHARDS then
|
|
||||||
idxShards = idx
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if idxGold > idxShards then
|
|
||||||
local temp = openDungeons[idxShards]
|
|
||||||
openDungeons[idxShards] = openDungeons[idxGold]
|
|
||||||
openDungeons[idxGold] = temp
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if EDITOR_MODE then
|
if EDITOR_MODE then
|
||||||
Logger.logHighlight("已开启副本:")
|
Logger.logHighlight("已开启副本:")
|
||||||
|
|||||||
@ -4,13 +4,37 @@ local DungeonWeaponEntity = class("DungeonWeaponEntity", DungeonBaseEntity)
|
|||||||
local GET_PASS_INFO_INTERVAL = 600
|
local GET_PASS_INFO_INTERVAL = 600
|
||||||
-- 支线副本数据
|
-- 支线副本数据
|
||||||
|
|
||||||
|
function DungeonWeaponEntity:clear()
|
||||||
|
DataManager:unregisterCrossDayFunc("DungeonWeaponEntity")
|
||||||
|
end
|
||||||
|
|
||||||
function DungeonWeaponEntity:init(data)
|
function DungeonWeaponEntity:init(data)
|
||||||
self.maxPassedId = data.max_challenge_id
|
self.maxPassedId = data.max_challenge_id or 0
|
||||||
self.farmCount = data.farm_count
|
self.farmCount = data.farm_count or 0
|
||||||
self.heroes = data.heroes
|
self.heroes = data.heroes or {}
|
||||||
self.giftInfo = data.gift_info
|
self.giftInfo = data.gift_info or {}
|
||||||
self.totalChallengeCount = data.total_challenge_count
|
self.totalChallengeCount = data.total_challenge_count or {}
|
||||||
self.data.isDirty = not self.data.isDirty
|
self.data.isDirty = not self.data.isDirty
|
||||||
|
|
||||||
|
DataManager.FormationData:initDungeonWeapon(self.heroes)
|
||||||
|
|
||||||
|
DataManager:registerCrossDayFunc("DungeonWeaponEntity", function()
|
||||||
|
self.farmCount = 0
|
||||||
|
self:setDirty()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponEntity:refreshInfoOnSettlement(chapterId, result)
|
||||||
|
self.totalChallengeCount[chapterId] = (self.totalChallengeCount[chapterId] or 0) + 1
|
||||||
|
self.maxPassedId = result.max_id
|
||||||
|
self.giftInfo = result.gift_info
|
||||||
|
self:setDirty()
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponEntity:refreshInfoOnFarm(result)
|
||||||
|
self.farmCount = self.farmCount + 1
|
||||||
|
self.giftInfo = result.gift_info
|
||||||
|
self:setDirty()
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonWeaponEntity:setDirty()
|
function DungeonWeaponEntity:setDirty()
|
||||||
@ -18,7 +42,11 @@ function DungeonWeaponEntity:setDirty()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DungeonWeaponEntity:getTotalChallengeCount()
|
function DungeonWeaponEntity:getTotalChallengeCount()
|
||||||
return self.totalChallengeCount
|
local count = 0
|
||||||
|
for _, c in pairs(self.totalChallengeCount) do
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
return count
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonWeaponEntity:getTodayChallengeCount()
|
function DungeonWeaponEntity:getTodayChallengeCount()
|
||||||
@ -89,6 +117,10 @@ function DungeonWeaponEntity:getRemianFarmCount()
|
|||||||
return count
|
return count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponEntity:getTodayRemainLimitCount()
|
||||||
|
return self:getRemianFarmCount()
|
||||||
|
end
|
||||||
|
|
||||||
function DungeonWeaponEntity:getLevelEnough(chapterId)
|
function DungeonWeaponEntity:getLevelEnough(chapterId)
|
||||||
local config = ConfigManager:getConfig(self:getConfigName())[chapterId]
|
local config = ConfigManager:getConfig(self:getConfigName())[chapterId]
|
||||||
if not config then
|
if not config then
|
||||||
@ -139,6 +171,7 @@ function DungeonWeaponEntity:doCachePassInfo(chapterId, info)
|
|||||||
self.cachePassInfo[chapterId].info = info
|
self.cachePassInfo[chapterId].info = info
|
||||||
self.cachePassInfo[chapterId].getTime = Time:getServerTime()
|
self.cachePassInfo[chapterId].getTime = Time:getServerTime()
|
||||||
end
|
end
|
||||||
|
self:setDirty()
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonBaseEntity:getCachePassInfo(chapterId)
|
function DungeonBaseEntity:getCachePassInfo(chapterId)
|
||||||
@ -157,4 +190,16 @@ function DungeonBaseEntity:getCachePassInfo(chapterId)
|
|||||||
return self.cachePassInfo[chapterId].info
|
return self.cachePassInfo[chapterId].info
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponEntity:setCurFightChapterId(chapterId)
|
||||||
|
self.curFightchapterId = chapterId or 1
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponEntity:getCurFightChapterId()
|
||||||
|
return self.curFightchapterId or 1
|
||||||
|
end
|
||||||
|
|
||||||
|
function DungeonWeaponEntity:getChapterFightCount(chapterId)
|
||||||
|
return self.totalChallengeCount[chapterId] or 0
|
||||||
|
end
|
||||||
|
|
||||||
return DungeonWeaponEntity
|
return DungeonWeaponEntity
|
||||||
@ -46,6 +46,20 @@ function FormationData:initArena(attack, defend)
|
|||||||
self:setDirty()
|
self:setDirty()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function FormationData:initDungeonWeapon(heroes)
|
||||||
|
if self.formations == nil then
|
||||||
|
self.formations = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
self.formations[GConst.BattleConst.FORMATION_TYPE.DUNGEON_WEAPON] = {}
|
||||||
|
for idx, id in pairs(heroes) do
|
||||||
|
if id and id ~= 0 then
|
||||||
|
local matchType = DataManager.HeroData:getHeroById(id):getMatchType()
|
||||||
|
self.formations[GConst.BattleConst.FORMATION_TYPE.DUNGEON_WEAPON][matchType] = id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function FormationData:getStageFormation()
|
function FormationData:getStageFormation()
|
||||||
return self:getFormation(GConst.BattleConst.FORMATION_TYPE.STAGE)
|
return self:getFormation(GConst.BattleConst.FORMATION_TYPE.STAGE)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user