普工经验

This commit is contained in:
xiekaidong 2023-04-17 16:41:17 +08:00
parent 65f695030e
commit 503b50c03e
2 changed files with 8 additions and 4 deletions

View File

@ -504,6 +504,9 @@ function BattleUnitComp:updateBuffState(buff, num)
end end
function BattleUnitComp:onSkillTakeEffect(skill) function BattleUnitComp:onSkillTakeEffect(skill)
if skill == self.unitEntity:getNormalSkill() then
self.battleController:addBattleExp(self.side)
end
local effectList = skill:getEffectList() local effectList = skill:getEffectList()
if effectList == nil then if effectList == nil then
return return

View File

@ -1165,10 +1165,12 @@ function BattleController:snapshotBoard()
return snapshot return snapshot
end end
function BattleController:addBattleExp(exp) function BattleController:addBattleExp(side, exp)
if not self.battleData or not exp then if side ~= BattleConst.SIDE_ATK or not self.battleData then
return return
end end
exp = exp or 1
self.battleData:addExp(exp) self.battleData:addExp(exp)
end end
@ -1222,12 +1224,11 @@ local function _addCurRoundAttr(self, instruction, callback)
end end
local function _assisting(self, instruction, callback) local function _assisting(self, instruction, callback)
self:addBattleExp(instruction.count) self:addBattleExp(BattleConst.SIDE_ATK, instruction.count) -- 先直接加
callback() callback()
end end
local function _generalAttack(self, instruction, callback) local function _generalAttack(self, instruction, callback)
self:addBattleExp(instruction.count) -- 先直接加
self.atkTeam:useNormalSkill(instruction.skillMatch, instruction.count, callback) self.atkTeam:useNormalSkill(instruction.skillMatch, instruction.count, callback)
end end