技能机制
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)
|
local mainComp = self:getOtherSideMainUnit(BattleConst.SIDE_DEF)
|
||||||
for _, effect in ipairs(instruction.effectList) do
|
for _, effect in ipairs(instruction.effectList) do
|
||||||
local target
|
local target
|
||||||
if effect:getTartgetSide() == BattleConst.SIDE_DEF then
|
if effect:getTargetSide() == BattleConst.SIDE_DEF then
|
||||||
target = defComp
|
target = defComp
|
||||||
elseif effect:getTartgetSide() == BattleConst.SIDE_ATK then
|
elseif effect:getTargetSide() == BattleConst.SIDE_ATK then
|
||||||
target = mainComp
|
target = mainComp
|
||||||
else
|
else
|
||||||
local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTartgetSide()]
|
local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTargetSide()]
|
||||||
if matchType then
|
if matchType then
|
||||||
target = self.atkTeam:getUnitComp()[matchType]
|
target = self.atkTeam:getUnitComp()[matchType]
|
||||||
end
|
end
|
||||||
|
|||||||
@ -186,21 +186,22 @@ local generateLinkCountMoreEffects = function(instructions, skillEntity, lineCou
|
|||||||
end
|
end
|
||||||
|
|
||||||
local generateLinkCountPowerEffects = function(instructions, skillEntity, lineCount)
|
local generateLinkCountPowerEffects = function(instructions, skillEntity, lineCount)
|
||||||
if not skillEntity:getLinkCountMoreEffects() then
|
Logger.logHighlight("generateLinkCountPowerEffects " .. table.nums(skillEntity:getLinkCountPowerEffects()))
|
||||||
|
if not skillEntity:getLinkCountPowerEffects() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local effectList
|
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
|
for index, info in pairs(list) do
|
||||||
if info.paramsCount and info.paramsCount <= lineCount then
|
if info.paramsCount and info.paramsCount <= lineCount then
|
||||||
local poser = lineCount // info.paramsCount
|
local power = lineCount // info.paramsCount
|
||||||
for i = 1, poser do
|
if not effectList then
|
||||||
if not effectList then
|
effectList = {}
|
||||||
effectList = {}
|
|
||||||
end
|
|
||||||
table.insert(effectList, info.buffEntity)
|
|
||||||
end
|
end
|
||||||
|
local newNum = info.originBuffEntity:getEffectNum() * power
|
||||||
|
info.useBuffEntity:setEffectNum(newNum)
|
||||||
|
table.insert(effectList, info.useBuffEntity)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -248,6 +249,8 @@ BattleInstructionsHelper.generateInstructions = function(skillEntity, elementTyp
|
|||||||
BattleInstructionsHelper._generateAttackInstructions(instructions, skillEntity, elementType, elementTypeCount)
|
BattleInstructionsHelper._generateAttackInstructions(instructions, skillEntity, elementType, elementTypeCount)
|
||||||
---- 加buff
|
---- 加buff
|
||||||
BattleInstructionsHelper._generateBuffInstructions(instructions, skillEntity, elementType, lineCount, influenceElementTypeMap, battleController)
|
BattleInstructionsHelper._generateBuffInstructions(instructions, skillEntity, elementType, lineCount, influenceElementTypeMap, battleController)
|
||||||
|
|
||||||
|
return instructions
|
||||||
end
|
end
|
||||||
|
|
||||||
return BattleInstructionsHelper
|
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
|
end
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTartgetSide()]
|
local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[skillInfo.obj]
|
||||||
if matchType then
|
if matchType then
|
||||||
target = battleController.atkTeam:getUnitComp()[matchType]
|
target = battleController.atkTeam:getUnitComp()[matchType]
|
||||||
end
|
end
|
||||||
|
|||||||
@ -420,13 +420,22 @@ function BattleBoardSkillEntity:addLinkCountPowerEffects(rogueSkill, index, effe
|
|||||||
local info = self.linkCountPowerEffects[rogueSkill][index]
|
local info = self.linkCountPowerEffects[rogueSkill][index]
|
||||||
if not info then
|
if not info then
|
||||||
info = {paramsCount = paramsCount}
|
info = {paramsCount = paramsCount}
|
||||||
info.buffEntity = BattleBuffEntity:create()
|
info.originBuffEntity = BattleBuffEntity:create()
|
||||||
info.buffEntity:init(effect, unitEntity)
|
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
|
self.linkCountPowerEffects[rogueSkill][index] = info
|
||||||
else
|
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
|
end
|
||||||
info.buffEntity:setTargetSide(targetSide)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEntity:removeLinkCountPowerEffects(rogueSkill)
|
function BattleBoardSkillEntity:removeLinkCountPowerEffects(rogueSkill)
|
||||||
|
|||||||
@ -78,7 +78,7 @@ function BattleBuffEntity:setRound(num)
|
|||||||
self.round = num
|
self.round = num
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBuffEntity:getTartgetSide()
|
function BattleBuffEntity:getTargetSide()
|
||||||
return self.targetSide
|
return self.targetSide
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user