Code: Select all
target:knockback(self.x, self.y, dist, false, function(g, x, y)
Any ideas? Code is below:
Code: Select all
target:knockback(self.x, self.y, t.getRange(self,t), function(t2, x, y)
local d = rng.chance(2) and sides.hard_left or sides.hard_right
local sx, sy = util.coordAddDir(t2.x, t2.y, d)
local ox, oy = t2.x, t2.y
t2:knockback(sx, sy, 2, function(t3) return true end)
DamageType:get(DamageType.PHYSICAL).projector(self, t2.x, t2.y, DamageType.PHYSICAL, t.getDamage(self,t))
if t2:canBe("stun") then t2:setEffect(t2.EFF_DAZED, 2, {}) end
if game.level.map:checkAllEntities(x, y, "block_move", target) then
slam = true
dam = dam * 1.25
pin = true
game.logSeen(target, "%s is crushed against the wall!", target.name:capitalize())
end
end)