fix bug
This commit is contained in:
parent
58f9825721
commit
9481bb830c
@ -2681,20 +2681,20 @@ local chapter = {
|
|||||||
28
|
28
|
||||||
},
|
},
|
||||||
["monster"]={
|
["monster"]={
|
||||||
4030101,
|
-- 4030101,
|
||||||
4030201,
|
-- 4030201,
|
||||||
4030301,
|
-- 4030301,
|
||||||
4030401,
|
-- 4030401,
|
||||||
4030501,
|
-- 4030501,
|
||||||
4030601,
|
-- 4030601,
|
||||||
4030701,
|
-- 4030701,
|
||||||
4030801,
|
-- 4030801,
|
||||||
4030901,
|
-- 4030901,
|
||||||
4031001,
|
-- 4031001,
|
||||||
4031101,
|
-- 4031101,
|
||||||
4031201,
|
-- 4031201,
|
||||||
4031301,
|
-- 4031301,
|
||||||
4031401,
|
-- 4031401,
|
||||||
4031501
|
4031501
|
||||||
},
|
},
|
||||||
["mystery_box"]={
|
["mystery_box"]={
|
||||||
|
|||||||
@ -679,6 +679,7 @@ local LocalizationGlobalConst =
|
|||||||
SUMMON_DESC_7 = "SUMMON_DESC_7",
|
SUMMON_DESC_7 = "SUMMON_DESC_7",
|
||||||
HERO_DESC_21 = "HERO_DESC_21",
|
HERO_DESC_21 = "HERO_DESC_21",
|
||||||
HERO_DESC_22 = "HERO_DESC_22",
|
HERO_DESC_22 = "HERO_DESC_22",
|
||||||
|
HERO_DESC_23 = "HERO_DESC_23",
|
||||||
}
|
}
|
||||||
|
|
||||||
return LocalizationGlobalConst
|
return LocalizationGlobalConst
|
||||||
@ -679,6 +679,7 @@ local localization_global =
|
|||||||
["SUMMON_DESC_7"] = "高级召唤",
|
["SUMMON_DESC_7"] = "高级召唤",
|
||||||
["HERO_DESC_21"] = "等级达到{0}可升星",
|
["HERO_DESC_21"] = "等级达到{0}可升星",
|
||||||
["HERO_DESC_22"] = "去升星",
|
["HERO_DESC_22"] = "去升星",
|
||||||
|
["HERO_DESC_23"] = "技能等级:{0}",
|
||||||
}
|
}
|
||||||
|
|
||||||
return localization_global
|
return localization_global
|
||||||
@ -198,7 +198,10 @@ function BattleBaseController:generateNextMonster()
|
|||||||
self.atkTeam:stopRunAction()
|
self.atkTeam:stopRunAction()
|
||||||
self:onRoundEnd(true)
|
self:onRoundEnd(true)
|
||||||
if isBoss then
|
if isBoss then
|
||||||
self:refreshBossSkill(unitEntity)
|
self:setBossSkillActive(true)
|
||||||
|
self:refreshBossSkill(unitEntity)
|
||||||
|
else
|
||||||
|
self:setBossSkillActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -223,7 +226,10 @@ function BattleBaseController:generateNextMonster()
|
|||||||
if count == 2 then
|
if count == 2 then
|
||||||
self:onRoundEnd(true)
|
self:onRoundEnd(true)
|
||||||
if isBoss then
|
if isBoss then
|
||||||
self:refreshBossSkill(unitEntity)
|
self:setBossSkillActive(true)
|
||||||
|
self:refreshBossSkill(unitEntity)
|
||||||
|
else
|
||||||
|
self:setBossSkillActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -635,12 +641,16 @@ function BattleBaseController:moveBattlefield(time)
|
|||||||
self.battleUI:moveBattlefield(time)
|
self.battleUI:moveBattlefield(time)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleBaseController:setBossSkillActive(active)
|
||||||
|
self.battleUI:setBossSkillActive(active)
|
||||||
|
end
|
||||||
|
|
||||||
function BattleBaseController:refreshBuff(side, buffList)
|
function BattleBaseController:refreshBuff(side, buffList)
|
||||||
self.battleUI:refreshBuff(side, buffList)
|
self.battleUI:refreshBuff(side, buffList)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBaseController:refreshBossSkill(unitEntity)
|
function BattleBaseController:refreshBossSkill(unitEntity)
|
||||||
local skillList = unitEntity:getSkillList()
|
local skillList = unitEntity:getActiveSkill()
|
||||||
self.battleUI:refreshBossSkill(skillList)
|
self.battleUI:refreshBossSkill(skillList)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -756,6 +766,7 @@ function BattleBaseController:initDefUnits(callback)
|
|||||||
monsterComp:initWithEntity(modelId, unitEntity, self)
|
monsterComp:initWithEntity(modelId, unitEntity, self)
|
||||||
self.defTeam:addUnit(monsterComp, true)
|
self.defTeam:addUnit(monsterComp, true)
|
||||||
self.battleUI:refreshDefHp(unitEntity:getHp(), unitEntity:getHpPercent())
|
self.battleUI:refreshDefHp(unitEntity:getHp(), unitEntity:getHpPercent())
|
||||||
|
self:setBossSkillActive(true)
|
||||||
self:refreshBossSkill(unitEntity)
|
self:refreshBossSkill(unitEntity)
|
||||||
callback()
|
callback()
|
||||||
end)
|
end)
|
||||||
@ -1156,6 +1167,8 @@ function BattleBaseController:enterBattleStep()
|
|||||||
local defAction = function()
|
local defAction = function()
|
||||||
self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_DEF_STEP
|
self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_DEF_STEP
|
||||||
self.defTeam:mainUnitUseAllSkills(BattleConst.ATTACK_ACTION_STATE.NORMAL, function()
|
self.defTeam:mainUnitUseAllSkills(BattleConst.ATTACK_ACTION_STATE.NORMAL, function()
|
||||||
|
local unitEntity = self.defTeam:getMainUnit().unitEntity
|
||||||
|
self:refreshBossSkill(unitEntity)
|
||||||
self:enterNextTeamAction()
|
self:enterNextTeamAction()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@ -1277,6 +1290,10 @@ function BattleBaseController:enterRoundEnd()
|
|||||||
|
|
||||||
self.atkTeam:onRoundEnd()
|
self.atkTeam:onRoundEnd()
|
||||||
self.defTeam:onRoundEnd()
|
self.defTeam:onRoundEnd()
|
||||||
|
local unitEntity = self.defTeam:getMainUnit().unitEntity
|
||||||
|
if unitEntity:getIsBoss() then
|
||||||
|
self:refreshBossSkill(unitEntity)
|
||||||
|
end
|
||||||
|
|
||||||
self:checkTeamIsDead(function() self:enterNextWave() end, function()
|
self:checkTeamIsDead(function() self:enterNextWave() end, function()
|
||||||
self:onRoundEnd()
|
self:onRoundEnd()
|
||||||
|
|||||||
@ -505,6 +505,13 @@ function BattleBaseUI:clearBuff(side)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleBaseUI:setBossSkillActive(active)
|
||||||
|
local skillCellCount = #self.bossSkillCells
|
||||||
|
for i = 1, skillCellCount do
|
||||||
|
self.bossSkillCells[i]:setActive(active)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function BattleBaseUI:refreshBossSkill(skillList)
|
function BattleBaseUI:refreshBossSkill(skillList)
|
||||||
if not self.bossSkillCells then
|
if not self.bossSkillCells then
|
||||||
return
|
return
|
||||||
|
|||||||
@ -8,16 +8,16 @@ function BossSkillCell:init()
|
|||||||
end)
|
end)
|
||||||
local uiMap = self:getUIMap()
|
local uiMap = self:getUIMap()
|
||||||
self.icon = uiMap["boss_skill_cell.icon"]
|
self.icon = uiMap["boss_skill_cell.icon"]
|
||||||
local value = uiMap["boss_skill_cell.value"]
|
self.roundTx = uiMap["boss_skill_cell.round_text"]
|
||||||
local count = uiMap["boss_skill_cell.count"]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function BossSkillCell:refresh(skillId)
|
function BossSkillCell:refresh(skillEntity)
|
||||||
print("=============================== skillId = %s", skillId)
|
local skillId = skillEntity:getSkillId()
|
||||||
|
local cd = skillEntity:getShowCd()
|
||||||
self.skillId = skillId
|
self.skillId = skillId
|
||||||
-- self.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL, self.lastSkillIcon)
|
|
||||||
local icon = ModuleManager.HeroManager:getSkillIcon(skillId)
|
local icon = ModuleManager.HeroManager:getSkillIcon(skillId)
|
||||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL, icon)
|
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL, icon)
|
||||||
|
self.roundTx:setText(cd + 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BossSkillCell:setActive(active)
|
function BossSkillCell:setActive(active)
|
||||||
|
|||||||
@ -76,12 +76,11 @@ end
|
|||||||
|
|
||||||
function HeroSkillInfoUI:refreshSkillIcon()
|
function HeroSkillInfoUI:refreshSkillIcon()
|
||||||
local skillInfo, currIdx = self.heroEntity:getRogueSkillListByIdx(self.idx)
|
local skillInfo, currIdx = self.heroEntity:getRogueSkillListByIdx(self.idx)
|
||||||
self.titleTx:setText(currIdx .. "/" .. #skillInfo)
|
|
||||||
|
|
||||||
local lv = self.heroEntity:getLv()
|
local lv = self.heroEntity:getLv()
|
||||||
local skillUnlcokLv = skillInfo[1][1]
|
local skillUnlcokLv = skillInfo[1][1]
|
||||||
local skillId = skillInfo[1][2]
|
local skillId = skillInfo[1][2]
|
||||||
-- self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_4))
|
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_23, currIdx .. "/" .. #skillInfo))
|
||||||
|
|
||||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
|
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
|
||||||
if skillUnlcokLv > lv then
|
if skillUnlcokLv > lv then
|
||||||
|
|||||||
@ -128,6 +128,10 @@ function BattleSkillEntity:getIsAvailable()
|
|||||||
return self.cd == 0
|
return self.cd == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleSkillEntity:getShowCd()
|
||||||
|
return self.cd
|
||||||
|
end
|
||||||
|
|
||||||
-- 技能释放完毕
|
-- 技能释放完毕
|
||||||
function BattleSkillEntity:endUse()
|
function BattleSkillEntity:endUse()
|
||||||
self.cd = self.coolingRounds
|
self.cd = self.coolingRounds
|
||||||
|
|||||||
@ -170,6 +170,10 @@ function BattleUnitEntity:getNormalSkill(reRandom)
|
|||||||
return self.normalSkill
|
return self.normalSkill
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleUnitEntity:getActiveSkill()
|
||||||
|
return self.activeSkills
|
||||||
|
end
|
||||||
|
|
||||||
function BattleUnitEntity:getActiveSkillCount()
|
function BattleUnitEntity:getActiveSkillCount()
|
||||||
return #self.activeSkills
|
return #self.activeSkills
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user