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