mirror of
https://github.com/LDDestroier/CC/
synced 2025-01-05 15:00:28 +00:00
Add files via upload
This commit is contained in:
parent
e4fb776d54
commit
e58d3515d1
37
CCBN/ccbn-data/chipdata/airshot1
Normal file
37
CCBN/ccbn-data/chipdata/airshot1
Normal 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
|
||||
}
|
37
CCBN/ccbn-data/chipdata/airshot2
Normal file
37
CCBN/ccbn-data/chipdata/airshot2
Normal 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
|
||||
}
|
37
CCBN/ccbn-data/chipdata/airshot3
Normal file
37
CCBN/ccbn-data/chipdata/airshot3
Normal 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
|
||||
}
|
43
CCBN/ccbn-data/chipdata/areagrab
Normal file
43
CCBN/ccbn-data/chipdata/areagrab
Normal 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
|
||||
}
|
27
CCBN/ccbn-data/chipdata/bigbomb
Normal file
27
CCBN/ccbn-data/chipdata/bigbomb
Normal 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
|
||||
}
|
54
CCBN/ccbn-data/chipdata/boomer1
Normal file
54
CCBN/ccbn-data/chipdata/boomer1
Normal 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
|
||||
}
|
24
CCBN/ccbn-data/chipdata/buster
Normal file
24
CCBN/ccbn-data/chipdata/buster
Normal 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
|
||||
}
|
17
CCBN/ccbn-data/chipdata/busterup
Normal file
17
CCBN/ccbn-data/chipdata/busterup
Normal 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
|
||||
}
|
24
CCBN/ccbn-data/chipdata/cannon
Normal file
24
CCBN/ccbn-data/chipdata/cannon
Normal 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
|
||||
}
|
17
CCBN/ccbn-data/chipdata/crackout
Normal file
17
CCBN/ccbn-data/chipdata/crackout
Normal 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
|
||||
}
|
27
CCBN/ccbn-data/chipdata/crossbomb
Normal file
27
CCBN/ccbn-data/chipdata/crossbomb
Normal 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
|
||||
}
|
31
CCBN/ccbn-data/chipdata/crossgun
Normal file
31
CCBN/ccbn-data/chipdata/crossgun
Normal 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
|
||||
}
|
36
CCBN/ccbn-data/chipdata/dash
Normal file
36
CCBN/ccbn-data/chipdata/dash
Normal 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
|
||||
}
|
18
CCBN/ccbn-data/chipdata/doublecrack
Normal file
18
CCBN/ccbn-data/chipdata/doublecrack
Normal 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
|
||||
}
|
19
CCBN/ccbn-data/chipdata/doubleshot
Normal file
19
CCBN/ccbn-data/chipdata/doubleshot
Normal 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
|
||||
}
|
19
CCBN/ccbn-data/chipdata/fightersword
Normal file
19
CCBN/ccbn-data/chipdata/fightersword
Normal 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
|
||||
}
|
21
CCBN/ccbn-data/chipdata/geddon1
Normal file
21
CCBN/ccbn-data/chipdata/geddon1
Normal 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
|
||||
}
|
21
CCBN/ccbn-data/chipdata/geddon2
Normal file
21
CCBN/ccbn-data/chipdata/geddon2
Normal 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
|
||||
}
|
24
CCBN/ccbn-data/chipdata/hicannon
Normal file
24
CCBN/ccbn-data/chipdata/hicannon
Normal 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
|
||||
}
|
15
CCBN/ccbn-data/chipdata/invis
Normal file
15
CCBN/ccbn-data/chipdata/invis
Normal 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
|
||||
}
|
22
CCBN/ccbn-data/chipdata/lifesword
Normal file
22
CCBN/ccbn-data/chipdata/lifesword
Normal 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
|
||||
}
|
25
CCBN/ccbn-data/chipdata/lilbomb
Normal file
25
CCBN/ccbn-data/chipdata/lilbomb
Normal 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
|
||||
}
|
18
CCBN/ccbn-data/chipdata/longsword
Normal file
18
CCBN/ccbn-data/chipdata/longsword
Normal 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
|
||||
}
|
24
CCBN/ccbn-data/chipdata/mcannon
Normal file
24
CCBN/ccbn-data/chipdata/mcannon
Normal 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
|
||||
}
|
23
CCBN/ccbn-data/chipdata/minibomb
Normal file
23
CCBN/ccbn-data/chipdata/minibomb
Normal 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
|
||||
}
|
17
CCBN/ccbn-data/chipdata/muramasa
Normal file
17
CCBN/ccbn-data/chipdata/muramasa
Normal 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
|
||||
}
|
37
CCBN/ccbn-data/chipdata/panelgrab
Normal file
37
CCBN/ccbn-data/chipdata/panelgrab
Normal 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
|
||||
}
|
34
CCBN/ccbn-data/chipdata/panelgrab_internal
Normal file
34
CCBN/ccbn-data/chipdata/panelgrab_internal
Normal 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
|
||||
}
|
23
CCBN/ccbn-data/chipdata/panelreturn
Normal file
23
CCBN/ccbn-data/chipdata/panelreturn
Normal 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
|
||||
}
|
35
CCBN/ccbn-data/chipdata/panelshot
Normal file
35
CCBN/ccbn-data/chipdata/panelshot
Normal 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
|
||||
}
|
15
CCBN/ccbn-data/chipdata/recov10
Normal file
15
CCBN/ccbn-data/chipdata/recov10
Normal 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,
|
||||
}
|
15
CCBN/ccbn-data/chipdata/recov120
Normal file
15
CCBN/ccbn-data/chipdata/recov120
Normal 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,
|
||||
}
|
15
CCBN/ccbn-data/chipdata/recov150
Normal file
15
CCBN/ccbn-data/chipdata/recov150
Normal 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,
|
||||
}
|
15
CCBN/ccbn-data/chipdata/recov200
Normal file
15
CCBN/ccbn-data/chipdata/recov200
Normal 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,
|
||||
}
|
15
CCBN/ccbn-data/chipdata/recov30
Normal file
15
CCBN/ccbn-data/chipdata/recov30
Normal 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,
|
||||
}
|
15
CCBN/ccbn-data/chipdata/recov300
Normal file
15
CCBN/ccbn-data/chipdata/recov300
Normal 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,
|
||||
}
|
15
CCBN/ccbn-data/chipdata/recov50
Normal file
15
CCBN/ccbn-data/chipdata/recov50
Normal 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,
|
||||
}
|
15
CCBN/ccbn-data/chipdata/recov80
Normal file
15
CCBN/ccbn-data/chipdata/recov80
Normal 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,
|
||||
}
|
17
CCBN/ccbn-data/chipdata/rockcube
Normal file
17
CCBN/ccbn-data/chipdata/rockcube
Normal 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
|
||||
}
|
30
CCBN/ccbn-data/chipdata/shockwave
Normal file
30
CCBN/ccbn-data/chipdata/shockwave
Normal 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
|
||||
}
|
28
CCBN/ccbn-data/chipdata/shotgun
Normal file
28
CCBN/ccbn-data/chipdata/shotgun
Normal 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
|
||||
}
|
29
CCBN/ccbn-data/chipdata/sidegun
Normal file
29
CCBN/ccbn-data/chipdata/sidegun
Normal 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
|
||||
}
|
31
CCBN/ccbn-data/chipdata/spreader
Normal file
31
CCBN/ccbn-data/chipdata/spreader
Normal 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
|
||||
}
|
28
CCBN/ccbn-data/chipdata/supervulcan
Normal file
28
CCBN/ccbn-data/chipdata/supervulcan
Normal 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
|
||||
}
|
17
CCBN/ccbn-data/chipdata/sword
Normal file
17
CCBN/ccbn-data/chipdata/sword
Normal 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
|
||||
}
|
19
CCBN/ccbn-data/chipdata/triplecrack
Normal file
19
CCBN/ccbn-data/chipdata/triplecrack
Normal 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
|
||||
}
|
20
CCBN/ccbn-data/chipdata/tripleshot
Normal file
20
CCBN/ccbn-data/chipdata/tripleshot
Normal 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
|
||||
}
|
29
CCBN/ccbn-data/chipdata/vgun
Normal file
29
CCBN/ccbn-data/chipdata/vgun
Normal 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
|
||||
}
|
28
CCBN/ccbn-data/chipdata/vulcan1
Normal file
28
CCBN/ccbn-data/chipdata/vulcan1
Normal 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
|
||||
}
|
28
CCBN/ccbn-data/chipdata/vulcan2
Normal file
28
CCBN/ccbn-data/chipdata/vulcan2
Normal 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
|
||||
}
|
28
CCBN/ccbn-data/chipdata/vulcan3
Normal file
28
CCBN/ccbn-data/chipdata/vulcan3
Normal 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
|
||||
}
|
25
CCBN/ccbn-data/chipdata/vulcan_internal
Normal file
25
CCBN/ccbn-data/chipdata/vulcan_internal
Normal 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
|
||||
}
|
19
CCBN/ccbn-data/chipdata/widesword
Normal file
19
CCBN/ccbn-data/chipdata/widesword
Normal 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
|
||||
}
|
13
CCBN/ccbn-data/objectdata/rockcube
Normal file
13
CCBN/ccbn-data/objectdata/rockcube
Normal 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,
|
||||
}
|
Loading…
Reference in New Issue
Block a user