Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev
This commit is contained in:
commit
92edaa2a73
@ -781,7 +781,22 @@ function BattleController:generateInstructions(skillEntity, elementType, lineCou
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 其他的buff
|
--
|
||||||
|
if skillEntity:getSkillAttackBeforeEffects() and elementType then
|
||||||
|
local effectList
|
||||||
|
for type, buffEntity in pairs(skillEntity:getSkillAttackBeforeEffects()) do
|
||||||
|
if not effectList then
|
||||||
|
effectList = {}
|
||||||
|
end
|
||||||
|
table.insert(effectList, buffEntity)
|
||||||
|
end
|
||||||
|
if effectList then
|
||||||
|
table.insert(self.instructions, {
|
||||||
|
name = BattleConst.INSTRUCTION_NAME.ADD_CUR_ROUND_ATTR,
|
||||||
|
effectList = effectList
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1231,10 +1246,6 @@ function BattleController:addHeroAttr(attrName, value)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleController:addSkillEffect(elementType, effects)
|
|
||||||
Logger.logHighlight("------addSkillEffect------ " .. elementType .. " " .. json.encode(effects))
|
|
||||||
end
|
|
||||||
|
|
||||||
---- 快照一次棋盘
|
---- 快照一次棋盘
|
||||||
function BattleController:snapshotBoard()
|
function BattleController:snapshotBoard()
|
||||||
local snapshot = {}
|
local snapshot = {}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
local BattleConst = require "app/module/battle/battle_const"
|
local BattleConst = require "app/module/battle/battle_const"
|
||||||
local SKILL_ROGUE_CFG = ConfigManager:getConfig("skill_rogue")
|
local SKILL_ROGUE_CFG = ConfigManager:getConfig("skill_rogue")
|
||||||
|
local BattleBuffEntity = require "app/userdata/battle/skill/battle_buff_entity"
|
||||||
|
|
||||||
local BattleRogueSkillHandle = {}
|
local BattleRogueSkillHandle = {}
|
||||||
|
|
||||||
@ -97,28 +98,6 @@ local _addAttr = function(skillInfo, battleData, battleController)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local _addSkillReleaseCount = function(skillInfo, battleData, battleController)
|
|
||||||
local elementType = skillInfo.skill_position
|
|
||||||
if not elementType or not skillInfo.parameter then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local count = skillInfo.parameter[1]
|
|
||||||
if not count then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local unitEntity = battleController.battleData.atkTeam:getAllMembers()[elementType]
|
|
||||||
if not unitEntity then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local skillEntity = battleData:getSkillEntityByElement(elementType)
|
|
||||||
if skillEntity then
|
|
||||||
local skillId = skillEntity:getSkillId()
|
|
||||||
unitEntity:addSkillExtraUseTimes(skillId, count)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local _addSkillEffectParams = function(skillInfo, battleData, battleController)
|
local _addSkillEffectParams = function(skillInfo, battleData, battleController)
|
||||||
local elementType = skillInfo.skill_position
|
local elementType = skillInfo.skill_position
|
||||||
if not elementType or not skillInfo.parameter then
|
if not elementType or not skillInfo.parameter then
|
||||||
@ -196,8 +175,7 @@ local _addSkillRound = function(skillInfo, battleData, battleController)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local _addSkillEffect = function(skillInfo, battleData, battleController)
|
local _addSkillEffect = function(skillInfo, battleData, battleController)
|
||||||
local elementType = skillInfo.skill_position
|
if not skillInfo.effect then
|
||||||
if not elementType or not skillInfo.effect then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -206,7 +184,19 @@ local _addSkillEffect = function(skillInfo, battleData, battleController)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
battleController:addSkillEffect(elementType, effects)
|
local atkComp = battleController.atkTeam:getMainUnit()
|
||||||
|
local defComp = battleController.defTeam:getMainUnit()
|
||||||
|
for _, effect in ipairs(effects) do
|
||||||
|
local target = atkComp
|
||||||
|
if skillInfo.obj == BattleConst.SIDE_DEF then
|
||||||
|
target = defComp
|
||||||
|
end
|
||||||
|
local buffEntity = BattleBuffEntity:create()
|
||||||
|
buffEntity:init(effect, atkComp.unitEntity)
|
||||||
|
buffEntity:setTargetSide(skillInfo.obj)
|
||||||
|
|
||||||
|
atkComp:takeEffect(buffEntity, target)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local _addSkillInInfluenceAtkp = function(skillInfo, battleData, battleController)
|
local _addSkillInInfluenceAtkp = function(skillInfo, battleData, battleController)
|
||||||
@ -230,7 +220,7 @@ local _addSkillInInfluenceAtkp = function(skillInfo, battleData, battleControlle
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local _addSkillGeneralAttackEffect = function(skillInfo, battleData, battleController)
|
local _addSkillAttackBeforeEffect = function(skillInfo, battleData, battleController)
|
||||||
local elementType = skillInfo.skill_position
|
local elementType = skillInfo.skill_position
|
||||||
if not elementType or not skillInfo.effect then
|
if not elementType or not skillInfo.effect then
|
||||||
return
|
return
|
||||||
@ -248,7 +238,7 @@ local _addSkillGeneralAttackEffect = function(skillInfo, battleData, battleContr
|
|||||||
local entity = battleData:getSkillEntityByElement(elementType)
|
local entity = battleData:getSkillEntityByElement(elementType)
|
||||||
if entity then
|
if entity then
|
||||||
for _, effect in ipairs(skillInfo.effect) do
|
for _, effect in ipairs(skillInfo.effect) do
|
||||||
entity:addGeneralAttackEffect(effect, unitEntity, skillInfo.obj)
|
entity:addSkillAttackBeforeEffect(effect, unitEntity, skillInfo.obj)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -282,13 +272,13 @@ BattleRogueSkillHandle._effectOn = {
|
|||||||
[3] = _addLinkAtkp, -- 增加链接伤害
|
[3] = _addLinkAtkp, -- 增加链接伤害
|
||||||
[4] = _canLinkAnyElement, -- 可与任何技能连接
|
[4] = _canLinkAnyElement, -- 可与任何技能连接
|
||||||
[5] = _addAttr, -- 纯粹增加属性
|
[5] = _addAttr, -- 纯粹增加属性
|
||||||
[6] = _addSkillReleaseCount, -- 技能增加释放次数
|
-- [6] = _addSkillReleaseCount, -- 技能增加释放次数
|
||||||
[7] = _addSkillEffectParams, -- 增加技能效果参数(比如护盾的承伤增加)
|
[7] = _addSkillEffectParams, -- 增加技能效果参数(比如护盾的承伤增加)
|
||||||
[8] = _addSkillRound, -- 增加技能效果持续回合(比如护盾从1回合改为2回合)
|
[8] = _addSkillRound, -- 增加技能效果持续回合(比如护盾从1回合改为2回合)
|
||||||
[9] = _addSkillEffect, -- 获得技能效果
|
[9] = _addSkillEffect, -- 获得技能效果
|
||||||
[10] = _changeElementType, -- 将场上随机几个元素变为某元素
|
[10] = _changeElementType, -- 将场上随机几个元素变为某元素
|
||||||
[11] = _addSkillInInfluenceAtkp, -- 技能消除的增加伤害
|
[11] = _addSkillInInfluenceAtkp, -- 技能消除的增加伤害
|
||||||
[12] = _addSkillGeneralAttackEffect, -- 技能链接中的每一个元素,都触发的技能效果
|
[12] = _addSkillAttackBeforeEffect, -- 技能触发前的技能效果
|
||||||
[13] = _addSkillElementCountEffect, -- 技能链接中每一个元素累加的技能效果
|
[13] = _addSkillElementCountEffect, -- 技能链接中每一个元素累加的技能效果
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ function BattleBoardSkillEntity:ctor(skillId)
|
|||||||
self.addRange = {}
|
self.addRange = {}
|
||||||
self.linkEffectEntities = {}
|
self.linkEffectEntities = {}
|
||||||
self.inInfluenceEntities = {}
|
self.inInfluenceEntities = {}
|
||||||
self.generalAttackEffectEntities = {}
|
self.skillAttackBeforeEffectEntities = {}
|
||||||
self.elementCountEffectEntities = {}
|
self.elementCountEffectEntities = {}
|
||||||
self.cacheBuffEntities = {}
|
self.cacheBuffEntities = {}
|
||||||
|
|
||||||
@ -226,22 +226,20 @@ function BattleBoardSkillEntity:addInInfluenceEffect(effect, unitEntity, targetS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEntity:addGeneralAttackEffect(effect, unitEntity, targetSide)
|
function BattleBoardSkillEntity:addSkillAttackBeforeEffect(effect, unitEntity, targetSide)
|
||||||
local buffEntity = self.generalAttackEffectEntities[effect.type]
|
local buffEntity = self.skillAttackBeforeEffectEntities[effect.type]
|
||||||
if not buffEntity then
|
if not buffEntity then
|
||||||
buffEntity = BattleBuffEntity:create()
|
buffEntity = BattleBuffEntity:create()
|
||||||
buffEntity:init(effect, unitEntity)
|
buffEntity:init(effect, unitEntity)
|
||||||
self.generalAttackEffectEntities[effect.type] = buffEntity
|
self.skillAttackBeforeEffectEntities[effect.type] = buffEntity
|
||||||
else
|
else
|
||||||
local buffNum = buffEntity:getEffectNum()
|
|
||||||
buffEntity:init(effect, unitEntity)
|
buffEntity:init(effect, unitEntity)
|
||||||
buffEntity:setEffectNum(buffEntity:getEffectNum() + buffNum)
|
|
||||||
end
|
end
|
||||||
buffEntity:setTargetSide(targetSide)
|
buffEntity:setTargetSide(targetSide)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEntity:getGeneralAttackEffect()
|
function BattleBoardSkillEntity:getSkillAttackBeforeEffects()
|
||||||
return self.generalAttackEffectEntities
|
return self.skillAttackBeforeEffectEntities
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBoardSkillEntity:addElementCountEffect(effect, unitEntity, targetSide)
|
function BattleBoardSkillEntity:addElementCountEffect(effect, unitEntity, targetSide)
|
||||||
|
|||||||
@ -146,12 +146,6 @@ function BattleUnitEntity:changeActiveSkillId(originSkillId, tartgetSkillId)
|
|||||||
for _, skillEntity in ipairs(self.activeSkills) do
|
for _, skillEntity in ipairs(self.activeSkills) do
|
||||||
if skillEntity:getSkillid() == originSkillId then
|
if skillEntity:getSkillid() == originSkillId then
|
||||||
skillEntity:changeSkillId(tartgetSkillId)
|
skillEntity:changeSkillId(tartgetSkillId)
|
||||||
if self.skillExtraUseTimes then
|
|
||||||
local extraCount = self.skillExtraUseTimes[originSkillId]
|
|
||||||
if extraCount then
|
|
||||||
self.skillExtraUseTimes[tartgetSkillId] = extraCount
|
|
||||||
end
|
|
||||||
end
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user