mirror of
https://github.com/LDDestroier/CC/
synced 2024-11-10 12:00:00 +00:00
30 lines
853 B
Plaintext
30 lines
853 B
Plaintext
local stage, players, objects, projectiles, act, images = ...
|
|
return {
|
|
info = {
|
|
name = "V-Gun",
|
|
description = "Hits enemy as well as two diagonal panels back!",
|
|
cooldown = {
|
|
shoot = 6,
|
|
move = 4
|
|
}
|
|
},
|
|
logic = function(info)
|
|
info.x = info.x + (4 / stage.panelWidth) * info.direction
|
|
|
|
act.stage.setDamage(info.x, info.y, 40, info.owner, 1)
|
|
|
|
local struckPlayer, struckObject = act.projectile.checkProjectileCollisions(info)
|
|
|
|
if info.frame > 50 or struckPlayer or struckObject then
|
|
if struckPlayer or struckObject then
|
|
act.stage.setDamage(info.x, info.y, 30, info.owner, 1)
|
|
act.stage.setDamage(info.x + info.direction, info.y - 1, 30, info.owner, 1)
|
|
act.stage.setDamage(info.x + info.direction, info.y + 1, 30, info.owner, 1)
|
|
end
|
|
return false
|
|
else
|
|
return true, {{images.cannon, info.x, info.y}}
|
|
end
|
|
end
|
|
}
|