This commit is contained in:
xiekaidong 2023-05-17 18:17:09 +08:00
parent 22d9bb9b3d
commit ad0ab2b8ba
31 changed files with 1108 additions and 340 deletions

View File

@ -265,7 +265,6 @@ local buff = {
[36]={
["name"]="normal_attack_dec",
["buff_type"]=1,
["stack"]=2,
["decr"]=2,
["icon"]="normal_attack_dec",
["fx_continued"]={

View File

@ -40,24 +40,6 @@ local chapter = {
401,
501
},
["mystery_box"]={
{
1,
5
}
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
["wave_reward"]={
{
["type"]=1,
@ -179,26 +161,9 @@ local chapter = {
1501
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
1
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
},
{
{
["type"]=1,
@ -369,22 +334,16 @@ local chapter = {
3001
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
3
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["id"]=4,
["id_for_nothing"]="Ug==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
@ -580,38 +539,6 @@ local chapter = {
4901,
5001
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
},
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
["wave_reward"]={
{
["type"]=1,
@ -819,38 +746,6 @@ local chapter = {
6901,
7001
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
},
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
["wave_reward"]={
{
["type"]=1,
@ -1058,38 +953,6 @@ local chapter = {
8901,
9001
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
},
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
["wave_reward"]={
{
["type"]=1,
@ -1297,38 +1160,6 @@ local chapter = {
10901,
11001
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
},
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
["wave_reward"]={
{
["type"]=1,
@ -1552,38 +1383,6 @@ local chapter = {
12901,
13001
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
},
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
["wave_reward"]={
{
["type"]=1,
@ -1807,38 +1606,6 @@ local chapter = {
14901,
15001
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
},
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
["wave_reward"]={
{
["type"]=1,
@ -2061,38 +1828,6 @@ local chapter = {
16901,
17001
},
["mystery_box"]={
{
1,
5
},
{
6,
10
}
},
["mystery_box_reward"]={
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
},
{
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
["wave_reward"]={
{
["type"]=1,

View File

@ -198,21 +198,6 @@ local chapter_board = {
0
}
},
["control_element"]={
3,
3,
2,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3
},
["control_element"]={
3,
3,
@ -292,7 +277,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -308,7 +293,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -427,6 +412,204 @@ local chapter_board = {
1,
0
}
},
["mystery_box_board"]={
{
1,
0
},
{
2,
0
},
{
0,
1
},
{
0,
2
},
{
0,
1
},
{
2,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
0,
3
},
{
0,
1
},
{
0,
3
},
{
15,
0
},
{
1,
0
},
{
1,
0
},
{
14,
0
},
{
2,
0
},
{
2,
0
},
{
2,
0
},
{
14,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
2,
0
},
{
2,
0
},
{
2,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
2,
0
},
{
15,
0
},
{
2,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
}
}
},
[3]={
@ -552,7 +735,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -560,7 +743,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -716,7 +899,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -728,7 +911,7 @@ local chapter_board = {
0
},
{
3,
0,
0
},
{
@ -740,7 +923,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -764,7 +947,7 @@ local chapter_board = {
0
},
{
3,
2,
0
},
{
@ -827,6 +1010,204 @@ local chapter_board = {
1,
0
}
},
["mystery_box_board"]={
{
1,
0
},
{
2,
0
},
{
0,
1
},
{
0,
2
},
{
0,
1
},
{
2,
0
},
{
1,
0
},
{
1,
0
},
{
2,
0
},
{
0,
2
},
{
0,
1
},
{
0,
4
},
{
2,
0
},
{
1,
0
},
{
1,
0
},
{
2,
0
},
{
3,
0
},
{
0,
2
},
{
3,
0
},
{
2,
0
},
{
1,
0
},
{
14,
0
},
{
3,
0
},
{
2,
0
},
{
0,
0
},
{
2,
0
},
{
3,
0
},
{
14,
0
},
{
1,
0
},
{
2,
0
},
{
3,
0
},
{
2,
0
},
{
3,
0
},
{
2,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
3,
0
},
{
3,
0
},
{
3,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
15,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
}
}
},
[5]={
@ -888,7 +1269,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -912,7 +1293,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -928,7 +1309,7 @@ local chapter_board = {
0
},
{
2,
14,
0
},
{
@ -1139,6 +1520,188 @@ local chapter_board = {
3,
0
},
{
2,
0
},
{
14,
0
},
{
3,
0
},
{
3,
0
},
{
3,
0
},
{
3,
0
},
{
3,
0
},
{
14,
0
},
{
1,
0
},
{
3,
0
},
{
3,
0
},
{
3,
0
},
{
3,
0
},
{
3,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
3,
0
},
{
14,
0
},
{
3,
0
},
{
1,
0
},
{
1,
0
}
},
["mystery_box_board"]={
{
1,
0
},
{
1,
0
},
{
0,
1
},
{
0,
2
},
{
0,
1
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
0,
2
},
{
0,
3
},
{
0,
2
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
2,
0
},
{
0,
1
},
{
2,
0
},
{
0,
1
},
{
2,
0
},
{
1,
0
},
{
2,
0
},
{
3,
0
},
{
3,
0
@ -1156,7 +1719,11 @@ local chapter_board = {
0
},
{
3,
2,
0
},
{
14,
0
},
{
@ -1171,6 +1738,18 @@ local chapter_board = {
3,
0
},
{
3,
0
},
{
3,
0
},
{
14,
0
},
{
1,
0
@ -1184,7 +1763,7 @@ local chapter_board = {
0
},
{
3,
15,
0
},
{
@ -1212,7 +1791,7 @@ local chapter_board = {
0
},
{
3,
14,
0
},
{

View File

@ -169,6 +169,7 @@ local grid_type = {
3
},
["break_count"]=1,
["break_fly_to_character"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["effect"]=3,
@ -181,7 +182,8 @@ local grid_type = {
1,
3
},
["break_count"]=3,
["break_count"]=1,
["break_fly_to_character"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["effect"]=4,

109
lua/app/config/mail.lua Normal file
View File

@ -0,0 +1,109 @@
local mail = {
[1]={
["type"]=1,
["time_type"]=1,
["time_send"]={
0,
0,
0
},
["time"]=24,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
[2]={
["type"]=2,
["time_type"]=1,
["time_send"]={
0,
0,
0
},
["time"]=24,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
}
}
},
[3]={
["type"]=3,
["time_type"]=2,
["time_send"]={
5,
12,
0,
0
},
["time"]=24,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=30,
["num_for_nothing"]="VQg="
}
}
},
[4]={
["type"]=3,
["time_type"]=2,
["time_send"]={
6,
12,
0,
0
},
["time"]=24,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
}
}
},
[5]={
["type"]=3,
["time_type"]=2,
["time_send"]={
7,
12,
0,
0
},
["time"]=24,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=70,
["num_for_nothing"]="UQg="
}
}
}
}
local config = {
data=mail,count=5
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 11665dfdb08a75846bfb0d3a63277542
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -76,7 +76,7 @@ local recharge = {
["price"]=9.99,
["price_cn"]=68,
["same_price"]=10,
["price_str"]="9.99",
["price_str"]="$9.99",
["score"]=10
},
[11]={
@ -84,7 +84,7 @@ local recharge = {
["price"]=11.99,
["price_cn"]=78,
["same_price"]=12,
["price_str"]="11.99",
["price_str"]="$11.99",
["score"]=12
},
[12]={
@ -148,7 +148,7 @@ local recharge = {
["price"]=199.99,
["price_cn"]=1298,
["same_price"]=200,
["price_str"]="199.99",
["price_str"]="$199.99",
["score"]=200
}
}

View File

@ -0,0 +1,24 @@
local mail = {
[1]={
["name"]="路边老爷爷的馈赠"
},
[2]={
["name"]="国王的日常补给"
},
[3]={
["name"]="哼哼哈嘿",
["desc"]="乐观的人总在不经意间获得意外之喜"
},
[4]={
["name"]="仁者无敌",
["desc"]="心地善良的人,会善有善报的"
},
[5]={
["name"]="风生水起",
["desc"]="精力充沛,运势良好,财运连连"
}
}
local config = {
data=mail,count=5
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: bbf38508076c6a04d9f1bf15181bd3b6
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,21 @@
local mail = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
}
}
local config = {
data=mail,count=5
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3a1954dd8e9d1c54c981ef71c96077be
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,24 @@
local mail = {
[1]={
["name"]="Bestowal of the Elder"
},
[2]={
["name"]="Daily Allowance of the King"
},
[3]={
["name"]="Hey! See what's inside!",
["desc"]="An optimistic person is always surprised by the unexpected"
},
[4]={
["name"]="To my beloved...",
["desc"]="A good heart will be rewarded with good deeds"
},
[5]={
["name"]="Thrive!",
["desc"]="Good energy, good luck and good fortune"
}
}
local config = {
data=mail,count=5
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 90d8b11fdee6134419f8e702ab468cf5
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,24 @@
local mail = {
[1]={
["name"]="Cadeau d'un grand-père au bord de la route"
},
[2]={
["name"]="Approvisionnement quotidien du roi"
},
[3]={
["name"]="Hoho hahé",
["desc"]="Une personne optimiste est toujours surprise par l'inattendu"
},
[4]={
["name"]="Le bienveillant invincible",
["desc"]="Une personne au bon cœur sera récompensée par de bonnes actions"
},
[5]={
["name"]="En plein forme",
["desc"]="Bonne énergie, bonne chance et bonne fortune"
}
}
local config = {
data=mail,count=5
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: eb850ef427dabc54794afaf8bcedf737
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,21 @@
local mail = {
[1]={
},
[2]={
},
[3]={
},
[4]={
},
[5]={
}
}
local config = {
data=mail,count=5
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 2cea8977c8008a84685fa9c216ea4e6d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,24 @@
local mail = {
[1]={
["name"]="길 가던 할아버지가 던져 준 선물"
},
[2]={
["name"]="왕의 일상 보급품"
},
[3]={
["name"]="으랏차차!",
["desc"]="낙관적 인 사람은 항상 예상치 못한 것에 놀란다."
},
[4]={
["name"]="자비로운 자는 무적입니다.",
["desc"]="마음이 착한 사람은 선행으로 보상을받을 것입니다."
},
[5]={
["name"]="막힘없이 뻗어나가요!",
["desc"]="좋은 에너지, 행운과 행운"
}
}
local config = {
data=mail,count=5
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: fe3092af5b4df5c48a321faee19026de
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,24 @@
local mail = {
[1]={
["name"]="路邊老爺爺的饋贈"
},
[2]={
["name"]="國王的日常補給"
},
[3]={
["name"]="哼哼哈嘿",
["desc"]="樂觀的人總在不經意間獲得意外之喜"
},
[4]={
["name"]="仁者無敵",
["desc"]="心地善良的人,會善有善報的"
},
[5]={
["name"]="風生水起",
["desc"]="精力充沛,運勢良好,財運連連"
}
}
local config = {
data=mail,count=5
}
return config

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 82da7c0e4ab2825488868c862fa80ec1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -377,6 +377,7 @@ BattleConst.GRID_EFFECT_TYPE = {
DIRECTION_ELIMINATION = 1,
CROSS_SPREAD = 2,
SELECT_COMMON_SKILL = 3,
REWARD_BOX = 4,
}
BattleConst.GRID_EFFECT_TRIGGER_TYPE = {

View File

@ -211,6 +211,8 @@ function BattleController:init(params)
self.roundStep = BattleConst.BATTLE_ROUND_STEP.WAIT_BEGIN
self.effectTexts = {}
self.instructions = {}
self.gotMysteryBoxIndexs = {}
self.showMysteryBoxIndexs = {}
self.delayEffectTextList = {}
self.delayEffectTextCount = 0
self.time = 0
@ -1003,6 +1005,12 @@ function BattleController:dealGridBreak(posId, condition, time, breakedMap, sequ
end
end
end
if entity:getBreakFlyToCharacter() then
aniUnit.breakFlyToCharacter = true
aniUnit.noAni = false
aniUnit.overCallback = aniUnit.callback
aniUnit.callback = nil
end
end
return isIdle
@ -1122,9 +1130,25 @@ function BattleController:fillBoard(isRoundBeginCheck)
end
function BattleController:onFillBoardOver(isRoundBeginCheck)
if not isRoundBeginCheck and self.battleData:useCommonSelectSkillCount() then
self.battleUI:enableUITouch()
if not isRoundBeginCheck then -- 检查一些表现
if self.showMysteryBoxIndexs[1] then -- 检查宝箱
local index = table.remove(self.showMysteryBoxIndexs, 1)
local boardList, _, mysteryBoxIndexMap = self:getInitBoard()
local rewards = mysteryBoxIndexMap[index]
ModuleManager.TipsManager:showRewardsTips(rewards, nil, nil, function()
self:onFillBoardOver()
end)
return
end
if self.battleData:useCommonSelectSkillCount() then -- 检查神灯
self:tryShowSelectSkillComp(false, true)
else
return
end
end
if self.onFillBoardOverCallback then
self.onFillBoardOverCallback()
end
@ -1140,8 +1164,6 @@ function BattleController:onFillBoardOver(isRoundBeginCheck)
self:enterBattleStep()
end)
end
end
self.battleUI:enableUITouch()
end
function BattleController:generateInstructions(skillEntity, elementType, lineCount, influenceElementTypeMap, elementTypeMap)
@ -1325,7 +1347,7 @@ function BattleController:exeInstructions(callback)
end
function BattleController:generateBoard(isFirst)
local boardList, _ = self:getInitBoard()
local boardList, _, mysteryBoxIndexMap = self:getInitBoard()
if self.curBoardIndex and self.curBoardIndex >= #boardList then
return
end
@ -1334,8 +1356,13 @@ function BattleController:generateBoard(isFirst)
return
end
self.curBoardIndex = (self.curBoardIndex or 0) + 1
local board = boardList[self.curBoardIndex]
local board = boardList[self.curBoardIndex].board
local mysteryBoard = boardList[self.curBoardIndex].mysteryBoard
if mysteryBoard and mysteryBoxIndexMap and mysteryBoxIndexMap[self.curBoardIndex] then
board = mysteryBoard
end
self.battleUI:switchBoard(function()
self.battleData:refreshBoard(board, self:getBlockIcon())
self.battleUI:initGridCell()
@ -1344,6 +1371,11 @@ function BattleController:generateBoard(isFirst)
end, isFirst)
end
function BattleController:onGotMysteryBoxIndexs()
self.gotMysteryBoxIndexs[self.curBoardIndex] = true
table.insert(self.showMysteryBoxIndexs, self.curBoardIndex)
end
function BattleController:putBoardCacheSkill(callback)
if not self.battleUI then
return

View File

@ -91,18 +91,28 @@ function BattleControllerStage:getInitBoard()
if not self.boradList then
self.boradList = {}
self.fixedRandomGrid = {}
self.mysteryBoxIndexMap = {}
local config = ConfigManager:getConfig("chapter")[self.chapterId]
local boardCfg = ConfigManager:getConfig("chapter_board")
for _, boardId in ipairs(config.board) do
local cfg = boardCfg[boardId]
if cfg then
table.insert(self.boradList, GFunc.getTable(cfg.board))
table.insert(self.boradList, {board = GFunc.getTable(cfg.board), mysteryBoard = GFunc.getTable(cfg.mystery_box_board)})
table.insert(self.fixedRandomGrid, GFunc.getTable(cfg.control_element))
end
end
if config.mystery_box and config.mystery_box_reward then
for i, index in ipairs(config.mystery_box) do
if not DataManager.ChapterData:getChapterMysteryBoxIsGot(self.chapterId, index) then
self.mysteryBoxIndexMap[index] = config.mystery_box_reward[i]
end
end
end
end
return self.boradList, self.fixedRandomGrid
return self.boradList, self.fixedRandomGrid, self.mysteryBoxIndexMap
end
function BattleControllerStage:getSealElementType()
@ -170,7 +180,7 @@ function BattleControllerStage:controllBattleEnd()
if not self.victory then
self.combatReport.wave = self.combatReport.wave - 1
end
ModuleManager.ChapterManager:endFight(self.chapterId, self.combatReport)
ModuleManager.ChapterManager:endFight(self.chapterId, self.combatReport, self.gotMysteryBoxIndexs)
end
function BattleController:postWaveOver(atkDead, isQuit)

View File

@ -43,10 +43,18 @@ local function _selectCommonSkill(entity, gridEntities, battleController, onlyCh
battleController.battleData:addCommonSelectSkillCount()
end
local function _rewardBox(entity, gridEntities, battleController, onlyCheck)
if onlyCheck then
return
end
battleController:onGotMysteryBoxIndexs()
end
BattleGridEffectHandle._gridEffectOn = {
[GRID_EFFECT_TYPE.DIRECTION_ELIMINATION] = _directionElinination,
[GRID_EFFECT_TYPE.CROSS_SPREAD] = _crossSpread,
[GRID_EFFECT_TYPE.SELECT_COMMON_SKILL] = _selectCommonSkill,
[GRID_EFFECT_TYPE.REWARD_BOX] = _rewardBox,
}
function BattleGridEffectHandle.gridEffectOn(posId, gridEntities, triggerType, battleController, onlyCheck)

View File

@ -48,10 +48,17 @@ function ChapterManager:startFightFinish(result)
end
end
function ChapterManager:endFight(id, combatReport)
function ChapterManager:endFight(id, combatReport, gotMysteryBoxIndexs)
local mystery_box_idx = {}
if gotMysteryBoxIndexs then
for index, _ in pairs(gotMysteryBoxIndexs) do
table.insert(mystery_box_idx, index)
end
end
local parmas = {
chapter_id = id,
win = combatReport.victory,
chapter_id = id,
gotMysteryBoxIndexs = gotMysteryBoxIndexs,
pass_wave = combatReport.wave,
combatReport = combatReport,
}

View File

@ -48,10 +48,11 @@ function TipsManager:showItemTips(id, tarPrefabObj, alignType)
UIManager:showUI("app/ui/tips/item_tips", params)
end
function TipsManager:showRewardsTips(rewards, customTitleStr, tarPrefabObj, alignType)
function TipsManager:showRewardsTips(rewards, customTitleStr, tarPrefabObj, callback, alignType)
local params = {
rewards = rewards,
customTitleStr = customTitleStr,
callback = callback,
aniType = UIManager.ANI_TYPE.NONE,
}
if tarPrefabObj then

View File

@ -884,6 +884,7 @@ function BattleUI:eliminationAni(aniSequence, effectGridMap, callback)
end
local baseObject = entity:getCell():getBaseObject()
baseObject:getTransform():SetAsLastSibling()
local anitime = 0
if info.aniPosList then
local posList = {}
local count = 0
@ -891,17 +892,8 @@ function BattleUI:eliminationAni(aniSequence, effectGridMap, callback)
table.insert(posList, ModuleManager.BattleManager:getPosInfo(posId))
count = count + 1
end
local anitime = count * GConst.BattleConst.GRID_BREAK_EFFECT_INTERVAL
anitime = count * GConst.BattleConst.GRID_BREAK_EFFECT_INTERVAL
self.eliminationAniSeq:Insert(time, baseObject:getTransform():DOLocalPath(posList, anitime):SetEase(CS.DG.Tweening.Ease.Linear))
if info.overCallback then
self.eliminationAniSeq:InsertCallback(time + anitime, function()
if info.noAni then
baseObject:setAnchoredPositionX(DEFAULT_X)
end
info.overCallback()
end)
end
else
if info.noAni then
baseObject:setAnchoredPositionX(DEFAULT_X)
@ -918,9 +910,24 @@ function BattleUI:eliminationAni(aniSequence, effectGridMap, callback)
obj:play()
end)
end)
self.eliminationAniSeq:Insert(time + 0.2, baseObject:getTransform():DOAnchorPos(self:getElementSkillPos(entity:getElementType()), 0.3))
self.eliminationAniSeq:Insert(time + 0.2, baseObject:getTransform():DOScale(0.5, 0.3))
local targetPos = self:getElementSkillPos(entity:getElementType())
if info.breakFlyToCharacter then
targetPos = self.battleController.atkTeam:getMainUnit():getBaseObject():getTransform().position
local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos)
targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.boardNode:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent())
end
self.eliminationAniSeq:Insert(time + 0.2, baseObject:getTransform():DOAnchorPos(targetPos, 0.3))
self.eliminationAniSeq:Insert(time + 0.2, baseObject:getTransform():DOScale(0.5, 0.3))
anitime = 0.5
end
end
if info.overCallback then
self.eliminationAniSeq:InsertCallback(time + anitime, function()
if info.noAni then
baseObject:setAnchoredPositionX(DEFAULT_X)
end
info.overCallback()
end)
end
end
end

View File

@ -5,6 +5,7 @@ function RewardsTips:ctor(params)
self.params = params
self.tarCornerScreenPos = params.tarCornerScreenPos
self.location = params.location
self.callback = params.callback
end
function RewardsTips:getPrefabPath()
@ -65,6 +66,9 @@ function RewardsTips:onClose()
tipsBgTransform.anchoredPosition = self.originAnchoredPosition
tipsBgTransform.localPosition = self.originLocalPosition
end
if self.callback then
self.callback()
end
end
return RewardsTips

View File

@ -386,4 +386,8 @@ function BattleGridEntity:getEffectTrigger()
return self:getGridTypeConfig().effect_trigger
end
function BattleGridEntity:getBreakFlyToCharacter()
return self:getGridTypeConfig().break_fly_to_character == 1
end
return BattleGridEntity

View File

@ -301,7 +301,8 @@ function ChapterData:fightChapter(chapterId, maxChapterId, maxWave)
if not self.data.chapterInfo[chapterId] then
self.data.chapterInfo[chapterId] = {
total_count = 0,
index = {}
index = {},
chapterId = {}
}
end
self.data.chapterInfo[chapterId].total_count = (self.data.chapterInfo[chapterId].total_count or 0) + 1
@ -321,4 +322,31 @@ function ChapterData:fightChapter(chapterId, maxChapterId, maxWave)
self:setDirty()
end
function ChapterData:getChapterMysteryBox(chapterId)
return self.data.chapterInfo[chapterId].mystery_box_idx
end
function ChapterData:getChapterMysteryBoxReward(chapterId)
local cfg = self:getChapterCfg()[chapterId]
if not cfg then
return
end
return cfg.mystery_box_reward
end
function ChapterData:getChapterMysteryBoxIsGot(chapterId, index)
if not self.data.chapterInfo[chapterId] then
return false
end
if not self.data.chapterInfo[chapterId].mystery_box_idx then
return false
end
for _, idx in ipairs(self.data.chapterInfo[chapterId].mystery_box_idx) do
if idx == index then
return true
end
end
return false
end
return ChapterData