构建一些任务需要的战斗数据
This commit is contained in:
parent
7fa2c93ad5
commit
55983ad95a
@ -436,6 +436,8 @@ function BattleUnitComp:useAllSkills(callback)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitComp:useNormalSkill(count, effectType, callback)
|
function BattleUnitComp:useNormalSkill(count, effectType, callback)
|
||||||
|
self.unitEntity:addActiveSkillReleaseCount(1)
|
||||||
|
|
||||||
self.actionOverCallback = callback
|
self.actionOverCallback = callback
|
||||||
self.normalSkillCount = count
|
self.normalSkillCount = count
|
||||||
if effectType == BattleConst.EFFECT_TYPE.DIRECT then
|
if effectType == BattleConst.EFFECT_TYPE.DIRECT then
|
||||||
|
|||||||
@ -239,6 +239,7 @@ function BattleController:init(params)
|
|||||||
self.eliminateTotalCount = 0
|
self.eliminateTotalCount = 0
|
||||||
self.realTime = 0
|
self.realTime = 0
|
||||||
self.taskProgress = {}
|
self.taskProgress = {}
|
||||||
|
self.waveRoundCount = {}
|
||||||
|
|
||||||
self.chapterId = self:getChapterId()
|
self.chapterId = self:getChapterId()
|
||||||
self.waveIndex = 0
|
self.waveIndex = 0
|
||||||
@ -508,6 +509,7 @@ function BattleController:enterNextWave()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function BattleController:enterRoundBegin()
|
function BattleController:enterRoundBegin()
|
||||||
|
self.waveRoundCount[self.waveIndex] = (self.waveRoundCount[self.waveIndex] or 0) + 1
|
||||||
self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_BEGIN
|
self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_BEGIN
|
||||||
self:takeGridEffect()
|
self:takeGridEffect()
|
||||||
self:enterEliminationBegin()
|
self:enterEliminationBegin()
|
||||||
|
|||||||
@ -11,6 +11,7 @@ function BattleUnitEntity:init(unitData, side, team)
|
|||||||
self.team = team
|
self.team = team
|
||||||
self.damageCount = 0 -- 记录伤害
|
self.damageCount = 0 -- 记录伤害
|
||||||
self.healCount = 0 -- 记录治疗
|
self.healCount = 0 -- 记录治疗
|
||||||
|
self.activeSkillReleaseCount = 0 -- 记录主动技能释放次数
|
||||||
self:initSkill()
|
self:initSkill()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -151,7 +152,7 @@ function BattleUnitEntity:getAssistingSkill()
|
|||||||
return self.assistingSkill
|
return self.assistingSkill
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitEntity:getActiveSkillCount()
|
function BattleUnitEntity:getActiveSkillRealeseCount()
|
||||||
return #self.activeSkills
|
return #self.activeSkills
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -238,6 +239,15 @@ function BattleUnitEntity:addDamageCount(num)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleUnitEntity:getActiveSkillReleaseCount()
|
||||||
|
return self.activeSkillReleaseCount
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 主动技能释放次数统计
|
||||||
|
function BattleUnitEntity:addActiveSkillReleaseCount(num)
|
||||||
|
self.activeSkillReleaseCount = self.activeSkillReleaseCount + num
|
||||||
|
end
|
||||||
|
|
||||||
function BattleUnitEntity:takeDamageOrCure(num)
|
function BattleUnitEntity:takeDamageOrCure(num)
|
||||||
return self.team:takeDamageOrCure(num)
|
return self.team:takeDamageOrCure(num)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user