技能机制
This commit is contained in:
parent
8316e48633
commit
ff56360efa
@ -2440,12 +2440,12 @@ local function _addCurRoundAttr(self, instruction, callback)
|
||||
local mainComp = self:getOtherSideMainUnit(BattleConst.SIDE_DEF)
|
||||
for _, effect in ipairs(instruction.effectList) do
|
||||
local target
|
||||
if effect:getTartgetSide() == BattleConst.SIDE_DEF then
|
||||
if effect:getTargetSide() == BattleConst.SIDE_DEF then
|
||||
target = defComp
|
||||
elseif effect:getTartgetSide() == BattleConst.SIDE_ATK then
|
||||
elseif effect:getTargetSide() == BattleConst.SIDE_ATK then
|
||||
target = mainComp
|
||||
else
|
||||
local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTartgetSide()]
|
||||
local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTargetSide()]
|
||||
if matchType then
|
||||
target = self.atkTeam:getUnitComp()[matchType]
|
||||
end
|
||||
|
||||
@ -186,21 +186,22 @@ local generateLinkCountMoreEffects = function(instructions, skillEntity, lineCou
|
||||
end
|
||||
|
||||
local generateLinkCountPowerEffects = function(instructions, skillEntity, lineCount)
|
||||
if not skillEntity:getLinkCountMoreEffects() then
|
||||
Logger.logHighlight("generateLinkCountPowerEffects " .. table.nums(skillEntity:getLinkCountPowerEffects()))
|
||||
if not skillEntity:getLinkCountPowerEffects() then
|
||||
return
|
||||
end
|
||||
|
||||
local effectList
|
||||
for rogueSkill, list in pairs(skillEntity:getLinkCountMoreEffects()) do
|
||||
for rogueSkill, list in pairs(skillEntity:getLinkCountPowerEffects()) do
|
||||
for index, info in pairs(list) do
|
||||
if info.paramsCount and info.paramsCount <= lineCount then
|
||||
local poser = lineCount // info.paramsCount
|
||||
for i = 1, poser do
|
||||
if not effectList then
|
||||
effectList = {}
|
||||
end
|
||||
table.insert(effectList, info.buffEntity)
|
||||
local power = lineCount // info.paramsCount
|
||||
if not effectList then
|
||||
effectList = {}
|
||||
end
|
||||
local newNum = info.originBuffEntity:getEffectNum() * power
|
||||
info.useBuffEntity:setEffectNum(newNum)
|
||||
table.insert(effectList, info.useBuffEntity)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -248,6 +249,8 @@ BattleInstructionsHelper.generateInstructions = function(skillEntity, elementTyp
|
||||
BattleInstructionsHelper._generateAttackInstructions(instructions, skillEntity, elementType, elementTypeCount)
|
||||
---- 加buff
|
||||
BattleInstructionsHelper._generateBuffInstructions(instructions, skillEntity, elementType, lineCount, influenceElementTypeMap, battleController)
|
||||
|
||||
return instructions
|
||||
end
|
||||
|
||||
return BattleInstructionsHelper
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6fd938e7da92c8e4e9a0b7560081b1cd
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||
@ -209,7 +209,7 @@ local _addSkillEffect = function(skillId, skillInfo, battleData, battleControlle
|
||||
end
|
||||
return
|
||||
else
|
||||
local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTartgetSide()]
|
||||
local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[skillInfo.obj]
|
||||
if matchType then
|
||||
target = battleController.atkTeam:getUnitComp()[matchType]
|
||||
end
|
||||
|
||||
@ -420,13 +420,22 @@ function BattleBoardSkillEntity:addLinkCountPowerEffects(rogueSkill, index, effe
|
||||
local info = self.linkCountPowerEffects[rogueSkill][index]
|
||||
if not info then
|
||||
info = {paramsCount = paramsCount}
|
||||
info.buffEntity = BattleBuffEntity:create()
|
||||
info.buffEntity:init(effect, unitEntity)
|
||||
info.originBuffEntity = BattleBuffEntity:create()
|
||||
info.originBuffEntity:init(effect, unitEntity)
|
||||
info.originBuffEntity:setTargetSide(targetSide)
|
||||
|
||||
info.useBuffEntity = BattleBuffEntity:create()
|
||||
info.useBuffEntity:init(effect, unitEntity)
|
||||
info.useBuffEntity:setTargetSide(targetSide)
|
||||
|
||||
self.linkCountPowerEffects[rogueSkill][index] = info
|
||||
else
|
||||
info.buffEntity:init(effect, unitEntity)
|
||||
info.originBuffEntity:init(effect, unitEntity)
|
||||
info.originBuffEntity:setTargetSide(targetSide)
|
||||
|
||||
info.useBuffEntity:init(effect, unitEntity)
|
||||
info.useBuffEntity:setTargetSide(targetSide)
|
||||
end
|
||||
info.buffEntity:setTargetSide(targetSide)
|
||||
end
|
||||
|
||||
function BattleBoardSkillEntity:removeLinkCountPowerEffects(rogueSkill)
|
||||
|
||||
@ -78,7 +78,7 @@ function BattleBuffEntity:setRound(num)
|
||||
self.round = num
|
||||
end
|
||||
|
||||
function BattleBuffEntity:getTartgetSide()
|
||||
function BattleBuffEntity:getTargetSide()
|
||||
return self.targetSide
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user