Commit 386ca58e098683bd4d025a1aff5ce29d0dde7e44

Authored by zhouhaihai
1 parent c0b7797f

优化log

@@ -106,6 +106,7 @@ AdvBackEventType = { @@ -106,6 +106,7 @@ AdvBackEventType = {
106 TurnEnd = 14, -- 回合结束 106 TurnEnd = 14, -- 回合结束
107 Miss = 15, -- miss 107 Miss = 15, -- miss
108 BattleBegin = 16, -- 战斗开始 108 BattleBegin = 16, -- 战斗开始
  109 + Trap = 17,
109 } 110 }
110 111
111 AdvScoreType = { 112 AdvScoreType = {
@@ -354,6 +354,7 @@ function Block:open(adv, room) @@ -354,6 +354,7 @@ function Block:open(adv, room)
354 for _, buffId in ipairs(data.effect:toArray(true, "=")) do 354 for _, buffId in ipairs(data.effect:toArray(true, "=")) do
355 adv.battle.player:addBuff(buffId) 355 adv.battle.player:addBuff(buffId)
356 end 356 end
  357 + adv:backTrap()
357 room:clearBEvent(self) 358 room:clearBEvent(self)
358 end 359 end
359 if self.event then -- 随机出具体的事件 360 if self.event then -- 随机出具体的事件
@@ -1149,6 +1150,9 @@ function Adv:backBattleBegin() @@ -1149,6 +1150,9 @@ function Adv:backBattleBegin()
1149 self:pushBackEvent(AdvBackEventType.BattleBegin, {}) 1150 self:pushBackEvent(AdvBackEventType.BattleBegin, {})
1150 end 1151 end
1151 1152
  1153 +function Adv:backTrap()
  1154 + self:pushBackEvent(AdvBackEventType.Trap, {})
  1155 +end
1152 1156
1153 function Adv:scoreChange(scoreType, pms) 1157 function Adv:scoreChange(scoreType, pms)
1154 local cutTypes = {} 1158 local cutTypes = {}
src/adv/AdvBattle.lua
@@ -54,7 +54,7 @@ function Battle:initPlayer() @@ -54,7 +54,7 @@ function Battle:initPlayer()
54 end 54 end
55 end 55 end
56 player.growth = (self.adv.owner:getRealBattleValue(self.adv.advTeam.heros) / 80) ^ 0.52 + math.floor(heroLevel / 50) / 50 56 player.growth = (self.adv.owner:getRealBattleValue(self.adv.advTeam.heros) / 80) ^ 0.52 + math.floor(heroLevel / 50) / 50
57 - player.level = 0 57 + player.level = 1
58 player.exp = 0 58 player.exp = 0
59 local activeRelation = self.adv.owner:getHeroActiveRelation() 59 local activeRelation = self.adv.owner:getHeroActiveRelation()
60 local baseAttr = csvdb["adv_unitCsv"][math.floor(self.adv.advInfo.chapter / 100)] 60 local baseAttr = csvdb["adv_unitCsv"][math.floor(self.adv.advInfo.chapter / 100)]
src/adv/AdvPlayer.lua
@@ -449,7 +449,7 @@ end @@ -449,7 +449,7 @@ end
449 449
450 function Player:initData(data) 450 function Player:initData(data)
451 Player.super.initData(self, data) 451 Player.super.initData(self, data)
452 - self.level = data.level or 0 --level 每增加1级 属性增长 growth * baseAttr 452 + self.level = data.level or 1 --level 每增加1级 属性增长 growth * baseAttr
453 self.growth = data.growth or 0 453 self.growth = data.growth or 0
454 self.exp = data.exp or 0 454 self.exp = data.exp or 0
455 end 455 end