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