Commit f517db05831bc8838dfe06cded98aae1aa9fd71a

Authored by yutio888
1 parent 3a06daa0

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

... ... @@ -3291,7 +3291,12 @@ newEffect{
3291 3291 callbackOnTakeDamage = function(self, eff, src, x, y, type, dam, state)
3292 3292 if dam <= 80 or src~= eff.src or type ~= engine.DamageType.LIGHT or self.turn_procs.light_blight_reflect then return end
3293 3293 self.turn_procs.light_blight_reflect = true
3294   - 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)
  3294 + local incdam = {}
  3295 + for t, v in pairs(eff.src.inc_damage) do incdam[t] = -v end
  3296 + local tmpid = eff.src:addTemporaryValue("inc_damage", incdam)
  3297 + 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)
  3298 + eff.src:removeTemporaryValue("inc_damage", tmpid)
  3299 + if not grids then error(err) end
3295 3300 game.level.map:particleEmitter(self.x, self.y, 1, "sunburst", {radius=2, grids=grids, tx=self.x, ty=self.y})
3296 3301 end,
3297 3302 }
... ...