Add files via upload

This commit is contained in:
LDDestroier 2019-03-13 00:15:41 -04:00 committed by GitHub
parent e4fb776d54
commit e58d3515d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 1315 additions and 0 deletions

View File

@ -0,0 +1,37 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "AirShot1",
description = "Fires a pushing shot forwards!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
info.x = info.x + (2 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, 20, info.owner, 2)
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, 20, info.owner, 2)
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, 20, info.owner, 2)
end
end
end
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}

View File

@ -0,0 +1,37 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "AirShot2",
description = "Fires a better, pushing shot forwards!",
cooldown = {
shoot = 8,
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 then
if act.player.movePlayer(struckPlayer, info.direction, 0, true) then
act.stage.setDamage(info.x + info.direction, info.y, 30, info.owner, 2)
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, 30, info.owner, 2)
end
end
end
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}

View File

@ -0,0 +1,37 @@
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 + (2 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, 40, info.owner, 2)
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, 2)
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, 2)
end
end
end
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}

View File

@ -0,0 +1,43 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "AreaGrab",
description = "Grabs three panels from enemy!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if info.frame == 0 then
if info.owner == 1 then
info.x = 5
for y = 1, 3 do
for x = 2, 5 do
if stage.panels[y][x].owner ~= info.owner then
info.x = math.min(info.x, x)
break
end
end
end
else
info.x = 2
for y = 1, 3 do
for x = 5, 2, -1 do
if stage.panels[y][x].owner ~= info.owner then
info.x = math.max(info.x, x)
break
end
end
end
end
end
for y = 1, 3 do
act.projectile.newProjectile(info.x, y, info.player, "panelgrab_internal")
end
return false
end
}

View File

@ -0,0 +1,27 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "BigBomb",
description = "Lob a 3x3 grenade 2 panels forward!",
cooldown = {
shoot = 6,
move = 5
}
},
logic = function(info)
local maxDist = 3
local maxFrames = 10
local parabola = math.sin((math.pi / maxFrames) * info.frame) * 2
if parabola < 0.1 and info.frame > 3 then
for y = -1, 1 do
for x = -1, 1 do
act.stage.setDamage(info.x + x, info.y + y, 90, info.owner, 2, false)
end
end
return false
else
info.x = info.x + (maxDist / maxFrames) * info.direction
end
return true, {{images.cannon, info.x, info.y - parabola}}
end
}

View File

@ -0,0 +1,54 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Boomer1",
description = "Boomerang that orbits stage!",
cooldown = {
shoot = 6,
move = 5
}
},
logic = function(info)
if info.direction == 1 then
if info.frame == 0 then
info.x = 0
info.y = 3
end
if info.y > 1 then
if info.x <= 6 then
info.x = info.x + (2 / stage.panelWidth)
else
info.y = info.y - (2 / stage.panelHeight)
end
elseif info.x > 0 then
info.x = info.x - (2 / stage.panelWidth)
else
return false
end
elseif info.direction == -1 then
if info.frame == 0 then
info.x = 7
info.y = 3
end
if info.y > 1 then
if info.x > 1 then
info.x = info.x - (2 / stage.panelWidth)
else
info.y = info.y - (2 / stage.panelHeight)
end
elseif info.x <= 7 then
info.x = info.x + (2 / stage.panelWidth)
else
return false
end
end
local struckObject = act.object.checkObjectAtPos(info.x, info.y)
if struckObject then
info.safeObjects[struckObject] = true
end
act.stage.setDamage(info.x, info.y, 60, info.owner, 2, false, {}, info.safeObjects)
return true, {{images.cannon, info.x, info.y}}
end
}

View File

@ -0,0 +1,24 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "MegaBuster",
description = "Fires a weak shot forwards!",
cooldown = {
shoot = 4,
move = 2
}
},
logic = function(info)
info.x = info.x + (3 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, info.player.busterPower or 1, info.owner, 1, true)
local struckPlayer, struckObject = act.projectile.checkProjectileCollisions(info)
if info.frame > 50 or struckPlayer or struckObject then
return false
else
return true, {{images.buster, info.x, info.y}}
end
end
}

View File

@ -0,0 +1,17 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "BusterUp",
description = "Raises your buster power by 1!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
info.player.busterPower = info.player.busterPower + 1
return false
end
}

View File

@ -0,0 +1,24 @@
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 + (2 / 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
}

View File

@ -0,0 +1,17 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "CrackOut",
description = "Destroys panel in front!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
act.stage.crackPanel(info.x + info.direction, info.y, 2)
return false
end
}

View File

@ -0,0 +1,27 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "CrossBomb",
description = "Lob a cross-shaped bomb 2 panels forward!",
cooldown = {
shoot = 6,
move = 5
}
},
logic = function(info)
local maxDist = 3
local maxFrames = 10
local parabola = math.sin((math.pi / maxFrames) * info.frame) * 2
if parabola < 0.1 and info.frame > 3 then
act.stage.setDamage(info.x, info.y - 1, 70, info.owner, 2, false)
act.stage.setDamage(info.x, info.y, 70, info.owner, 2, false)
act.stage.setDamage(info.x, info.y + 1, 70, info.owner, 2, false)
act.stage.setDamage(info.x - 1, info.y, 70, info.owner, 2, false)
act.stage.setDamage(info.x + 1, info.y, 70, info.owner, 2, false)
return false
else
info.x = info.x + (maxDist / maxFrames) * info.direction
end
return true, {{images.cannon, info.x, info.y - parabola}}
end
}

View File

@ -0,0 +1,31 @@
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
}

View File

@ -0,0 +1,36 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Dash",
description = "Dash forwards to deal massive damage!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
if info.frame == 0 then
info.player.canMove = false
info.player.canShoot = false
info.playerInitX = info.player.x
info.playerInitY = info.player.y
end
if info.frame > 2 then -- start on frame 3
if info.player.x > 7 or info.player.x < 0 then
info.player.x = info.playerInitX
info.player.y = info.playerInitY
info.player.cooldown.shoot = 6
info.player.cooldown.move = 2
info.player.canMove = true
info.player.canShoot = true
return false
else
info.player.x = info.player.x + (5 / stage.panelWidth) * info.player.direction
act.stage.setDamage(info.player.x, info.player.y, 80, info.owner, 4, false)
return true
end
else
return true
end
end
}

View File

@ -0,0 +1,18 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "DoubleCrack",
description = "Destroys two panels in front!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
act.stage.crackPanel(info.x + info.direction, info.y, 2)
act.stage.crackPanel(info.x + info.direction * 2, info.y, 2)
return false
end
}

View File

@ -0,0 +1,19 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "DoubleShot",
description = "Fires two panels forwards!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
act.projectile.newProjectile(info.x, info.y, info.player, "panelshot", false, info.altDamage)
act.projectile.newProjectile(info.x + info.direction, info.y, info.player, "panelshot", true, info.altDamage)
return false
end
}

View File

@ -0,0 +1,19 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "FighterSword",
description = "Slash forwards 3 panels!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
act.stage.setDamage(info.x + info.direction, info.y, 100, info.owner, 4)
act.stage.setDamage(info.x + info.direction * 2, info.y, 100, info.owner, 4)
act.stage.setDamage(info.x + info.direction * 3, info.y, 100, info.owner, 4)
return false
end
}

View File

@ -0,0 +1,21 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Geddon1",
description = "Cracks all panels!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
for y, row in pairs(stage.panels) do
for x, panel in pairs(row) do
act.stage.crackPanel(x, y, 1)
end
end
return false
end
}

View File

@ -0,0 +1,21 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Geddon2",
description = "Breaks all panels!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
for y, row in pairs(stage.panels) do
for x, panel in pairs(row) do
act.stage.crackPanel(x, y, 2)
end
end
return false
end
}

View File

@ -0,0 +1,24 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "HiCannon",
description = "Fires a better shot forwards!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
info.x = info.x + (2 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, 60, info.owner, 1)
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
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Invis",
description = "Makes you invincible for a short time!",
cooldown = {
shoot = 6,
move = 5
}
},
logic = function(info)
info.player.cooldown.iframe = 50
return false
end
}

View File

@ -0,0 +1,22 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "LifeSword",
description = "Slash 2x3 area with devastating power!",
cooldown = {
shoot = 6,
move = 5
}
},
logic = function(info)
act.stage.setDamage(info.x + info.direction, info.y - 1, 400, info.owner, 4)
act.stage.setDamage(info.x + info.direction * 2, info.y - 1, 400, info.owner, 4)
act.stage.setDamage(info.x + info.direction, info.y, 400, info.owner, 4)
act.stage.setDamage(info.x + info.direction * 2, info.y, 400, info.owner, 4)
act.stage.setDamage(info.x + info.direction, info.y + 1, 400, info.owner, 4)
act.stage.setDamage(info.x + info.direction * 2, info.y + 1, 400, info.owner, 4)
return false
end
}

View File

@ -0,0 +1,25 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "LilBomb",
description = "Lob a little bomb 2 panels forward!",
cooldown = {
shoot = 6,
move = 5
}
},
logic = function(info)
local maxDist = 3
local maxFrames = 10
local parabola = math.sin((math.pi / maxFrames) * info.frame) * 2
if parabola < 0.1 and info.frame > 3 then
act.stage.setDamage(info.x, info.y - 1, 50, info.owner, 2, false)
act.stage.setDamage(info.x, info.y, 50, info.owner, 2, false)
act.stage.setDamage(info.x, info.y + 1, 50, info.owner, 2, false)
return false
else
info.x = info.x + (maxDist / maxFrames) * info.direction
end
return true, {{images.cannon, info.x, info.y - parabola}}
end
}

View File

@ -0,0 +1,18 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "LongSword",
description = "Slash forwards 2 panels!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
act.stage.setDamage(info.x + info.direction, info.y, 80, info.owner, 4)
act.stage.setDamage(info.x + info.direction * 2, info.y, 80, info.owner, 4)
return false
end
}

View File

@ -0,0 +1,24 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "M-Cannon",
description = "Fires a powerful shot forwards!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
info.x = info.x + (2 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, 80, info.owner, 1)
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
}

View File

@ -0,0 +1,23 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "MiniBomb",
description = "Lob a small bomb 2 panels forward!",
cooldown = {
shoot = 6,
move = 5
}
},
logic = function(info)
local maxDist = 3
local maxFrames = 10
local parabola = math.sin((math.pi / maxFrames) * info.frame) * 2
if parabola < 0.1 and info.frame > 3 then
act.stage.setDamage(info.x, info.y, 50, info.owner, 2, false)
return false
else
info.x = info.x + (maxDist / maxFrames) * info.direction
end
return true, {{images.cannon, info.x, info.y - parabola}}
end
}

View File

@ -0,0 +1,17 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Muramasa",
description = "Slash for as much damage as you have taken!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
act.stage.setDamage(info.x + info.direction, info.y, math.min(info.player.maxHealth - info.player.health, 1000), info.owner, 2, false)
return false
end
}

View File

@ -0,0 +1,37 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "PanelGrab",
description = "Grabs one panel from enemy!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if info.frame == 0 then
if info.owner == 1 then
info.x = 5
for x = 2, 5 do
if stage.panels[info.y][x].owner ~= info.owner then
info.x = x
break
end
end
else
info.x = 2
for x = 5, 2, -1 do
if stage.panels[info.y][x].owner ~= info.owner then
info.x = x
break
end
end
end
end
act.projectile.newProjectile(info.x, info.y, info.player, "panelgrab_internal")
return false
end
}

View File

@ -0,0 +1,34 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "PanelGrab_Internal",
description = "Internal for PanelGrab and AreaGrab.",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if not stage.panels[info.y] then
return false
end
if info.frame == 0 then
info.yadj = 5
end
info.yadj = math.max(0, info.yadj - 0.5)
if info.yadj == 0 then
act.stage.setDamage(info.x, info.y, 80, info.owner, 2)
if not act.player.checkPlayerAtPos(info.x, info.y) then
stage.panels[info.y][info.x].owner = info.owner
stage.panels[info.y][info.x].cooldown.owner = 500
end
return false
end
return true, {{images.cannon, info.x, info.y - info.yadj}}
end
}

View File

@ -0,0 +1,23 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "PanelReturn",
description = "Fixes all of your panels!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
for y, row in pairs(stage.panels) do
for x, panel in pairs(row) do
if panel.owner == info.owner then
act.stage.crackPanel(x, y, -2)
end
end
end
return false
end
}

View File

@ -0,0 +1,35 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "CrackShot",
description = "Fires a panel forwards!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if info.frame == 0 then
if act.stage.checkIfSolid(info.x + info.direction, info.y) then
info.panelType = stage.panels[info.y][info.x + info.direction].panelType
act.stage.crackPanel(info.x + info.direction, info.y, 2)
info.x = info.x + info.direction
else
return false
end
elseif info.panelType then
info.x = info.x + (3 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, info.altDamage or 60, 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.panel[info.panelType], info.x, info.y}}
end
end
return {{images.panel[info.panelType], info.x, info.y}}
end
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Recov10",
description = "Gives you 10 health!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
info.player.health = math.min(info.player.health + 10, info.player.maxHealth)
return false
end,
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Recon120",
description = "Gives you 120 health!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
info.player.health = math.min(info.player.health + 120, info.player.maxHealth)
return false
end,
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Recon150",
description = "Gives you 150 health!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
info.player.health = math.min(info.player.health + 150, info.player.maxHealth)
return false
end,
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Recon200",
description = "Gives you 200 health!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
info.player.health = math.min(info.player.health + 200, info.player.maxHealth)
return false
end,
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Recon30",
description = "Gives you 30 health!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
info.player.health = math.min(info.player.health + 30, info.player.maxHealth)
return false
end,
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Recon300",
description = "Gives you 300 health!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
info.player.health = math.min(info.player.health + 300, info.player.maxHealth)
return false
end,
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Recon50",
description = "Gives you 50 health!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
info.player.health = math.min(info.player.health + 50, info.player.maxHealth)
return false
end,
}

View File

@ -0,0 +1,15 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Recon80",
description = "Gives you 80 health!",
cooldown = {
shoot = 6,
move = 2
}
},
logic = function(info)
info.player.health = math.min(info.player.health + 80, info.player.maxHealth)
return false
end,
}

View File

@ -0,0 +1,17 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "RockCube",
description = "Creates a cube-shaped rock!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if act.stage.checkIfWalkable(info.x + info.direction, info.y) then
act.object.newObject(info.x + info.direction, info.y, info.owner, info.direction, "rockcube")
end
return false
end
}

View File

@ -0,0 +1,30 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "ShockWave",
description = "Piercing ground wave!",
cooldown = {
shoot = 14,
move = 8
}
},
logic = function(info)
if info.frame == 0 then
info.x = info.x + info.direction / 2
end
info.x = info.x + (3 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, 60, info.owner, 10, false, {}, info.safeObjects)
local struckObject = act.object.checkObjectAtPos(info.x, info.y)
if struckObject then
info.safeObjects[struckObject] = true
end
if info.frame > 50 or not act.stage.checkIfSolid(info.x, info.y) then
return false
else
return true
end
end
}

View File

@ -0,0 +1,28 @@
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
}

View File

@ -0,0 +1,29 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "SideGun",
description = "Hits enemy as well as panels above and below!",
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.y - 1, 30, info.owner, 2)
act.stage.setDamage(info.x, info.y + 1, 30, info.owner, 2)
end
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}

View File

@ -0,0 +1,31 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Spreader",
description = "Hits enemy and all surrounding panels!",
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
for y = -1, 1 do
for x = -1, 1 do
act.stage.setDamage(info.x + x, info.y + y, 30, info.owner, 2)
end
end
end
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}

View File

@ -0,0 +1,28 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "SuperVulcan",
description = "Fires twelve shots that damages panel behind!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if info.frame == 0 then
info.player.canMove = false
info.player.canShoot = false
else
if info.frame == 12 * 2 + 1 then
info.player.canMove = true
info.player.canShoot = true
info.player.cooldown.shoot = 6
info.player.cooldown.shoot = 4
return false
elseif info.frame % 2 == 0 then
act.projectile.newProjectile(info.x, info.y, info.player, "vulcan_internal")
end
end
return true
end
}

View File

@ -0,0 +1,17 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Sword",
description = "Slash forwards 1 panel!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
act.stage.setDamage(info.x + info.direction, info.y, 80, info.owner, 4)
return false
end
}

View File

@ -0,0 +1,19 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "TripleCrack",
description = "Destroys three panels in front!",
cooldown = {
shoot = 8,
move = 4
}
},
logic = function(info)
act.stage.crackPanel(info.x + info.direction, info.y - 1, 2)
act.stage.crackPanel(info.x + info.direction, info.y, 2)
act.stage.crackPanel(info.x + info.direction, info.y + 1, 2)
return false
end
}

View File

@ -0,0 +1,20 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "TripleShot",
description = "Fires three panels forwards!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
act.projectile.newProjectile(info.x, info.y - 1, info.player, "panelshot", false, info.altDamage or 100)
act.projectile.newProjectile(info.x, info.y, info.player, "panelshot", true, info.altDamage or 100)
act.projectile.newProjectile(info.x, info.y + 1, info.player, "panelshot", false, info.altDamage or 100)
return false
end
}

View File

@ -0,0 +1,29 @@
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 + (2 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, 40, 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 - 1, 30, info.owner, 2)
act.stage.setDamage(info.x + info.direction, info.y + 1, 30, info.owner, 2)
end
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}

View File

@ -0,0 +1,28 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Vulcan1",
description = "Fires three shots that damages panel behind!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if info.frame == 0 then
info.player.canMove = false
info.player.canShoot = false
else
if info.frame == 3 * 2 + 1 then
info.player.canMove = true
info.player.canShoot = true
info.player.cooldown.shoot = 6
info.player.cooldown.shoot = 4
return false
elseif info.frame % 2 == 0 then
act.projectile.newProjectile(info.x, info.y, info.player, "vulcan_internal")
end
end
return true
end
}

View File

@ -0,0 +1,28 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Vulcan2",
description = "Fires five shots that damages panel behind!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if info.frame == 0 then
info.player.canMove = false
info.player.canShoot = false
else
if info.frame == 5 * 2 + 1 then
info.player.canMove = true
info.player.canShoot = true
info.player.cooldown.shoot = 6
info.player.cooldown.shoot = 4
return false
elseif info.frame % 2 == 0 then
act.projectile.newProjectile(info.x, info.y, info.player, "vulcan_internal")
end
end
return true
end
}

View File

@ -0,0 +1,28 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Vulcan3",
description = "Fires seven shots that damages panel behind!",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
if info.frame == 0 then
info.player.canMove = false
info.player.canShoot = false
else
if info.frame == 7 * 2 + 1 then
info.player.canMove = true
info.player.canShoot = true
info.player.cooldown.shoot = 6
info.player.cooldown.shoot = 4
return false
elseif info.frame % 2 == 0 then
act.projectile.newProjectile(info.x, info.y, info.player, "vulcan_internal")
end
end
return true
end
}

View File

@ -0,0 +1,25 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "Vulcan_Internal",
description = "Internal component of Vulcan1 through 3 and SuperVulcan.",
cooldown = {
shoot = 6,
move = 4
}
},
logic = function(info)
info.x = info.x + (3 / stage.panelWidth) * info.direction
act.stage.setDamage(info.x, info.y, 10, info.owner, 1, true)
local struckPlayer, struckObject = act.projectile.checkProjectileCollisions(info)
if info.frame > 50 or struckPlayer or struckObject then
act.stage.setDamage(info.x + info.direction, info.y, 10, info.owner, 1, true)
return false
else
return true, {{images.cannon, info.x, info.y}}
end
end
}

View File

@ -0,0 +1,19 @@
local stage, players, objects, projectiles, act, images = ...
return {
info = {
name = "WideSword",
description = "Slash column in front!",
cooldown = {
shoot = 8,
move = 5
}
},
logic = function(info)
act.stage.setDamage(info.x + info.direction, info.y - 1, 80, info.owner, 4)
act.stage.setDamage(info.x + info.direction, info.y, 80, info.owner, 4)
act.stage.setDamage(info.x + info.direction, info.y + 1, 80, info.owner, 4)
return false
end
}

View File

@ -0,0 +1,13 @@
local stage, players, objects, projectiles, act, images = ...
return {
image = images.rockcube,
friendlyFire = true, -- can it hit its owner?
health = 500, -- amount of damage before disintegrating
maxHealth = 500, -- just a formality
smackDamage = 200, -- amount of damage it will do if launched at enemy
doYeet = true, -- whether or not to fly backwards and do smackDamage to target
delayedTime = 400, -- amount of frames before running delayedFunc()
delayedFunc = function() -- will run every delayedTime frames
-- rockcubes do what rock cubes do
end,
}