技能图标变形
This commit is contained in:
parent
7ee1d620bb
commit
bfb9f9834f
@ -1166,6 +1166,11 @@ function BattleController:onSelectSkill(skillId)
|
|||||||
self.battleData:addSkillCount(skillId)
|
self.battleData:addSkillCount(skillId)
|
||||||
BATTLE_ROGUE_SKILL_HANDLE.takeEffect(skillId, self.battleData, self)
|
BATTLE_ROGUE_SKILL_HANDLE.takeEffect(skillId, self.battleData, self)
|
||||||
|
|
||||||
|
local skillEntities = self.battleData:getSkillEntities()
|
||||||
|
for _, entity in pairs(skillEntities) do
|
||||||
|
entity:gotUpSKill(skillId)
|
||||||
|
end
|
||||||
|
|
||||||
if self.battleData:useAddlvCount() then
|
if self.battleData:useAddlvCount() then
|
||||||
ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList())
|
ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList())
|
||||||
else
|
else
|
||||||
@ -1174,6 +1179,7 @@ function BattleController:onSelectSkill(skillId)
|
|||||||
|
|
||||||
if self.battleUI then
|
if self.battleUI then
|
||||||
self.battleUI:refreshBoard()
|
self.battleUI:refreshBoard()
|
||||||
|
self.battleUI:refreshSkill()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@ function BattleResultUI:refreshVictoryNode()
|
|||||||
uiMap["battle_result_ui.mask_d"]:setActive(false)
|
uiMap["battle_result_ui.mask_d"]:setActive(false)
|
||||||
uiMap["battle_result_ui.defeat_node"]:setActive(false)
|
uiMap["battle_result_ui.defeat_node"]:setActive(false)
|
||||||
uiMap["battle_result_ui.victory_node"]:setActive(true)
|
uiMap["battle_result_ui.victory_node"]:setActive(true)
|
||||||
uiMap["battle_result_ui.victory_node.title_bg.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_6))
|
uiMap["battle_result_ui.victory_node.title_bg.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_5))
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleResultUI:refreshDefeatNode()
|
function BattleResultUI:refreshDefeatNode()
|
||||||
|
|||||||
@ -36,6 +36,7 @@ function BattleData:initRogueSkills()
|
|||||||
local skillId = heroEntity:getActiveSkill()
|
local skillId = heroEntity:getActiveSkill()
|
||||||
local cfg = SKILL_CFG[skillId]
|
local cfg = SKILL_CFG[skillId]
|
||||||
self.skillMap[cfg.position] = BATTLE_BOARD_SKILL_ENTITY:create(skillId)
|
self.skillMap[cfg.position] = BATTLE_BOARD_SKILL_ENTITY:create(skillId)
|
||||||
|
self.skillMap[cfg.position]:addUpSkills(heroEntity:getRogueSkillList())
|
||||||
for _, id in ipairs(heroEntity:getActiveTogueSkills()) do
|
for _, id in ipairs(heroEntity:getActiveTogueSkills()) do
|
||||||
if not skillmap[id] then
|
if not skillmap[id] then
|
||||||
table.insert(self.skillPool, id)
|
table.insert(self.skillPool, id)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
local BattleBoardSkillEnity = class("BattleBoardSkillEnity", BaseData)
|
local BattleBoardSkillEntity = class("BattleBoardSkillEntity", BaseData)
|
||||||
local BattleBuffEntity = require "app/userdata/battle/skill/battle_buff_entity"
|
local BattleBuffEntity = require "app/userdata/battle/skill/battle_buff_entity"
|
||||||
|
|
||||||
function BattleBoardSkillEnity:ctor(skillId)
|
function BattleBoardSkillEntity:ctor(skillId)
|
||||||
self:refreshSkillId(skillId)
|
self:refreshSkillId(skillId)
|
||||||
self.curEnergy = 0
|
self.curEnergy = 0
|
||||||
self.addRange = {}
|
self.addRange = {}
|
||||||
@ -10,9 +10,12 @@ function BattleBoardSkillEnity:ctor(skillId)
|
|||||||
self.generalAttackEffectEntities = {}
|
self.generalAttackEffectEntities = {}
|
||||||
self.elementCountEffectEntities = {}
|
self.elementCountEffectEntities = {}
|
||||||
self.cacheBuffEntities = {}
|
self.cacheBuffEntities = {}
|
||||||
|
|
||||||
|
self.upSkillIdMap = {}
|
||||||
|
self.getUpSkillKind = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:refreshSkillId(skillId)
|
function BattleBoardSkillEntity:refreshSkillId(skillId)
|
||||||
if self.skillId and self.skillId > skillId then
|
if self.skillId and self.skillId > skillId then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -20,46 +23,46 @@ function BattleBoardSkillEnity:refreshSkillId(skillId)
|
|||||||
self.config = ConfigManager:getConfig("skill")[skillId]
|
self.config = ConfigManager:getConfig("skill")[skillId]
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getSkillId()
|
function BattleBoardSkillEntity:getSkillId()
|
||||||
return self.skillId
|
return self.skillId
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getNeedEnergy()
|
function BattleBoardSkillEntity:getNeedEnergy()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
return self.config.energy
|
return self.config.energy
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getPosition()
|
function BattleBoardSkillEntity:getPosition()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
return self.config.position
|
return self.config.position
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getMethond()
|
function BattleBoardSkillEntity:getMethond()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return self.config.method
|
return self.config.method
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getSkillType()
|
function BattleBoardSkillEntity:getSkillType()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return self.config.skill_type
|
return self.config.skill_type
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getSkillTypeParameter()
|
function BattleBoardSkillEntity:getSkillTypeParameter()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return self.config.skill_type_parameter
|
return self.config.skill_type_parameter
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getBoardRange()
|
function BattleBoardSkillEntity:getBoardRange()
|
||||||
if not self.config or not self.config.boardrange then
|
if not self.config or not self.config.boardrange then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -79,7 +82,7 @@ function BattleBoardSkillEnity:getBoardRange()
|
|||||||
return boardRangeList
|
return boardRangeList
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:addBoardRange(range)
|
function BattleBoardSkillEntity:addBoardRange(range)
|
||||||
for _, info in ipairs(range) do
|
for _, info in ipairs(range) do
|
||||||
if self.addRange[info.type] then
|
if self.addRange[info.type] then
|
||||||
self.addRange[info.type] = self.addRange[info.type] + info.range
|
self.addRange[info.type] = self.addRange[info.type] + info.range
|
||||||
@ -92,46 +95,50 @@ function BattleBoardSkillEnity:addBoardRange(range)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getEffect()
|
function BattleBoardSkillEntity:getEffect()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return self.config.effect
|
return self.config.effect
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getTartget()
|
function BattleBoardSkillEntity:getTartget()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return self.config.obj
|
return self.config.obj
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getIcon()
|
function BattleBoardSkillEntity:getIcon()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return self.config.icon
|
return self.config.icon
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getBattleIcon()
|
function BattleBoardSkillEntity:getBattleIcon()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return tostring(self.config.battle_icon)
|
if self.getUpSkillKind > 0 then
|
||||||
|
return tostring(self.config.battle_icon) .. "_" .. self.getUpSkillKind
|
||||||
|
else
|
||||||
|
return tostring(self.config.battle_icon)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getNameAct()
|
function BattleBoardSkillEntity:getNameAct()
|
||||||
if not self.config then
|
if not self.config then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return self.config.name_act
|
return self.config.name_act
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getEnergy()
|
function BattleBoardSkillEntity:getEnergy()
|
||||||
return self.curEnergy
|
return self.curEnergy
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getEnergyEnough(onlyGetBool)
|
function BattleBoardSkillEntity:getEnergyEnough(onlyGetBool)
|
||||||
local enough = self.curEnergy >= self:getNeedEnergy()
|
local enough = self.curEnergy >= self:getNeedEnergy()
|
||||||
if enough and not onlyGetBool then
|
if enough and not onlyGetBool then
|
||||||
self:clearEnergy()
|
self:clearEnergy()
|
||||||
@ -139,27 +146,27 @@ function BattleBoardSkillEnity:getEnergyEnough(onlyGetBool)
|
|||||||
return enough
|
return enough
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:addEnergy(count)
|
function BattleBoardSkillEntity:addEnergy(count)
|
||||||
self.curEnergy = self.curEnergy + count
|
self.curEnergy = self.curEnergy + count
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:clearEnergy()
|
function BattleBoardSkillEntity:clearEnergy()
|
||||||
self.curEnergy = 0
|
self.curEnergy = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getIgnoreElementType()
|
function BattleBoardSkillEntity:getIgnoreElementType()
|
||||||
return self.ignoreElementType
|
return self.ignoreElementType
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:setIgnoreElementType(ignore)
|
function BattleBoardSkillEntity:setIgnoreElementType(ignore)
|
||||||
self.ignoreElementType = ignore
|
self.ignoreElementType = ignore
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getLinkEffects()
|
function BattleBoardSkillEntity:getLinkEffects()
|
||||||
return self.linkEffectEntities
|
return self.linkEffectEntities
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:addLinkEffect(effect, unitEntity, targetSide)
|
function BattleBoardSkillEntity:addLinkEffect(effect, unitEntity, targetSide)
|
||||||
effect = GFunc.getTable(effect)
|
effect = GFunc.getTable(effect)
|
||||||
local buffEntities = self.linkEffectEntities[effect.type]
|
local buffEntities = self.linkEffectEntities[effect.type]
|
||||||
if not buffEntities then
|
if not buffEntities then
|
||||||
@ -187,11 +194,11 @@ function BattleBoardSkillEnity:addLinkEffect(effect, unitEntity, targetSide)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getInInfluenceEffects()
|
function BattleBoardSkillEntity:getInInfluenceEffects()
|
||||||
return self.inInfluenceEntities
|
return self.inInfluenceEntities
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:addInInfluenceEffect(effect, unitEntity, targetSide)
|
function BattleBoardSkillEntity:addInInfluenceEffect(effect, unitEntity, targetSide)
|
||||||
effect = GFunc.getTable(effect)
|
effect = GFunc.getTable(effect)
|
||||||
local buffEntities = self.inInfluenceEntities[effect.type]
|
local buffEntities = self.inInfluenceEntities[effect.type]
|
||||||
if not buffEntities then
|
if not buffEntities then
|
||||||
@ -219,7 +226,7 @@ function BattleBoardSkillEnity:addInInfluenceEffect(effect, unitEntity, targetSi
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:addGeneralAttackEffect(effect, unitEntity, targetSide)
|
function BattleBoardSkillEntity:addGeneralAttackEffect(effect, unitEntity, targetSide)
|
||||||
local buffEntity = self.generalAttackEffectEntities[effect.type]
|
local buffEntity = self.generalAttackEffectEntities[effect.type]
|
||||||
if not buffEntity then
|
if not buffEntity then
|
||||||
buffEntity = BattleBuffEntity:create()
|
buffEntity = BattleBuffEntity:create()
|
||||||
@ -233,11 +240,11 @@ function BattleBoardSkillEnity:addGeneralAttackEffect(effect, unitEntity, target
|
|||||||
buffEntity:setTargetSide(targetSide)
|
buffEntity:setTargetSide(targetSide)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getGeneralAttackEffect()
|
function BattleBoardSkillEntity:getGeneralAttackEffect()
|
||||||
return self.generalAttackEffectEntities
|
return self.generalAttackEffectEntities
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:addElementCountEffect(effect, unitEntity, targetSide)
|
function BattleBoardSkillEntity:addElementCountEffect(effect, unitEntity, targetSide)
|
||||||
local buffEntities = self.elementCountEffectEntities[effect.type]
|
local buffEntities = self.elementCountEffectEntities[effect.type]
|
||||||
if not buffEntities then
|
if not buffEntities then
|
||||||
self.elementCountEffectEntities[effect.type] = {}
|
self.elementCountEffectEntities[effect.type] = {}
|
||||||
@ -266,11 +273,11 @@ function BattleBoardSkillEnity:addElementCountEffect(effect, unitEntity, targetS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getElementCountEffect()
|
function BattleBoardSkillEntity:getElementCountEffect()
|
||||||
return self.elementCountEffectEntities
|
return self.elementCountEffectEntities
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:addBuffEffect(buff, unitEntity)
|
function BattleBoardSkillEntity:addBuffEffect(buff, unitEntity)
|
||||||
local buffEntity = self.cacheBuffEntities[buff.type]
|
local buffEntity = self.cacheBuffEntities[buff.type]
|
||||||
if not buffEntity then
|
if not buffEntity then
|
||||||
buffEntity = BattleBuffEntity:create()
|
buffEntity = BattleBuffEntity:create()
|
||||||
@ -283,8 +290,29 @@ function BattleBoardSkillEnity:addBuffEffect(buff, unitEntity)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEnity:getBuffEffects()
|
function BattleBoardSkillEntity:getBuffEffects()
|
||||||
return self.cacheBuffEntities
|
return self.cacheBuffEntities
|
||||||
end
|
end
|
||||||
|
|
||||||
return BattleBoardSkillEnity
|
function BattleBoardSkillEntity:addUpSkills(skillList)
|
||||||
|
for _, skillId in ipairs(skillList) do
|
||||||
|
self.upSkillIdMap[skillId] = false
|
||||||
|
end
|
||||||
|
self.getUpSkillKind = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function BattleBoardSkillEntity:gotUpSKill(skillId)
|
||||||
|
if self.upSkillIdMap[skillId] == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self.upSkillIdMap[skillId] then
|
||||||
|
self.getUpSkillKind = self.getUpSkillKind + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
self.upSkillIdMap[skillId] = true
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return BattleBoardSkillEntity
|
||||||
Loading…
x
Reference in New Issue
Block a user