diff --git a/lua/app/config/chapter_board.lua b/lua/app/config/chapter_board.lua index 80cbeef7..63acb462 100644 --- a/lua/app/config/chapter_board.lua +++ b/lua/app/config/chapter_board.lua @@ -33574,11 +33574,11 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 36, - 1 + 0 }, { 0, @@ -33686,15 +33686,15 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 36, - 1 + 0 }, { 36, - 1 + 0 }, { 0, @@ -33772,11 +33772,11 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 36, - 1 + 0 }, { 0, @@ -33884,15 +33884,15 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 36, - 1 + 0 }, { 36, - 1 + 0 }, { 0, @@ -34060,7 +34060,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 3, @@ -34068,7 +34068,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -34196,7 +34196,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -34204,7 +34204,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -34212,7 +34212,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -34324,7 +34324,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 3, @@ -34424,7 +34424,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 2, @@ -34448,7 +34448,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 1, @@ -34480,7 +34480,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 2, @@ -34504,7 +34504,7 @@ local chapter_board = { }, { 36, - 1 + 0 } }, ["mystery_box_board"]={ @@ -34522,7 +34522,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 3, @@ -34622,7 +34622,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 2, @@ -34646,7 +34646,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 1, @@ -34678,7 +34678,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 2, @@ -34702,7 +34702,7 @@ local chapter_board = { }, { 36, - 1 + 0 } } }, @@ -34798,7 +34798,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -34814,7 +34814,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 1, @@ -34862,7 +34862,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -34914,7 +34914,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -34962,7 +34962,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 2, @@ -35034,7 +35034,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35112,7 +35112,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35160,7 +35160,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 2, @@ -35232,7 +35232,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35364,7 +35364,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35388,7 +35388,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 1, @@ -35428,7 +35428,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 2, @@ -35476,7 +35476,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35562,7 +35562,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35586,7 +35586,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 1, @@ -35626,7 +35626,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 2, @@ -35674,7 +35674,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35746,7 +35746,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35762,7 +35762,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -35786,7 +35786,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 1, @@ -35854,7 +35854,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 14, @@ -35862,7 +35862,7 @@ local chapter_board = { }, { 36, - 1 + 0 }, { 0, @@ -37186,7 +37186,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -37238,7 +37238,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 5, @@ -37384,7 +37384,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -37436,7 +37436,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 5, @@ -37544,7 +37544,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -37636,7 +37636,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -37742,7 +37742,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -37834,7 +37834,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -37910,7 +37910,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -38210,7 +38210,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 21, @@ -38250,7 +38250,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -38278,7 +38278,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -38298,7 +38298,7 @@ local chapter_board = { ["board"]={ { 37, - 1 + 0 }, { 0, @@ -38322,7 +38322,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -38622,7 +38622,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 5, @@ -38820,7 +38820,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 5, @@ -38988,7 +38988,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 5, @@ -39004,7 +39004,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 1, @@ -39064,7 +39064,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 5, @@ -39128,7 +39128,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -39144,7 +39144,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 14, @@ -39326,7 +39326,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 0, @@ -39342,7 +39342,7 @@ local chapter_board = { }, { 37, - 1 + 0 }, { 17, diff --git a/lua/app/config/grid_type.lua b/lua/app/config/grid_type.lua index 6a08b258..79a63d0e 100644 --- a/lua/app/config/grid_type.lua +++ b/lua/app/config/grid_type.lua @@ -489,7 +489,7 @@ local grid_type = { ["cant_link"]=1, ["element_invalid"]=1, ["break_sfx"]="sfx_piece_rongyan_b01", - ["effect"]=5, + ["effect"]=6, ["effect_sfx"]="sfx_piece_rongyan_b02", ["effect_trigger"]=1 }, @@ -506,7 +506,7 @@ local grid_type = { ["cant_link"]=1, ["element_invalid"]=1, ["break_sfx"]="sfx_piece_duwu_b01", - ["effect"]=5, + ["effect"]=6, ["effect_sfx"]="sfx_piece_duwu_b02", ["effect_trigger"]=1 } diff --git a/lua/app/config/skill.lua b/lua/app/config/skill.lua index 7dce5959..103a0c56 100644 --- a/lua/app/config/skill.lua +++ b/lua/app/config/skill.lua @@ -237,9 +237,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=5, - ["sound_hit"]={ - 1200120 - }, + ["sound"]=12001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300022, ["bullet_time"]={ @@ -1623,9 +1622,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=5, - ["sound_hit"]={ - 2200120 - }, + ["sound"]=22001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300009, ["bullet_time"]={ @@ -1721,9 +1719,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=5, - ["sound_hit"]={ - 2200120 - }, + ["sound"]=22001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300009, ["bullet_time"]={ @@ -2404,9 +2401,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=6, - ["sound_hit"]={ - 2400120 - }, + ["sound"]=24001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300032, ["bullet_time"]={ @@ -2548,9 +2544,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=6, - ["sound_hit"]={ - 2400120 - }, + ["sound"]=24001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300032, ["bullet_time"]={ @@ -2592,9 +2587,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=6, - ["sound_hit"]={ - 2400120 - }, + ["sound"]=24001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300032, ["bullet_time"]={ @@ -2944,9 +2938,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=6, - ["sound_hit"]={ - 3200120 - }, + ["sound"]=32001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300004, ["bullet_time"]={ @@ -3738,9 +3731,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=5, - ["sound_hit"]={ - 3400120 - }, + ["sound"]=34001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300092, ["bullet_time"]={ @@ -4226,9 +4218,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=6, - ["sound_hit"]={ - 4200120 - }, + ["sound"]=42001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_target"]=300014, ["bullet_time"]={ @@ -6187,11 +6178,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=6, - ["sound_hit"]={ - 54001201, - 0, - 54001203 - }, + ["sound"]=54001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300089, ["bullet_time"]={ @@ -6261,11 +6249,8 @@ local skill = { }, ["shake_time"]=200, ["shake_type"]=6, - ["sound_hit"]={ - 54001201, - 0, - 54001203 - }, + ["sound"]=54001200, + ["sound_delay"]=0, ["name_act"]="skill01", ["fx_self"]=300089, ["bullet_time"]={ diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index 91445e2b..23dbb608 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -12,7 +12,7 @@ local localization_global = ["BTN_TEXT_OK"] = "确定", ["BATTLE_DESC_1"] = "是否退出战斗", ["ITEM_NOT_ENOUGH"] = "{0}不足", - ["START_DESC"] = "SUI", + ["START_DESC"] = "开始", ["ELEMENT_NAME_1"] = "红色元素", ["ELEMENT_NAME_2"] = "金色元素", ["ELEMENT_NAME_3"] = "绿色元素", @@ -97,7 +97,7 @@ local localization_global = ["STR_UNLOCK"] = "解锁", ["TASK_DESC_1"] = "通行证专属任务", ["STR_COMPLETED"] = "已完成", - ["HERO_CARD_TIPS_DESC"] = "可能获得以下英雄卡牌:", + ["HERO_CARD_TIPS_DESC"] = "可能获得以下英雄碎片:", ["HERO_CARD_DESC_QLT_2"] = "优秀英雄", ["HERO_CARD_DESC_QLT_3"] = "稀有英雄", ["HERO_CARD_DESC_QLT_4"] = "史诗英雄", @@ -220,7 +220,7 @@ local localization_global = ["DUNGEON_GOLD_TITLE"] = "金币副本(需要包装)", ["DUNGEON_GOLD_HELP"] = "规定回合内击毁古代遗迹!", ["DUNGEON_GOLD_OPEN"] = "开启时间:周二、周四、周六、周日", - ["DUNGEON_OPEN"] = "开启时间:", + ["DUNGEON_OPEN"] = "开启时间:", ["FIRST_PASS"] = "首通", ["PASS_REQUIRE"] = "通关上一关卡解锁", ["DUNGEON_STAGE"] = "关卡", diff --git a/lua/app/config/strings/en/global.lua b/lua/app/config/strings/en/global.lua index 30ef1458..3a73bbd5 100644 --- a/lua/app/config/strings/en/global.lua +++ b/lua/app/config/strings/en/global.lua @@ -97,7 +97,7 @@ local localization_global = ["STR_UNLOCK"] = "Unlock", ["TASK_DESC_1"] = "Pass-exclusive Quest", ["STR_COMPLETED"] = "Completed", - ["HERO_CARD_TIPS_DESC"] = "Possible Hero Card Rewards:", + ["HERO_CARD_TIPS_DESC"] = "Possible Hero Shard Rewards:", ["HERO_CARD_DESC_QLT_2"] = "Uncommon Hero", ["HERO_CARD_DESC_QLT_3"] = "Rare Hero", ["HERO_CARD_DESC_QLT_4"] = "Epic Hero", diff --git a/lua/app/config/strings/zh/global.lua b/lua/app/config/strings/zh/global.lua index 7ac96024..c38b2e02 100644 --- a/lua/app/config/strings/zh/global.lua +++ b/lua/app/config/strings/zh/global.lua @@ -97,7 +97,7 @@ local localization_global = ["STR_UNLOCK"] = "解鎖", ["TASK_DESC_1"] = "通行證專屬任務", ["STR_COMPLETED"] = "已完成", - ["HERO_CARD_TIPS_DESC"] = "可能會獲得以下英雄卡牌:", + ["HERO_CARD_TIPS_DESC"] = "可能會獲得以下英雄碎片:", ["HERO_CARD_DESC_QLT_2"] = "優秀英雄", ["HERO_CARD_DESC_QLT_3"] = "稀有英雄", ["HERO_CARD_DESC_QLT_4"] = "史詩英雄", diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index 95c3a7ac..15f9caab 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -836,6 +836,7 @@ function BattleUnitComp:enterAssistingAttackState() local attackName = skill:getSkillAttackName() self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getKeyFrameTime(skill, 1, attackName) + self:playSkillSound(skill:getSkillSound(), skill:getSoundDelay()) self:playAnimation(attackName, false, false) self:playSkillFx(skill) self:initPosition() @@ -929,6 +930,7 @@ function BattleUnitComp:enterSkillAttackState() end self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getKeyFrameTime(skill, 1, attackName) + self:playSkillSound(skill:getSkillSound(), skill:getSoundDelay()) self:playAnimation(attackName, false, false) self:playSkillFx(skill) end @@ -1142,6 +1144,7 @@ function BattleUnitComp:doNextSkillAttack() self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getKeyFrameTime(self.currActiveSkill, 1, attackName) + self:playSkillSound(self.currActiveSkill:getSkillSound(), self.currActiveSkill:getSoundDelay()) self:playAnimation(attackName, false, false) self:playSkillFx(self.currActiveSkill) self.battleController:resetTimeSpeed() @@ -1155,6 +1158,7 @@ function BattleUnitComp:doNextNormalAttack() local attackName = skill:getSkillAttackName() self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getKeyFrameTime(skill, 1, attackName) + self:playSkillSound(skill:getSkillSound(), skill:getSoundDelay()) self:playAnimation(attackName, false, false) self:playSkillFx(skill) self:attackAndSpeedUp() @@ -1171,6 +1175,7 @@ function BattleUnitComp:doNextAttack() if attackName then self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getKeyFrameTime(skill, 1, attackName) + self:playSkillSound(skill:getSkillSound(), skill:getSoundDelay()) self:playAnimation(attackName, false, false) self:playSkillFx(skill) self:attackAndSpeedUp() @@ -1191,6 +1196,7 @@ function BattleUnitComp:doNextAttack() if attackName then self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getKeyFrameTime(self.currActiveSkill, 1, attackName) + self:playSkillSound(self.currActiveSkill:getSkillSound(), self.currActiveSkill:getSoundDelay()) self:playAnimation(attackName, false, false) self:playSkillFx(self.currActiveSkill) self.battleController:resetTimeSpeed() @@ -1224,6 +1230,7 @@ function BattleUnitComp:enterNormalAttackState() local attackName = skill:getSkillAttackName() self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getKeyFrameTime(skill, 1, attackName) + self:playSkillSound(skill:getSkillSound(), skill:getSoundDelay()) self:playAnimation(attackName, false, false) self:playSkillFx(skill) self:attackAndSpeedUp() @@ -1414,7 +1421,7 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx) end end if soundHit[soundIndex] and soundHit[soundIndex] > 0 then - BattleHelper:playSkillSound(soundHit[soundIndex], 0) + self:playSkillSound(soundHit[soundIndex], 0) end end end @@ -1733,6 +1740,14 @@ function BattleUnitComp:onRoundEnd() self.unitEntity:onRoundEnd() end +function BattleUnitComp:playSkillSound(soundName, delay) + if not soundName then + return + end + delay = delay or 0 + BattleHelper:playSkillSound(soundName, delay) +end + function BattleUnitComp:playSkillFx(skill) self:playSkillSelfFx(skill) self:playSkillTargetFx(skill) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 5a6b6d78..8aa379ac 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -366,8 +366,7 @@ function BattleController:prepareFight() end end UIManager:closeAllUI() - self.battleUI = UIManager:showUI(self:getBattleUIPath()) - self.battleUI:setController(self) + self.battleUI = UIManager:showUI(self:getBattleUIPath(), {battleController = self}) self.battleUI:addLoadUICompleteListener(function() BattleHelper:setEffectTextCache(self.battleUI:getBattleNumberRed(), self.battleUI:getBattleNumberGreen(), diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index 9095d731..2f978be5 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -35,6 +35,10 @@ function BattleUI:getBGMId() return AudioManager.BGM_ID.BATTLE end +function BattleUI:ctor(parmas) + self.battleController = parmas.battleController +end + function BattleUI:onLoadRootComplete() self:_display() self:_addListeners() @@ -888,10 +892,6 @@ function BattleUI:switchBoard(downCallback, callback, isFirst) end) end -function BattleUI:setController(controller) - self.battleController = controller -end - function BattleUI:showBoardMask(elementType, skillPosId) if not self.gridCells then return diff --git a/lua/app/userdata/battle/skill/battle_skill_entity.lua b/lua/app/userdata/battle/skill/battle_skill_entity.lua index d6b7959d..ac3817b6 100644 --- a/lua/app/userdata/battle/skill/battle_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_skill_entity.lua @@ -293,6 +293,14 @@ function BattleSkillEntity:getSoundHit() return self.skillInfo.sound_hit end +function BattleSkillEntity:getSoundDelay() + return self.skillInfo.sound_delay or 0 +end + +function BattleSkillEntity:getSkillSound() + return self.skillInfo.sound +end + function BattleSkillEntity:getRecordData(name) if self.recordData == nil then self.recordData = {}