2019-03-13 04:15:41 +00:00
|
|
|
local stage, players, objects, projectiles, act, images = ...
|
|
|
|
return {
|
|
|
|
info = {
|
|
|
|
name = "CrossGun",
|
|
|
|
description = "Shoots four diagonal panels around enemy!",
|
|
|
|
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
|
|
|
|
act.stage.setDamage(info.x - 1, info.y - 1, 30, info.owner, 2)
|
|
|
|
act.stage.setDamage(info.x + 1, info.y - 1, 30, info.owner, 2)
|
|
|
|
act.stage.setDamage(info.x - 1, info.y + 1, 30, info.owner, 2)
|
|
|
|
act.stage.setDamage(info.x + 1, info.y + 1, 30, info.owner, 2)
|
|
|
|
act.stage.setDamage(info.x, info.y, 30, info.owner, 2)
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
else
|
|
|
|
return true, {{images.cannon, info.x, info.y}}
|
|
|
|
end
|
|
|
|
end
|
2019-03-13 17:56:51 +00:00
|
|
|
}
|