v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
Binary file not shown.
After Width: | Height: | Size: 262 B |
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"animationCustom" : {
|
||||
"animatedParts" : { "parts" : {
|
||||
"bayonet" : {
|
||||
"properties" : {
|
||||
"zLevel" : -1,
|
||||
"centered" : true,
|
||||
"offset" : [2.75, -0.25],
|
||||
"image" : "/items/active/weapons/ranged/abilities/generic/bayonet.png"
|
||||
}
|
||||
}
|
||||
}},
|
||||
"sounds" : {
|
||||
"stab" : [ "/sfx/melee/swing_dagger.ogg" ]
|
||||
}
|
||||
},
|
||||
|
||||
"ability" : {
|
||||
"type" : "bayonet",
|
||||
"scripts" : []
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
function setupAbility(altAbilityConfig)
|
||||
local knockbackAttack = altAbilityConfig
|
||||
|
||||
function knockbackAttack.init()
|
||||
-- sb.logInfo("Initializing knockbackAttack")
|
||||
end
|
||||
|
||||
function knockbackAttack.update(dt, fireMode, shiftHeld)
|
||||
if fireMode == "alt"
|
||||
and storage.fireTimer == 0
|
||||
and not world.pointTileCollision(firePosition())
|
||||
and status.overConsumeResource("energy", knockbackAttack.energyCost) then
|
||||
|
||||
storage.fireTimer = knockbackAttack.cooldown -- TODO: maybe use separate cooldown?
|
||||
-- TODO: appropriate projectile
|
||||
animator.setAnimationState("firing", "fire", true)
|
||||
animator.setPartTag("muzzleFlash", "variant", math.random(1, 3))
|
||||
animator.playSound("knockback")
|
||||
animator.burstParticleEmitter("knockback")
|
||||
self.recoilTimer = config.getParameter("recoilTime", 0.08)
|
||||
mcontroller.addMomentum(vec2.mul(aimVector(), -knockbackAttack.momentum))
|
||||
-- TODO: knock back enemies
|
||||
end
|
||||
end
|
||||
|
||||
return knockbackAttack
|
||||
end
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"animationCustom" : {
|
||||
"sounds" : {
|
||||
"knockback" : [ "/sfx/gun/grenadeblast1.ogg", "/sfx/gun/grenadeblast2.ogg", "/sfx/gun/grenadeblast3.ogg" ]
|
||||
},
|
||||
"particleEmitters" : {
|
||||
"knockback" : {
|
||||
"emissionRate" : 10.0,
|
||||
"particles" : [
|
||||
{
|
||||
"particle" : {
|
||||
"type" : "animated",
|
||||
"animation" : "/animations/smoke/smoke.animation",
|
||||
"timeToLive" : 0.8,
|
||||
"initialVelocity" : [10.0, 0.0],
|
||||
"finalVelocity" : [1.0, 2.0],
|
||||
"approach" : [15, 10],
|
||||
"variance" : {
|
||||
"position" : [0, 0.5],
|
||||
"initialVelocity" : [5.0, 3.0],
|
||||
"timeToLive" : 0.2
|
||||
}
|
||||
},
|
||||
"offset" : [2.75, 0.125],
|
||||
"count" : 2
|
||||
},
|
||||
{
|
||||
"particle" : {
|
||||
"type" : "animated",
|
||||
"animation" : "/animations/mediumflame/mediumflame.animation",
|
||||
"timeToLive" : 0.6,
|
||||
"initialVelocity" : [10.0, 0.0],
|
||||
"finalVelocity" : [1.0, 2.0],
|
||||
"approach" : [15, 7],
|
||||
"variance" : {
|
||||
"position" : [0, 0.5],
|
||||
"initialVelocity" : [5.0, 3.0],
|
||||
"timeToLive" : 0.2
|
||||
}
|
||||
},
|
||||
"offset" : [2.75, 0.125],
|
||||
"count" : 4
|
||||
},
|
||||
{
|
||||
"particle" : {
|
||||
"type" : "ember",
|
||||
"color" : [240, 230, 70, 255],
|
||||
"light" : [160, 120, 70],
|
||||
"fade" : 0.9,
|
||||
"initialVelocity" : [20, 0.0],
|
||||
"finalVelocity" : [0, -10.0],
|
||||
"approach" : [10, 20],
|
||||
"timeToLive" : 0.6,
|
||||
"layer" : "middle",
|
||||
"variance" : {
|
||||
"position" : [0, 0.5],
|
||||
"size" : 0.5,
|
||||
"initialVelocity" : [10.0, 4.0],
|
||||
"timeToLive" : 0.2
|
||||
}
|
||||
},
|
||||
"offset" : [2.75, 0.125],
|
||||
"count" : 10
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ability" : {
|
||||
"type" : "knockback",
|
||||
"scripts" : ["/items/active/weapons/ranged/abilities/shotgun/knockbackattack.lua"],
|
||||
"cooldown" : 2.0,
|
||||
"energyCost" : 30,
|
||||
"momentum" : 20
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"frameGrid" : {
|
||||
"size" : [96, 48],
|
||||
"dimensions" : [3, 1],
|
||||
|
||||
"names" : [
|
||||
[ "1", "2", "3" ]
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
require "/scripts/poly.lua"
|
||||
require "/scripts/vec2.lua"
|
||||
|
||||
function setupAbility(altAbilityConfig)
|
||||
local vacuum = WeaponAbility:new()
|
||||
|
||||
function vacuum:init()
|
||||
self.cooldownTimer = 0
|
||||
self:reset()
|
||||
end
|
||||
|
||||
function vacuum:update(dt, fireMode, shiftHeld)
|
||||
WeaponAbility.update(self, dt, fireMode, shiftHeld)
|
||||
|
||||
self.cooldownTimer = math.max(0, self.cooldownTimer - self.dt)
|
||||
|
||||
if self.fireMode == "alt"
|
||||
and not self.active
|
||||
and self.cooldownTimer == 0
|
||||
and not status.resourceLocked("energy") then
|
||||
|
||||
self:setState(self.fire)
|
||||
end
|
||||
end
|
||||
|
||||
function vacuum:fire()
|
||||
self.weapon:setStance(self.stances.fire)
|
||||
-- self.weapon.aimAngle = 0
|
||||
-- self.weapon:updateAim()
|
||||
animator.setAnimationState("vacuum", "active")
|
||||
animator.playSound("vacuumStart")
|
||||
animator.playSound("vacuumLoop", -1)
|
||||
|
||||
local vacuumPoint = {
|
||||
type = "RadialForceRegion",
|
||||
center = animator.partPoint("vacuumCone", "vacuumPoint"),
|
||||
targetRadialVelocity = self.pointSpeed,
|
||||
outerRadius = 1.5,
|
||||
innerRadius = 0.5,
|
||||
controlForce = self.pointForce
|
||||
}
|
||||
|
||||
self.active = true
|
||||
|
||||
while self.fireMode == "alt" and status.overConsumeResource("energy", self.energyUsage * self.dt) do
|
||||
mcontroller.controlModifiers({runningSuppressed = true})
|
||||
|
||||
local forceVector = vec2.rotate(self.coneSpeed, self.weapon.aimAngle)
|
||||
forceVector[1] = forceVector[1] * self.weapon.aimDirection
|
||||
|
||||
local vacuumConeTop = {
|
||||
type = "DirectionalForceRegion",
|
||||
polyRegion = animator.partPoly("vacuumCone", "vacuumPolyTop"),
|
||||
xTargetVelocity = forceVector[1],
|
||||
yTargetVelocity = -forceVector[2],
|
||||
controlForce = self.coneForce
|
||||
}
|
||||
local vacuumConeBottom = {
|
||||
type = "DirectionalForceRegion",
|
||||
polyRegion = animator.partPoly("vacuumCone", "vacuumPolyBottom"),
|
||||
xTargetVelocity = forceVector[1],
|
||||
yTargetVelocity = forceVector[2],
|
||||
controlForce = self.coneForce
|
||||
}
|
||||
activeItem.setItemForceRegions({vacuumConeTop, vacuumConeBottom, vacuumPoint})
|
||||
|
||||
coroutine.yield()
|
||||
end
|
||||
|
||||
activeItem.setItemForceRegions({})
|
||||
|
||||
animator.setAnimationState("vacuum", "idle")
|
||||
animator.stopAllSounds("vacuumLoop")
|
||||
|
||||
self.cooldownTimer = self.cooldownTime
|
||||
|
||||
self.active = false
|
||||
end
|
||||
|
||||
function vacuum:reset()
|
||||
animator.setAnimationState("vacuum", "idle")
|
||||
animator.stopAllSounds("vacuumLoop")
|
||||
activeItem.setItemForceRegions({})
|
||||
self.active = false
|
||||
end
|
||||
|
||||
function vacuum:uninit()
|
||||
self:reset()
|
||||
end
|
||||
|
||||
return vacuum
|
||||
end
|
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"animationCustom" : {
|
||||
"animatedParts" : {
|
||||
"stateTypes" : {
|
||||
"vacuum" : {
|
||||
"default" : "idle",
|
||||
"states" : {
|
||||
"idle" : { },
|
||||
"active" : {
|
||||
"frames" : 3,
|
||||
"cycle" : 0.3,
|
||||
"mode" : "loop"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parts" : {
|
||||
"vacuumCone" : {
|
||||
"properties" : {
|
||||
"zLevel" : -1,
|
||||
"centered" : true,
|
||||
"offset" : [6.0, 0.0],
|
||||
"transformationGroups" : [ "muzzle" ],
|
||||
"vacuumPolyTop" : [ [-4.5, 0], [-4.5, 1.5], [6.0, 4.0], [6.0, 0] ],
|
||||
"vacuumPolyBottom" : [ [-4.5, -1.5], [-4.5, 0], [6.0, 0], [6.0, -4.0] ],
|
||||
"vacuumPoint" : [-5.0, 0.25]
|
||||
},
|
||||
"partStates" : {
|
||||
"vacuum" : {
|
||||
"idle" : {
|
||||
"properties" : {
|
||||
"image" : ""
|
||||
}
|
||||
},
|
||||
"active" : {
|
||||
"properties" : {
|
||||
"image" : "/items/active/weapons/ranged/abilities/vacuum/vacuum.png:<frame>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sounds" : {
|
||||
"vacuumStart" : [ ],
|
||||
"vacuumLoop" : [ ]
|
||||
}
|
||||
},
|
||||
|
||||
"ability" : {
|
||||
"type" : "vacuum",
|
||||
"scripts" : ["/items/active/weapons/ranged/abilities/vacuum/vacuum.lua"],
|
||||
|
||||
"cooldownTime" : 0.5,
|
||||
|
||||
"coneSpeed" : [-20, 5],
|
||||
"coneForce" : 400,
|
||||
"pointSpeed" : -10,
|
||||
"pointForce" : 500,
|
||||
|
||||
"energyUsage" : 20,
|
||||
|
||||
"stances" : {
|
||||
"fire" : {
|
||||
"armRotation" : 0,
|
||||
"weaponRotation" : 0,
|
||||
"twoHanded" : true,
|
||||
|
||||
"allowRotate" : true,
|
||||
"allowFlip" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"animationCustom" : {
|
||||
"sounds" : {
|
||||
"altFire" : [ "/sfx/gun/blowgun1.ogg", "/sfx/gun/blowgun2.ogg", "/sfx/gun/blowgun3.ogg" ]
|
||||
},
|
||||
"particleEmitters" : {
|
||||
"altMuzzleFlash" : {
|
||||
"active" : false,
|
||||
"emissionRate" : 8,
|
||||
"transformationGroups" : ["muzzle"],
|
||||
"offsetRegion" : [0, 0, 0, 0],
|
||||
"particles" : [ ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ability" : {
|
||||
"type" : "vacuumsphere",
|
||||
"scripts" : ["/items/active/weapons/ranged/abilities/altfire.lua"],
|
||||
|
||||
"elementalProjectiles" : {
|
||||
"physical" : "vacuumsphereprimer",
|
||||
"fire" : "vacuumsphereprimer",
|
||||
"electric" : "vacuumsphereprimer",
|
||||
"ice" : "vacuumsphereprimer",
|
||||
"poison" : "vacuumsphereprimer"
|
||||
},
|
||||
"projectileParameters" : {},
|
||||
"projectileCount" : 1,
|
||||
"inaccuracy" : 0,
|
||||
"baseDps" : 0,
|
||||
"energyUsageMultiplier" : 0.5,
|
||||
"fireTime" : 2.0,
|
||||
"fireType" : "auto",
|
||||
|
||||
"stances" : {
|
||||
"fire" : {
|
||||
"duration" : 0.15,
|
||||
"armRotation" : 5,
|
||||
"weaponRotation" : 5,
|
||||
"twoHanded" : true,
|
||||
|
||||
"allowRotate" : false,
|
||||
"allowFlip" : false
|
||||
},
|
||||
"cooldown" : {
|
||||
"duration" : 0.15,
|
||||
"armRotation" : 5,
|
||||
"weaponRotation" : 5,
|
||||
"twoHanded" : true,
|
||||
|
||||
"allowRotate" : false,
|
||||
"allowFlip" : false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue