Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev
This commit is contained in:
commit
003d962422
@ -1582,7 +1582,7 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d
|
||||
end
|
||||
local hpPercent = self.unitEntity:getHpPercent()
|
||||
self.battleController:refreshHp(self.side, hp, hpPercent)
|
||||
if not atker:getIsFinalBlock() then
|
||||
if not atker:getIsFinalBlock() or not self.battleController:getIsLastInstruction() then
|
||||
if damage < 0 then
|
||||
self:playHurt()
|
||||
end
|
||||
|
||||
@ -1234,6 +1234,14 @@ function BattleController:exeInstructions(callback)
|
||||
end
|
||||
end
|
||||
|
||||
function BattleController:getIsLastInstruction()
|
||||
if not self.instructions or not self.instructions[1] then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
function BattleController:generateBoard(isFirst)
|
||||
local boardList, _, mysteryBoxIndexMap = self:getInitBoard()
|
||||
if self.curBoardIndex and self.curBoardIndex >= #boardList then
|
||||
|
||||
@ -21,8 +21,19 @@ local _changeBaseSkill = function(skillId, skillInfo, battleData, battleControll
|
||||
if not battleData.atkTeam then
|
||||
return
|
||||
end
|
||||
if battleData.atkTeam:getAllMembers()[elementType] then
|
||||
battleData.atkTeam:getAllMembers()[elementType]:changeSkillId(skillId, newSkillId)
|
||||
local unitEntity = battleData.atkTeam:getAllMembers()[elementType]
|
||||
if unitEntity then
|
||||
unitEntity:changeSkillId(skillId, newSkillId)
|
||||
Logger.logHighlight("------------")
|
||||
Logger.printTable(skillEntity:getSkillRoundAdd())
|
||||
Logger.printTable(skillEntity:getSkillEffecuNumAdd())
|
||||
for effectType, effect in pairs(skillEntity:getSkillRoundAdd()) do -- 技能回合数
|
||||
unitEntity:addSkillRound(newSkillId, effect)
|
||||
end
|
||||
|
||||
for effectType, effect in pairs(skillEntity:getSkillEffecuNumAdd()) do -- 技能效果
|
||||
unitEntity:addSkillParams(newSkillId, effect)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -135,6 +146,7 @@ local _addSkillEffectParams = function(skillId, skillInfo, battleData, battleCon
|
||||
local skillEntity = battleData:getSkillEntityByElement(elementType)
|
||||
if skillEntity then
|
||||
local skillId = skillEntity:getSkillId()
|
||||
skillEntity:addSkillEffecuNumAdd(effect)
|
||||
if not battleData.atkTeam then
|
||||
return
|
||||
end
|
||||
@ -173,6 +185,7 @@ local _addSkillRound = function(skillId, skillInfo, battleData, battleController
|
||||
local skillEntity = battleData:getSkillEntityByElement(elementType)
|
||||
if skillEntity then
|
||||
local skillId = skillEntity:getSkillId()
|
||||
skillEntity:addSkillRoundAdd(effect)
|
||||
if not battleData.atkTeam then
|
||||
return
|
||||
end
|
||||
|
||||
@ -11,6 +11,8 @@ function BattleBoardSkillEntity:ctor(skillId)
|
||||
self.elementCountEffectEntities = {} -- 根据消除数量获得次数的技能效果 type = 13
|
||||
self.linkCountMoreEffects = {} -- 链接超过x元素获得一次技能效果 type = 14
|
||||
self.linkCountPowerEffects = {} -- 链接超过x元素获得倍数技能效果 type = 15
|
||||
self.skillEffectNumAdd = {} -- 技能效果参数增加 type = 7 用于技能替换时生效
|
||||
self.skillRoundAdd = {} -- 技能效果回合增加 type = 8 用于技能替换时生效
|
||||
|
||||
self.upSkillIdMap = {}
|
||||
self.getUpSkillKind = 0
|
||||
@ -446,4 +448,31 @@ function BattleBoardSkillEntity:getLinkCountPowerEffects()
|
||||
return self.linkCountPowerEffects
|
||||
end
|
||||
|
||||
function BattleBoardSkillEntity:addSkillEffecuNumAdd(effect)
|
||||
local effectInfo = self.skillEffectNumAdd[effect.type]
|
||||
if effectInfo then
|
||||
effectInfo.num = effectInfo.num + effect.num
|
||||
else
|
||||
self.skillEffectNumAdd[effect.type] = effect
|
||||
end
|
||||
end
|
||||
|
||||
function BattleBoardSkillEntity:getSkillEffecuNumAdd()
|
||||
return self.skillEffectNumAdd
|
||||
end
|
||||
|
||||
function BattleBoardSkillEntity:addSkillRoundAdd(effect)
|
||||
local effectInfo = self.skillRoundAdd[effect.type]
|
||||
if effectInfo then
|
||||
effectInfo.round = effectInfo.round + effect.round
|
||||
else
|
||||
self.skillRoundAdd[effect.type] = effect
|
||||
end
|
||||
end
|
||||
|
||||
function BattleBoardSkillEntity:getSkillRoundAdd()
|
||||
return self.skillRoundAdd
|
||||
end
|
||||
|
||||
|
||||
return BattleBoardSkillEntity
|
||||
Loading…
x
Reference in New Issue
Block a user