1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-12-15 20:50:28 +00:00
ldd-CC/CCBN/ccbn-data/chipdata/cannon
2019-03-13 17:05:50 -04:00

25 lines
596 B
Plaintext

local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Cannon",
description = "Fires a shot forwards!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
info.x = info.x + (4 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, info.altDamage or 40, info.owner, 1, info.noFlinch)
local struckPlayer, struckObject = act.projectile.checkProjectileCollisions(info)
if info.frame > 50 or struckPlayer or struckObject then
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}