1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-11-17 07:14:52 +00:00
ldd-CC/CCBN/ccbn-data/chipdata/areagrab
2019-03-13 17:05:50 -04:00

44 lines
800 B
Plaintext

local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "AreaGrab",
description = "Grabs three panels from enemy!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if info.frame == 0 then
if info.owner == 1 then
info.x = 5
for y = 1, 3 do
for x = 2, 5 do
if stage.panels[y][x].owner ~= info.owner then
info.x = math.min(info.x, x)
break
end
end
end
else
info.x = 2
for y = 1, 3 do
for x = 5, 2, -1 do
if stage.panels[y][x].owner ~= info.owner then
info.x = math.max(info.x, x)
break
end
end
end
end
end
for y = 1, 3 do
act.projectile.newProjectile(info.x, y, info.player, "panelgrab_internal")
end
return false
end
}