Commit 1bb9a3c65c4c51702d4a403dc026e3d8805bd98c

Authored by DarkGod
2 parents ba65bed3 f517db05

Merge branch 'fix_judgement_splash' into 'master'

fix Judgement's splash damage is increased by dam inc again



See merge request !794
... ... @@ -3359,7 +3359,12 @@ newEffect{
3359 3359 callbackOnTakeDamage = function(self, eff, src, x, y, type, dam, state)
3360 3360 if dam <= 80 or src~= eff.src or type ~= engine.DamageType.LIGHT or self.turn_procs.light_blight_reflect then return end
3361 3361 self.turn_procs.light_blight_reflect = true
3362   - local grids = eff.src:project({type="ball", radius=2, x=self.x, y=self.y,selffire = false,friendlyfire=false}, self.x, self.y, engine.DamageType.LIGHT, dam * eff.splash/100)
  3362 + local incdam = {}
  3363 + for t, v in pairs(eff.src.inc_damage) do incdam[t] = -v end
  3364 + local tmpid = eff.src:addTemporaryValue("inc_damage", incdam)
  3365 + local grids, err = pcall(eff.src.project, eff.src, {type="ball", radius=2, x=self.x, y=self.y,selffire = false,friendlyfire=false}, self.x, self.y, engine.DamageType.LIGHT, dam * eff.splash/100)
  3366 + eff.src:removeTemporaryValue("inc_damage", tmpid)
  3367 + if not grids then error(err) end
3363 3368 game.level.map:particleEmitter(self.x, self.y, 1, "sunburst", {radius=2, grids=grids, tx=self.x, ty=self.y})
3364 3369 end,
3365 3370 }
... ...