mirror of
https://github.com/LDDestroier/CC/
synced 2024-12-14 12:10:29 +00:00
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
local stage, players, objects, projectiles, act, images = ...
|
|
return {
|
|
info = {
|
|
name = "AirShot3",
|
|
description = "Fires a powerful, pushing shot forwards!",
|
|
cooldown = {
|
|
shoot = 8,
|
|
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 then
|
|
if act.player.movePlayer(struckPlayer, info.direction, 0, true) then
|
|
act.stage.setDamage(info.x + info.direction, info.y, 40, info.owner, 1)
|
|
end
|
|
elseif struckObject then
|
|
if objects[struckObject].doYeet then
|
|
objects[struckObject].xvel = (4 / stage.panelWidth) * info.direction
|
|
else
|
|
if act.object.moveObject(struckObject, info.direction, 0) then
|
|
act.stage.setDamage(info.x + info.direction, info.y, 40, info.owner, 1)
|
|
end
|
|
end
|
|
end
|
|
return false
|
|
else
|
|
return true, {{images.cannon, info.x, info.y}}
|
|
end
|
|
end
|
|
}
|