mirror of
https://github.com/LDDestroier/CC/
synced 2025-03-04 18:48:10 +00:00
29 lines
763 B
Plaintext
29 lines
763 B
Plaintext
![]() |
local stage, players, objects, projectiles, act, images = ...
|
||
|
return {
|
||
|
info = {
|
||
|
name = "Shotgun",
|
||
|
description = "Hits enemy as well as the panel behind!",
|
||
|
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, info.y, 30, info.owner, 2)
|
||
|
act.stage.setDamage(info.x + info.direction, info.y, 30, info.owner, 2)
|
||
|
end
|
||
|
return false
|
||
|
else
|
||
|
return true, {{images.cannon, info.x, info.y}}
|
||
|
end
|
||
|
end
|
||
|
}
|