1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-11-14 13:54:52 +00:00
ldd-CC/CCBN/ccbn-data/chipdata/spreader
2019-03-13 00:15:41 -04:00

32 lines
757 B
Plaintext

local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Spreader",
description = "Hits enemy and all surrounding panels!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
info.x = info.x + (2 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, 30, info.owner, 2)
local struckPlayer, struckObject = act.projectile.checkProjectileCollisions(info)
if info.frame > 50 or struckPlayer or struckObject then
if struckPlayer or struckObject then
for y = -1, 1 do
for x = -1, 1 do
act.stage.setDamage(info.x + x, info.y + y, 30, info.owner, 2)
end
end
end
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}