This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

View file

@ -0,0 +1,268 @@
{
"animatedParts" : {
"stateTypes" : {
"default" : {
"priority" : 0,
"default" : "idle",
"states" : {
"idle" : {
"frames" : 1,
"mode" : "loop"
},
"shoot" : {
"frames" : 4,
"cycle" : 1.5,
"mode" : "transition",
"transition" : "recoil"
},
"recoil" : {
"frames" : 4,
"cycle" : 1.5,
"mode" : "transition",
"transition" : "idle"
},
"die" : {
"frames" : 1,
"cycle" : 0.5,
"mode" : "transition",
"transition" : "invisible"
},
"invisible" : {
"frames" : 1
}
}
}
},
"parts" : {
"body" : {
"partStates" : {
"default" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle.<frame>"
}
},
"shoot" : {
"properties" : {
"image" : "<partImage>:shoot.<frame>"
}
},
"recoil" : {
"properties" : {
"image" : "<partImage>:recoil.<frame>"
}
},
"die" : {
"properties" : {
"image" : "<partImage>:die.<frame>"
}
},
"invisible" : {
"properties" : {
"image" : "<partImage>:invisible"
}
}
}
}
}
}
},
"particleEmitters" : {
"deathPoof" : {
"particles" : [
{
"particle" : {
"type" : "animated",
"animation" : "/animations/puff2c/puff2c.animation",
"size" : 1,
"angularVelocity" : 35,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [0, 0],
"finalVelocity" : [0, 0],
"approach" : [1, 1],
"timeToLive" : 0.4,
"layer" : "middle"
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
}
]
}
},
"effects" : {
"blink" : {
"type" : "flash",
"time" : 0.25,
"directives" : "fade=ffffff;0.5"
}
},
"sounds" : {
"turnHostile" : [ ],
"deathPuff" : [ "/sfx/npc/enemydeathpuff.ogg" ]
}
}

View file

@ -0,0 +1,104 @@
{
"type" : "allergen",
"categories" : [ "allergen" ],
"parts" : [ "body" ],
"animation" : "allergen.animation",
"dropPools" : [ "basicMonsterTreasure" ],
"baseParameters" : {
"scripts" : [
"/monsters/dungeon/allergen/behavior.lua",
"/scripts/sensors.lua",
"/scripts/stateMachine.lua",
"/scripts/util.lua",
"/scripts/vec2.lua"
],
"metaBoundBox" : [-2.5, -2.5, 2.5, 2.5],
"scale" : 1.0,
"movementSettings" : {
"collisionPoly" : [ [-2.0, -2.5], [2.0, -2.5], [0.5, 1.0], [-0.5, 1.0] ],
"mass" : 100.0,
"walkSpeed" : 0,
"runSpeed" : 0,
"jumpSpeed" : 0,
"flySpeed" : 0,
"airFriction" : 100.0,
"airForce" : 0.0
},
"bodyMaterialKind" : "organic",
"knockoutTime" : 0.1,
"knockoutEffect" : "blink",
"deathParticles" : "deathPoof",
"touchDamage" : {
"poly" : [ [-2.0, -2.5], [2.0, -2.5], [0.5, 1.0], [-0.5, 1.0] ],
"damage" : 15,
"teamType" : "enemy",
"damageSourceKind" : "testpoison",
"statusEffects" : [ ]
},
"statusSettings" : {
"statusProperties" : {
"targetMaterialKind" : "organic"
},
"appliesEnvironmentStatusEffects" : false,
"minimumLiquidStatusEffectPercentage" : 0.1,
"primaryScriptSources" : [
"/stats/monster_primary.lua"
],
"primaryScriptDelta" : 5,
"stats" : {
"knockbackStunTime" : {
"baseValue" : 0.25
},
"knockbackThreshold" : {
"baseValue" : 10
},
"maxHealth" : {
"baseValue" : 9
},
"protection" : {
"baseValue" : 1.0
},
"healthRegen" : {
"baseValue" : 0.0
}
},
"resources" : {
"stunned" : {
"deltaValue" : -1.0,
"initialValue" : 0.0
},
"health" : {
"maxStat" : "maxHealth",
"deltaStat" : "healthRegen",
"defaultPercentage" : 100
}
}
},
"shoot" : {
"seedShotDistance" : 30,
"pollenShotDistance" : 5,
"fireTime" : 1.5,
"recoilTime" : 1.5
},
"mouthOffset" : [0, 0],
"feetOffset" : [0, -20]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,99 @@
function init()
self.dead = false
self.sensors = sensors.create()
self.state = stateMachine.create({
"idleState",
"shootState",
})
self.state.leavingState = function(stateName)
entity.setAnimationState("default", "idle")
end
entity.setDamageOnTouch(true)
entity.setAggressive(true)
entity.setAnimationState("default", "idle")
end
function update(dt)
if util.trackTarget(entity.configParameter("shoot.seedShotDistance")) then
self.state.pickState({ targetId = self.targetId })
end
self.state.update(dt)
self.sensors.clear()
end
function damage(args)
if entity.health() <= 0 then
self.state.pickState({ die = true })
else
self.state.pickState({ targetId = args.sourceId })
end
end
--------------------------------------------------------------------------------
idleState = {}
function idleState.enter()
return { }
end
function idleState.update(dt, stateData)
entity.setAnimationState("default", "idle")
return true
end
--------------------------------------------------------------------------------
shootState = {}
function shootState.enterWith(args)
if args.targetId == nil then return nil end
local targetPosition = world.entityPosition(args.targetId)
if targetPosition == nil then return nil end
return {
targetId = args.targetId,
targetPosition = targetPosition,
shotFired = false,
timer = entity.configParameter("shoot.fireTime"),
recoilTimer = entity.configParameter("shoot.recoilTime"),
}
end
function shootState.update(dt, stateData)
entity.setAnimationState("default", "shoot")
stateData.timer = stateData.timer - dt
if stateData.timer <= 0 then
if not stateData.shotFired then
local randDir = math.random() * math.pi -- 0 to pi
local direction = {
math.cos(randDir),
math.sin(randDir)
}
local oldTid = self.targetId
self.targetId = nil
if util.trackTarget(entity.configParameter("shoot.pollenShotDistance")) then
-- entity.setFireDirection({0, 0}, direction)
-- entity.startFiring("pollen")
else
self.targetId = oldTid
-- entity.setFireDirection({0, 0}, direction)
-- entity.startFiring("seed")
end
stateData.shotFired = true
else
-- entity.stopFiring()
end
stateData.recoilTimer = stateData.recoilTimer - dt
end
if stateData.recoilTimer <= 0 then
self.targetId = nil
return true
end
return false
end

View file

@ -0,0 +1,9 @@
{
"name" : "body",
"category" : "allergen",
"type" : "body",
"frames" : {
"body" : "allergen.png"
}
}

View file

@ -0,0 +1,16 @@
{
"frameGrid" : {
"size" : [40, 40],
"dimensions" : [5, 3],
"names" : [
[ null, "idle.1", null, null, "invisible" ],
[ null, "shoot.1", "shoot.2", "shoot.3", "shoot.4" ],
[ null, "recoil.1", "recoil.2", "recoil.3", "recoil.4" ]
]
},
"aliases" : {
"die.1" : "recoil.2",
"portrait" : "idle.1"
}
}

View file

@ -0,0 +1,258 @@
{
"animatedParts" : {
"stateTypes" : {
"movement" : {
"priority" : 0,
"default" : "idle",
"states" : {
"idle" : {
"frames" : 1,
"cycle" : 0,
"mode" : "loop"
},
"move" : {
"frames" : 8,
"cycle" : 1,
"mode" : "loop"
},
"moveshoot" : {
"frames" : 8,
"cycle" : 1,
"mode" : "loop"
},
"attack" : {
"frames" : 5,
"cycle" : 1,
"mode" : "loop"
}
}
}
},
"parts" : {
"body" : {
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle.<frame>"
}
},
"move" : {
"properties" : {
"image" : "<partImage>:move.<frame>"
}
},
"aggro" : {
"properties" : {
"image" : "<partImage>:aggro"
}
},
"attack" : {
"properties" : {
"image" : "<partImage>:attack.<frame>"
}
}
}
}
}
}
},
"particleEmitters" : {
"deathPoof" : {
"particles" : [
{
"particle" : {
"type" : "animated",
"animation" : "/animations/puff2c/puff2c.animation",
"size" : 1,
"angularVelocity" : 35,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [0, 0],
"finalVelocity" : [0, 0],
"approach" : [1, 1],
"timeToLive" : 0.4,
"layer" : "middle"
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
}
]
}
},
"effects" : {
"blink" : {
"type" : "flash",
"time" : 0.25,
"directives" : "fade=ffffff;0.5"
}
},
"sounds" : {
"turnHostile" : [ ],
"deathPuff" : [ "/sfx/npc/enemydeathpuff.ogg" ]
}
}

View file

@ -0,0 +1,107 @@
{
"type" : "aviansentry",
"categories" : [ "aviansentry" ],
"parts" : [ "body" ],
"animation" : "aviansentry.animation",
"dropPools" : [ "basicMonsterTreasure" ],
"baseParameters" : {
"scripts" : [
"/monsters/dungeon/aviansentry/behavior.lua",
"/scripts/sensors.lua",
"/scripts/stateMachine.lua",
"/scripts/util.lua",
"/scripts/vec2.lua"
],
"damageTeam" : 1,
"metaBoundBox" : [-1.0, -1.0, 1.0, 1.0],
"scale" : 1.0,
"movementSettings" : {
"collisionPoly" : [ [-2.0, -3.0], [2.0, -3.0], [2.0, 3.0], [-2.0, 3.0] ],
"mass" : 0.2,
"walkSpeed" : 3,
"runSpeed" : 3,
"jumpSpeed" : 5,
"flySpeed" : 15,
"airFriction" : 0.25,
"airForce" : 50.0
},
"bodyMaterialKind" : "organic",
"knockoutTime" : 0.1,
"knockoutEffect" : "blink",
"deathParticles" : "deathPoof",
"touchDamage" : {
"poly" : [ [-1.0, -0.65], [1.0, -0.65], [1.0, 0.65], [-1.0, 0.65] ],
"damage" : 15,
"teamType" : "enemy",
"damageSourceKind" : "bite",
"statusEffects" : [ ]
},
"statusSettings" : {
"statusProperties" : {
"targetMaterialKind" : "organic"
},
"appliesEnvironmentStatusEffects" : false,
"minimumLiquidStatusEffectPercentage" : 0.1,
"primaryScriptSources" : [
"/stats/monster_primary.lua"
],
"primaryScriptDelta" : 5,
"stats" : {
"knockbackStunTime" : {
"baseValue" : 0.25
},
"knockbackThreshold" : {
"baseValue" : 10
},
"maxHealth" : {
"baseValue" : 72
},
"protection" : {
"baseValue" : 1.0
},
"healthRegen" : {
"baseValue" : 0.0
}
},
"resources" : {
"stunned" : {
"deltaValue" : -1.0,
"initialValue" : 0.0
},
"health" : {
"maxStat" : "maxHealth",
"deltaStat" : "healthRegen",
"defaultPercentage" : 100
}
}
},
"mouthOffset" : [0, 0],
"feetOffset" : [0, -8],
"collisionSensors" : [ [-1.25, 0.0], [1.25, 0.0] ],
"moveTimeRange" : [2.5, 5.0],
"cleanTimeRange" : [1.0, 3.0],
"attackTargetHoldTime" : 5.0,
"attackDistance" : 2.0
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,137 @@
function init()
self.sensors = sensors.create()
self.state = stateMachine.create({
"moveState",
"cleanState",
"attackState"
})
self.state.leavingState = function(stateName)
entity.setAnimationState("movement", "idle")
end
entity.setAggressive(false)
entity.setDeathParticleBurst("deathPoof")
entity.setAnimationState("movement", "idle")
end
function update(dt)
self.state.update(dt)
self.sensors.clear()
end
function damage(args)
self.state.pickState(args.sourceId)
end
function move(direction)
entity.setAnimationState("movement", "move")
mcontroller.controlMove(direction, true)
end
--------------------------------------------------------------------------------
moveState = {}
function moveState.enter()
local direction
if math.random(100) > 50 then
direction = 1
else
direction = -1
end
return {
timer = entity.randomizeParameterRange("moveTimeRange"),
direction = direction
}
end
function moveState.update(dt, stateData)
if self.sensors.collisionSensors.collision.any(true) then
stateData.direction = -stateData.direction
end
move(stateData.direction)
stateData.timer = stateData.timer - dt
if stateData.timer <= 0 then
return true, 1.0
end
return false
end
--------------------------------------------------------------------------------
cleanState = {}
function cleanState.enter()
return { timer = entity.randomizeParameterRange("cleanTimeRange") }
end
function cleanState.update(dt, stateData)
stateData.timer = stateData.timer - dt
return stateData.timer <= 0
end
--------------------------------------------------------------------------------
attackState = {}
function attackState.enterWith(targetId)
if targetId == 0 then return nil end
attackState.setAggressive(targetId)
return { timer = entity.configParameter("attackTargetHoldTime") }
end
function attackState.update(dt, stateData)
util.trackExistingTarget()
if self.targetPosition ~= nil then
local toTarget = world.distance(self.targetPosition, mcontroller.position())
if world.magnitude(toTarget) < entity.configParameter("attackDistance") then
attackState.setAttackEnabled(true)
else
attackState.setAttackEnabled(false)
move(util.toDirection(toTarget[1]))
end
end
if self.targetId == nil then
stateData.timer = stateData.timer - dt
else
stateData.timer = entity.configParameter("attackTargetHoldTime")
end
if stateData.timer <= 0 then
attackState.setAttackEnabled(false)
attackState.setAggressive(nil)
return true
else
return false
end
end
function attackState.setAttackEnabled(enabled)
if enabled then
entity.setAnimationState("movement", "attack")
else
entity.setAnimationState("movement")
end
entity.setDamageOnTouch(enabled)
end
function attackState.setAggressive(targetId)
self.targetId = targetId
if targetId ~= nil then
entity.setAnimationState("movement")
entity.setAggressive(true)
else
entity.setAnimationState("movement", "idle")
entity.setAggressive(false)
end
end

View file

@ -0,0 +1,9 @@
{
"name" : "body",
"category" : "aviansentry",
"type" : "body",
"frames" : {
"body" : "aviansentry.png"
}
}

View file

@ -0,0 +1,75 @@
{
"cooldownDuration" : 0.1,
"energyResponses" : [
{
"threshold" : 0,
"invulnerabilityDuration" : 0,
"invulnerabilityMode" : "none",
"knockbackMagnitude" : 0,
"knockbackSkidDuration" : 0,
"knockbackMode" : "normal",
"knockbackAngle" : 0,
"stunDuration" : 0,
"stunMode" : "none"
}
],
"healthResponses" : [
{
"threshold" : 0,
"invulnerabilityDuration" : 0,
"invulnerabilityMode" : "none",
"knockbackMagnitude" : 0,
"knockbackSkidDuration" : 0,
"knockbackMode" : "normal",
"knockbackAngle" : 0,
"stunDuration" : 0,
"stunMode" : "none"
},
{
"threshold" : 0.06,
"invulnerabilityDuration" : 0,
"invulnerabilityMode" : "none",
"knockbackMagnitude" : 0,
"knockbackSkidDuration" : 0,
"knockbackMode" : "normal",
"knockbackAngle" : 0,
"stunDuration" : 0,
"stunMode" : "none"
},
{
"threshold" : 0.16,
"invulnerabilityDuration" : 0,
"invulnerabilityMode" : "none",
"knockbackMagnitude" : 0,
"knockbackSkidDuration" : 0,
"knockbackMode" : "normal",
"knockbackAngle" : 0,
"stunDuration" : 0,
"stunMode" : "none"
},
{
"threshold" : 0.26,
"invulnerabilityDuration" : 0,
"invulnerabilityMode" : "none",
"knockbackMagnitude" : 0,
"knockbackSkidDuration" : 0,
"knockbackMode" : "normal",
"knockbackAngle" : 0,
"stunDuration" : 0,
"stunMode" : "none"
},
{
"threshold" : 0.51,
"invulnerabilityDuration" : 0,
"invulnerabilityMode" : "none",
"knockbackMagnitude" : 0,
"knockbackSkidDuration" : 0,
"knockbackMode" : "normal",
"knockbackAngle" : 0,
"stunDuration" : 0.1,
"stunMode" : "flyStun"
}
]
}

View file

@ -0,0 +1,13 @@
{
"frameGrid" : {
"size" : [48, 48],
"dimensions" : [9, 4],
"names" : [
[ null, "idle.1", null, null, null, null, null, null, null ],
[ null, "move.1", "move.2", "move.3", "move.4", "move.5", "move.6", "move.7", "move.8" ],
[ null, "moveshoot.1", "moveshoot.2", "moveshoot.3", "moveshoot.4", "moveshoot.5", "moveshoot.6", "moveshoot.7", "moveshoot.8" ],
[ null, "attack.1", "attack.2", "attack.3", "attack.4", "attack.5", null, null, null ]
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
attic/npcs/bee/1/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
attic/npcs/bee/1/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

58
attic/npcs/bee/bee.npc Normal file
View file

@ -0,0 +1,58 @@
{
"npcId" : 0,
"npcName" : "bee",
"aiFunctions" : { "0" : "defaultFlyingWander",
"16" : "defaultFlyingWander",
"18" : "defaultFlyingStalk" },
"stateChangeFunction" : "passiveFlyingCritter",
"hVelocity" : { "0" : 4.0, "16" : 7.0, "18" : 10.0 },
"vVelocity" : { "0" : 1.0, "16" : 1.0, "18" : 2.0 },
"hAccel" : { "0" : 1.0, "16" : 2.0, "18" : 2.0 },
"vAccel" : { "0" : 1.0, "16" : 2.0, "18" : 2.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "fly" : [ "fly", 5, 0.4, 1, 0, 0] },
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-10, 10, 8, -13] ],
"attackBox" : {
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ]
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"fly.0.0" : [ "Default" ],
"fly.0.1" : [ "Default" ],
"fly.0.2" : [ "Default" ],
"fly.0.3" : [ "Default" ],
"fly.0.4" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,11 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [32, 34],
"dimensions" : [10, 1],
"names" : [
[ null, "fly.0.0", "fly.0.1", "fly.0.2", "fly.0.3", "fly.0.4", null, "gibs.0", "gibs.1", "gibs.2" ]
]
}
}

BIN
attic/npcs/bee/body/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

BIN
attic/npcs/boar/1/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
attic/npcs/boar/1/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
attic/npcs/boar/1/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
attic/npcs/boar/1/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
attic/npcs/boar/1/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
attic/npcs/boar/1/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
attic/npcs/boar/2/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
attic/npcs/boar/2/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
attic/npcs/boar/2/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

71
attic/npcs/boar/boar.npc Normal file
View file

@ -0,0 +1,71 @@
{
"npcId" : 1,
"npcName" : "boar",
"aiFunctions" : { "0" : "defaultWander", "1" : "defaultFollow", "8" : "defaultJump", "9" : "defaultJump", "10" : "defaultJump" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 4.0, "1" : 7.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 6, 1.0, 1, 0, 0],
"idle" : [ "idle", 1, 1.0, 0, 0, 0]
},
"jumpStrength" : 0.25,
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-13, 11, 9, -19] ],
"attackBox" : {
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ]
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"jump.0.0" : [ "Default" ],
"jump.0.1" : [ "Default" ],
"jump.0.2" : [ "Default" ],
"jump.0.3" : [ "Default" ],
"jump.0.4" : [ "Default" ],
"jump.0.5" : [ "Default" ],
"attack.0.0" : [ "Default" ],
"attack.0.1" : [ "Default" ],
"attack.0.2" : [ "Default" ],
"attack.0.3" : [ "Default" ],
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,14 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [60, 40],
"dimensions" : [7, 4],
"names" : [
[ "idle.0.0", "walk.0.0", "walk.0.1", "walk.0.2", "walk.0.3", "walk.0.4", "walk.0.5" ],
[ null, "jump.0.0", "jump.0.1", "jump.0.2", "jump.0.3", "jump.0.4", "jump.0.5" ],
[ null, "attack.0.0", "attack.0.1", "attack.0.2", "attack.0.3", "attack.0.4", "attack.0.5" ],
[ null, "gibs.0", "gibs.1", "gibs.2", "gibs.3", "gibs.4", "gibs.5" ]
]
}
}

BIN
attic/npcs/boar/body/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
attic/npcs/boar/body/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
attic/npcs/boar/body/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
attic/npcs/boar/body/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

@ -0,0 +1,205 @@
function init()
self.dead = false
self.state = stateMachine.create({
"aggroState",
"spinAttack",
"bombAttack",
"spawnAttack",
"explodeState"
})
self.state.shuffleStates()
entity.setDeathParticleBurst("deathPoof")
end
--------------------------------------------------------------------------------
function update(dt)
if util.trackTarget(entity.configParameter("noticeDistance")) then
attack(self.targetId)
end
entity.setAggressive(self.targetId ~= nil)
entity.setDamageOnTouch(self.targetId ~= nil)
if not self.state.update(dt) then
entity.setAnimationState("movement", "idle")
end
end
--------------------------------------------------------------------------------
function damage(args)
if self.targetId == nil then
attack(args.sourceId)
end
end
--------------------------------------------------------------------------------
function shouldDie()
return entity.health() <= 0 or self.dead
end
--------------------------------------------------------------------------------
function attack(targetId)
local stateName = self.state.stateDesc()
if not string.find(stateName, 'Attack$') and stateName ~= "explodeState" then
if self.state.pickState({ targetId = targetId }) then
self.targetId = targetId
end
end
end
--------------------------------------------------------------------------------
aggroState = {}
function aggroState.enterWith(params)
if params.targetId == nil then return nil end
entity.setAnimationState("movement", "aggro")
return { timer = entity.configParameter("aggroTime") }
end
function aggroState.update(dt, stateData)
mcontroller.controlFly({ 0, entity.configParameter("aggroMoveSpeed") })
stateData.timer = stateData.timer - dt
return stateData.timer <= 0
end
function aggroState.leavingState(stateData)
self.state.pickState({ attack = true })
end
--------------------------------------------------------------------------------
spinAttack = {}
function spinAttack.enterWith(params)
if self.targetId == nil then return true end
if not params.attack then return nil end
entity.setAnimationState("movement", "spin")
return {}
end
function spinAttack.update(dt, stateData)
if self.targetId == nil then return true end
if stateData.targetPosition == nil then
stateData.targetPosition = self.targetPosition
end
local toTarget = world.distance(stateData.targetPosition, mcontroller.position())
if world.magnitude(toTarget) <= 1.0 then
return true
else
mcontroller.controlFly(vec2.mul(vec2.norm(toTarget), mcontroller.baseParameters().flySpeed))
end
return false
end
function spinAttack.leavingState(stateData)
self.state.pickState({ explode = true })
end
--------------------------------------------------------------------------------
bombAttack = {}
function bombAttack.enterWith(params)
if self.targetId == nil then return true end
if not params.attack then return nil end
return {
timer = 0,
totalTime = entity.randomizeParameterRange("bombAttackTimeRange"),
direction = util.randomDirection()
}
end
function bombAttack.enteringState(stateData)
entity.setFireDirection({0, 0}, {1, 0})
-- entity.startFiring("bomb")
end
function bombAttack.update(dt, stateData)
if self.targetId == nil then return true end
mcontroller.controlFly({ 0, 0 })
local ratio = stateData.timer / stateData.totalTime
local angle = ratio * math.pi
local direction = {
math.cos(angle) * stateData.direction,
math.sin(angle)
}
direction = vec2.mul(direction, 2.0)
-- entity.setFireDirection(direction, direction)
stateData.timer = stateData.timer + dt
return stateData.timer >= stateData.totalTime
end
function bombAttack.leavingState(stateData)
-- entity.stopFiring()
self.state.pickState({ explode = true })
end
--------------------------------------------------------------------------------
spawnAttack = {}
function spawnAttack.enterWith(params)
if self.targetId == nil then return true end
if not params.attack then return nil end
return { timer = entity.configParameter("spawnAttackWaitTime") }
end
function spawnAttack.enteringState(stateData)
entity.burstParticleEmitter("deathPoof")
local initialSpeed = entity.configParameter("spawnAttackInitialSpeed")
for _, offset in pairs(entity.configParameter("spawnAttackOffsets")) do
local entityId = world.spawnMonster("glitchspider", entity.toAbsolutePosition(offset))
world.callScriptedEntity(entityId, "setSpawnVelocity", vec2.mul(offset, initialSpeed))
end
end
function spawnAttack.update(dt, stateData)
if self.targetId == nil then return nil end
mcontroller.controlFly({ 0, 0 })
stateData.timer = stateData.timer - dt
return stateData.timer <= 0
end
function spawnAttack.leavingState(stateData)
self.state.pickState({ explode = true })
end
--------------------------------------------------------------------------------
explodeState = {}
function explodeState.enterWith(params)
if not params.explode or self.dead then return nil end
return { timer = entity.configParameter("explodeTime") }
end
function explodeState.enteringState(stateData)
-- entity.startFiring("deathexplosion")
-- entity.setFireDirection({0, 0}, {1, 0})
end
function explodeState.update(dt, stateData)
mcontroller.controlFly({ 0, 0 })
stateData.timer = stateData.timer - dt
return stateData.timer <= 0
end
function explodeState.leavingState(stateData)
-- entity.stopFiring()
self.dead = true
end

View file

@ -0,0 +1,246 @@
{
"animatedParts" : {
"stateTypes" : {
"movement" : {
"priority" : 0,
"default" : "idle",
"states" : {
"idle" : {
"frames" : 1
},
"aggro" : {
"frames" : 3,
"cycle" : 0.25,
"mode" : "end"
},
"spin" : {
"frames" : 8,
"cycle" : 0.5,
"mode" : "loop"
}
}
}
},
"parts" : {
"chest" : {
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:aggro.1"
}
},
"aggro" : {
"properties" : {
"image" : "<partImage>:aggro.<frame>"
}
},
"spin" : {
"properties" : {
"image" : "<partImage>:spin.<frame>"
}
}
}
}
}
}
},
"particleEmitters" : {
"deathPoof" : {
"particles" : [
{
"particle" : {
"type" : "animated",
"animation" : "/animations/puff2c/puff2c.animation",
"size" : 1,
"angularVelocity" : 35,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [0, 0],
"finalVelocity" : [0, 0],
"approach" : [1, 1],
"timeToLive" : 0.4,
"layer" : "middle"
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
}
]
}
},
"effects" : {
"blink" : {
"type" : "flash",
"time" : 0.25,
"directives" : "fade=ffffff;0.5"
}
},
"sounds" : {
"turnHostile" : [ ],
"deathPuff" : [ "/sfx/npc/enemydeathpuff.ogg" ]
}
}

View file

@ -0,0 +1,112 @@
{
"type" : "chesttrapper",
"categories" : [ "chesttrapper" ],
"parts" : [ "chest" ],
"animation" : "chesttrapper.animation",
"dropPools" : [ "noMeatMonsterTreasure" ],
"baseParameters" : {
"scripts" : [
"/monsters/dungeon/chesttrapper/behavior.lua",
"/scripts/stateMachine.lua",
"/scripts/util.lua",
"/scripts/vec2.lua"
],
"metaBoundBox" : [-1.0, -1.125, 1.0, 1.0],
"scale" : 1.0,
"movementSettings" : {
"collisionPoly" : [ [-1.0, -1.125], [1.0, -1.125], [1.0, 1.0], [-1.0, 1.0] ],
"mass" : 1.0,
"walkSpeed" : 3,
"runSpeed" : 6,
"jumpSpeed" : 5,
"flySpeed" : 25,
"airFriction" : 0.1,
"airForce" : 100.0
},
"bodyMaterialKind" : "organic",
"knockoutTime" : 0.1,
"knockoutEffect" : "blink",
"deathParticles" : "deathPoof",
"touchDamage" : {
"poly" : [ [-1.0, -1.125], [1.0, -1.125], [1.0, 1.0], [-1.0, 1.0] ],
"damage" : 20,
"teamType" : "enemy",
"damageSourceKind" : "bite",
"statusEffects" : [ ]
},
"statusSettings" : {
"statusProperties" : {
"targetMaterialKind" : "organic"
},
"appliesEnvironmentStatusEffects" : false,
"minimumLiquidStatusEffectPercentage" : 0.1,
"primaryScriptSources" : [
"/stats/monster_primary.lua"
],
"primaryScriptDelta" : 5,
"stats" : {
"knockbackStunTime" : {
"baseValue" : 0.25
},
"knockbackThreshold" : {
"baseValue" : 10
},
"maxHealth" : {
"baseValue" : 12
},
"protection" : {
"baseValue" : 1.0
},
"healthRegen" : {
"baseValue" : 0.0
},
"poisonImmunity" : {
"baseValue" : 1.0
}
},
"resources" : {
"stunned" : {
"deltaValue" : -1.0,
"initialValue" : 0.0
},
"health" : {
"maxStat" : "maxHealth",
"deltaStat" : "healthRegen",
"defaultPercentage" : 100
}
}
},
"mouthOffset" : [0, 0],
"feetOffset" : [0, -8],
"noticeDistance" : 5,
"aggroTime" : 0.5,
"aggroMoveSpeed" : 7.5,
"bombAttackTimeRange" : [0.25, 0.5],
"explodeTime" : 0.5,
"spawnAttackWaitTime" : 0.4,
"spawnAttackOffsets" : [ [-1, 1], [0, 1], [1, 1] ],
"spawnAttackInitialSpeed" : 16
}
}

View file

@ -0,0 +1,11 @@
{
"frameGrid" : {
"size" : [18, 18],
"dimensions" : [8, 2],
"names" : [
[ "aggro.1", "aggro.2", "aggro.3", null, null, null, null, null ],
[ "spin.1", "spin.2", "spin.3", "spin.4", "spin.5", "spin.6", "spin.7", "spin.8" ]
]
}
}

View file

@ -0,0 +1,9 @@
{
"name" : "medievalchest",
"category" : "chesttrapper",
"type" : "chest",
"frames" : {
"chest" : "medievalchest.png"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,9 @@
{
"name" : "royalchest",
"category" : "chesttrapper",
"type" : "chest",
"frames" : {
"chest" : "royalchest.png"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,18 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [100, 100],
"dimensions" : [12, 8],
"names" : [
[ null, "idle.0.0", "idle.0.1", "idle.0.2", "idle.0.3", "idle.0.4", "idle.0.5", "idle.0.6", "idle.0.7", "idle.0.8", "idle.0.9", null ],
[ "walk.0.0", "walk.0.1", "walk.0.2", "walk.0.3", "walk.0.4", "walk.0.5", "walk.0.6", "walk.0.7", "walk.0.8", "walk.0.9", "walk.0.10", "walk.0.11" ],
[ "walk.0.12", "walk.0.13", "walk.0.14", "walk.0.15", "walk.0.16", "walk.0.17", "walk.0.18", "walk.0.19", null, "attack.0.0", "attack.0.1", "attack.0.2" ],
[ "attack.0.3", "attack.0.4", "attack.0.5", "attack.0.6", "attack.0.7", "attack.0.8", "attack.0.9", null, "spinup.0.0", "spinup.0.1", "spinup.0.2", null ],
[ "fly.0.0", "fly.0.1", "fly.0.2", "fly.0.3", "fly.0.4", "fly.0.5", "fly.0.6", "fly.0.7", "fly.0.8", "fly.0.9", null, "flyattack.0.0" ],
[ "flyattack.0.1", "flyattack.0.2", "flyattack.0.3", "flyattack.0.4", "flyattack.0.5", "flyattack.0.6", "flyattack.0.7", "flyattack.0.8", "flyattack.0.9", null, "spindown.0.0", "spindown.0.1" ],
[ "spindown.0.2", null, "dead.0.0", "dead.0.1", "dead.0.2", "dead.0.3", "dead.0.4", "dead.0.5", "dead.0.6", "dead.0.7", "dead.0.8", "dead.0.9" ],
[ null, "flydead.0.0", "flydead.0.1", "flydead.0.2", "flydead.0.3", "flydead.0.4", "flydead.0.5", "flydead.0.6", "flydead.0.7", "flydead.0.8", "flydead.0.9", null ]
]
}
}

BIN
attic/npcs/cloud/body/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

110
attic/npcs/cloud/cloud.npc Normal file
View file

@ -0,0 +1,110 @@
{
"npcId" : 3,
"npcName" : "cloud",
"aiFunctions" : { "1" : "defaultWander" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 6.0, "1" : 6.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 20, 2.5, 1, 0, 0],
"idle" : [ "idle", 10, 1.0, 0, 0, 0]
},
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-15, 0, 15, -45] ],
"attackBox" : {
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"walk.0.6" : [ "Default" ],
"walk.0.7" : [ "Default" ],
"walk.0.8" : [ "Default" ],
"walk.0.9" : [ "Default" ],
"walk.0.10" : [ "Default" ],
"walk.0.11" : [ "Default" ],
"walk.0.12" : [ "Default" ],
"walk.0.13" : [ "Default" ],
"walk.0.14" : [ "Default" ],
"walk.0.15" : [ "Default" ],
"walk.0.16" : [ "Default" ],
"walk.0.17" : [ "Default" ],
"walk.0.18" : [ "Default" ],
"walk.0.19" : [ "Default" ],
"idle.0.0" : [ "Default" ],
"idle.0.1" : [ "Default" ],
"idle.0.2" : [ "Default" ],
"idle.0.3" : [ "Default" ],
"idle.0.4" : [ "Default" ],
"idle.0.5" : [ "Default" ],
"idle.0.6" : [ "Default" ],
"idle.0.7" : [ "Default" ],
"idle.0.8" : [ "Default" ],
"idle.0.9" : [ "Default" ]
},
"damageBox" : {
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"walk.0.6" : [ "Default" ],
"walk.0.7" : [ "Default" ],
"walk.0.8" : [ "Default" ],
"walk.0.9" : [ "Default" ],
"walk.0.10" : [ "Default" ],
"walk.0.11" : [ "Default" ],
"walk.0.12" : [ "Default" ],
"walk.0.13" : [ "Default" ],
"walk.0.14" : [ "Default" ],
"walk.0.15" : [ "Default" ],
"walk.0.16" : [ "Default" ],
"walk.0.17" : [ "Default" ],
"walk.0.18" : [ "Default" ],
"walk.0.19" : [ "Default" ],
"idle.0.0" : [ "Default" ],
"idle.0.1" : [ "Default" ],
"idle.0.2" : [ "Default" ],
"idle.0.3" : [ "Default" ],
"idle.0.4" : [ "Default" ],
"idle.0.5" : [ "Default" ],
"idle.0.6" : [ "Default" ],
"idle.0.7" : [ "Default" ],
"idle.0.8" : [ "Default" ],
"idle.0.9" : [ "Default" ]
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,11 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [18, 12],
"dimensions" : [7, 3],
"names" : [
[ null, "idle.0.0", null, "walk.0.0", "walk.0.1", "walk.0.2", "walk.0.3" ]
]
}
}

BIN
attic/npcs/crab/body/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

57
attic/npcs/crab/crab.npc Normal file
View file

@ -0,0 +1,57 @@
{
"npcId" : 4,
"npcName" : "crab",
"aiFunctions" : { "1" : "defaultWander", "2" : "defaultFollow", "32" : "defaultJump", "33" : "defaultJump", "34" : "defaultJump" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 3.0, "2" : 2.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 4, 1.0, 1, 0, 0],
"idle" : [ "idle", 1, 1.0, 0, 0, 0]
},
"jumpStrength" : 0.25,
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-4, 1, 4, -5] ],
"attackBox" : {
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

BIN
attic/npcs/deer/1/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
attic/npcs/deer/1/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
attic/npcs/deer/1/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
attic/npcs/deer/1/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
attic/npcs/deer/2/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
attic/npcs/deer/2/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
attic/npcs/deer/2/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
attic/npcs/deer/3/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
attic/npcs/deer/3/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View file

@ -0,0 +1,16 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [75, 75],
"dimensions" : [9, 6],
"names" : [
[ null, "idle.0.0", "idle.0.1", "idle.0.2", "idle.0.3", "idle.0.4", "idle.0.5", "idle.0.6", "idle.0.7" ],
[ null, "walk.0.0", "walk.0.1", "walk.0.2", "walk.0.3", "walk.0.4", "walk.0.5", "walk.0.6", "walk.0.7" ],
[ null, "run.0.0", "run.0.1", "run.0.2", "run.0.3", "run.0.4", "run.0.5", "run.0.6", "run.0.7" ],
[ null, "attack.0.0", "attack.0.1", "attack.0.2", "attack.0.3", "attack.0.4", "attack.0.5", "attack.0.6", "attack.0.7" ],
[ null, "attack.1.0", "attack.1.1", "attack.1.2", "attack.1.3", "attack.1.4", "attack.1.5", "attack.1.6", "attack.1.7" ],
[ null, "gibs.0", "gibs.1", "gibs.2", "gibs.3", "gibs.4", "gibs.5", null, null ]
]
}
}

BIN
attic/npcs/deer/body/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

91
attic/npcs/deer/deer.npc Normal file
View file

@ -0,0 +1,91 @@
{
"npcId" : 5,
"npcName" : "deer",
"aiFunctions" : { "0" : "defaultWander" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 4.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 8, 1.0, 1, 0, 0],
"idle" : [ "idle", 3, 0.5, 1, 0, 0]
},
"walkFrameInfo" : [8, 1.0, 1, 0, 0],
"attackFrameInfo" : [12, 0.5, 0, 0, 0],
"idleFrameInfo" : [3, 0.5, 1, 0, 0],
"jumpFrameInfo" : [7, 0.50, 0, 3, 0],
"jumpStrength" : 0.25,
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-13, -5, 14, -38] ],
"attackBox" : {
"attack.4" : [ "Default" ],
"attack.5" : [ "Default" ]
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"idle.0.1" : [ "Default" ],
"idle.0.2" : [ "Default" ],
"idle.0.3" : [ "Default" ],
"idle.0.4" : [ "Default" ],
"idle.0.5" : [ "Default" ],
"idle.0.6" : [ "Default" ],
"idle.0.7" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"walk.0.6" : [ "Default" ],
"walk.0.7" : [ "Default" ],
"run.0.0" : [ "Default" ],
"run.0.1" : [ "Default" ],
"run.0.2" : [ "Default" ],
"run.0.3" : [ "Default" ],
"run.0.4" : [ "Default" ],
"run.0.5" : [ "Default" ],
"run.0.6" : [ "Default" ],
"run.0.7" : [ "Default" ],
"attack.0.0" : [ "Default" ],
"attack.0.1" : [ "Default" ],
"attack.0.2" : [ "Default" ],
"attack.0.3" : [ "Default" ],
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ],
"attack.0.6" : [ "Default" ],
"attack.0.7" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

74
attic/npcs/default.config Normal file
View file

@ -0,0 +1,74 @@
//top level npc type this is the "parent class" of all other NPCs
//this entry should have one of everything with a sane-ish default value
{
"aiFunctions" : [ "defaultWander" ],
"aiStateFunc" : "passiveCritter",
"visibleRect" : [-3.125, -3.125, 3.125, 3.125],
"baseHealth" : "10",
"baseEnergy" : "10",
"baseAttack" : "1",
"baseDefense" : "1",
"baseWeight" : "1",
"description" : "If you're reading this, that means that the description for this enemy has not been set.",
"hVelocity" : { "0" : 4.0 },
"hAccel" : { "0" : 30.0, "1" : 30.0 },
"vVelocity" : { "0" : 0.0 },
"vAccel" : { "0" : 0.0 },
"groundCorrectionLimit" : 0.01,
"jumpSpeedMin" : 0.01,
"fallSpeedMin" : -12.0,
"flapFrames" : [ ],
"jumpInitialVelocity" : 15.0,
"jumpMaxVelocity" : 20.0,
"fallVelocity" : -35.0,
"jumpTimer" : 0.25,
"gravity" : 60.0,
"trackDist" : 10.0,
"aggroDist" : 2.0,
"aggression" : 0.5,
"constitution" : 50,
"animationStrings" : { },
//FrameInfo key: [frame name prefix, number of frames, time in seconds to complete one full cycle, does the cycle repeat?, number of wind up frames, number of wind down frames]
"frameInfo" : { "idle" : [ "idle", 1, 1.0, 1, 0, 0],
"walk" : [ "walk", 1, 1.0, 1, 0, 0],
"attack" : [ "attack", 1, 1.0, 1, 0, 0],
"jump" : [ "jump", 1, 1.0, 0, 0, 0],
"fall" : [ "fall", 1, 1.0, 0, 0, 0],
"spinup" : [ "spinup", 1, 1.0, 0, 0, 0],
"spindown" : [ "spindown", 1, 1.0, 0, 0, 0],
"fly" : [ "fly", 1, 1.0, 1, 0, 0],
"flymelee" : [ "flymelee", 1, 1.0, 0, 0, 0],
"flyranged" : [ "flyranged", 1, 1.0, 0, 0, 0],
"defense" : [ "defense", 1, 1.0, 0, 0, 0]
},
"attentionSpan" : 10,
"soundSensitivity" : 10,
"canSee" : 1,
"psychic" : 0,
"xRayVision" : 0,
"attackBox" : { },
"defenseBox" : { },
"immuneBox" : { },
"weakpointBox" : { },
"collisionBox" : { },
"damageBox" : { },
"animationOffset" : { },
"projectilePoint" : { }
}

View file

@ -0,0 +1,9 @@
{
"name" : "dragonbossbody",
"category" : "dragonboss",
"type" : "body",
"frames" : {
"body" : "dragonbossbody.png"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -0,0 +1,13 @@
{
"frameGrid" : {
"size" : [350, 300],
"dimensions" : [5, 4],
"names" : [
[ null, "idle", null, "idle_blink" ],
[ null, "flying.1", "flying.2", "flying.3", "flying.4" ],
[ null, "idle_attack.1", "idle_attack.2", "idle_attack.3", "idle_attack.4" ],
[ null, "flying_attack.1", "flying_attack.2", "flying_attack.3", "flying_attack.4" ]
]
}
}

View file

@ -0,0 +1,421 @@
{
"animatedParts" : {
"stateTypes" : {
"movement" : {
"priority" : 0,
"default" : "standing",
"states" : {
"standing" : {
"frames" : 1
},
"flying" : {
"frames" : 4,
"cycle" : 0.25,
"mode" : "loop"
},
"knockback" : {
"frames" : 1
},
"knockout" : {
"frames" : 1
},
"gliding" : {
"frames" : 1
},
"flyingAttack" : {
"frames" : 4,
"cycle" : 0.25,
"mode" : "loop"
}
}
}
},
"parts" : {
"backWings" : {
"properties" : {
"zLevel" : 0,
"centered" : true
},
"partStates" : {
"movement" : {
"standing" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"flying" : {
"properties" : {
"image" : "<partImage>:flying.<frame>"
}
},
"knockback" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"knockout" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"gliding" : {
"properties" : {
"image" : "<partImage>:flying.1"
}
},
"flyingAttack" : {
"properties" : {
"image" : "<partImage>:flying.<frame>"
}
}
}
}
},
"body" : {
"properties" : {
"zLevel" : 1,
"centered" : true
},
"partStates" : {
"movement" : {
"standing" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"flying" : {
"properties" : {
"image" : "<partImage>:flying.<frame>"
}
},
"knockback" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"knockout" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"gliding" : {
"properties" : {
"image" : "<partImage>:flying.1"
}
},
"flyingAttack" : {
"properties" : {
"image" : "<partImage>:flying.<frame>"
}
}
}
}
},
"head" : {
"properties" : {
"zLevel" : 2,
"centered" : true
},
"partStates" : {
"movement" : {
"standing" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"flying" : {
"properties" : {
"image" : "<partImage>:flying.<frame>"
}
},
"knockback" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"knockout" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"gliding" : {
"properties" : {
"image" : "<partImage>:flying.1"
}
},
"flyingAttack" : {
"properties" : {
"image" : "<partImage>:flying_attack.2"
}
}
}
}
},
"frontWings" : {
"properties" : {
"zLevel" : 3,
"centered" : true
},
"partStates" : {
"movement" : {
"standing" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"flying" : {
"properties" : {
"image" : "<partImage>:flying.<frame>"
}
},
"knockback" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"knockout" : {
"properties" : {
"image" : "<partImage>:idle"
}
},
"gliding" : {
"properties" : {
"image" : "<partImage>:flying.1"
}
},
"flyingAttack" : {
"properties" : {
"image" : "<partImage>:flying.<frame>"
}
}
}
}
}
}
},
"particleEmitters" : {
"deathPoof" : {
"particles" : [
{
"particle" : {
"type" : "animated",
"animation" : "/animations/puff2c/puff2c.animation",
"size" : 1,
"angularVelocity" : 35,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [0, 0],
"finalVelocity" : [0, 0],
"approach" : [1, 1],
"timeToLive" : 0.4,
"layer" : "middle"
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
}
]
}
},
"sounds" : {
"turnHostile" : [ ],
"deathPuff" : [ "/sfx/npc/enemydeathpuff.ogg" ]
},
"effects" : {
"blink" : {
"type" : "flash",
"time" : 0.25,
"directives" : "fade=ffffff;0.5"
}
}
}

View file

@ -0,0 +1,165 @@
{
"type" : "dragonboss",
"categories" : [ "dragonboss" ],
"parts" : [ "body", "head", "wings" ],
"animation" : "dragonboss.animation",
"reversed" : true,
"dropPools" : [
{
"default" : "boss3Treasure"
}
],
"baseParameters" : {
"scripts" : [
"/monsters/generated/flying/flyingMonster.lua",
"/scripts/util.lua",
"/scripts/sensors.lua",
"/scripts/stateMachine.lua",
"/scripts/vec2.lua"
],
"metaBoundBox" : [-12.5, -12.5, 12.5, 12.5],
"scale" : 1.0,
"movementSettings" : {
"collisionPoly" : [ [-5, -9.0], [5, -9.0], [9, 5], [-9, 5] ],
"mass" : 0.2,
"walkSpeed" : 2,
"runSpeed" : 2,
"jumpSpeed" : 5,
"flySpeed" : 16,
"airFriction" : 0.5,
"airForce" : 30.0
},
"targetRadius" : 100.0,
"targetSearchTime" : 0.5,
"targetHoldTime" : 10000.0,
"blockedSensors" : [ [-8.0, -12.0], [8.0, -12.0], [8.0, 7.0], [-8.0, 7.0] ],
"upSensors" : [ [-0.75, -15], [0.75, -15], [1.5, -15] ],
"downSensors" : [ [-0.75, -10], [0.75, -10], [1.5, -10] ],
"groundSensors" : [ [0.0, -12.0], [0.0, -15.0], [0.0, -25.0], [0,0, -30.0] ],
"ceilingSensors" : [ [0.0, 2.0], [0.0, 6.0], [0.0, 10.0] ],
"environmentSensors" : [ [0.0, 0.0], [0.0, 2.0], [0.0, -2.0], [2.0, 0.0], [-2.0, 0.0], [2.0, 2.0], [2.0, -2.0], [-2.0, 2.0], [-2.0, -2.0] ],
"bodyMaterialKind" : "organic",
"knockoutTime" : 0.1,
"knockoutEffect" : "blink",
"deathParticles" : "deathPoof",
"touchDamage" : {
"poly" : [ [-8.0, -12.0], [8.0, -12.0], [8.0, 7.0], [-8.0, 7.0] ],
"damage" : 22,
"teamType" : "enemy",
"damageSourceKind" : "default",
"statusEffects" : [ ]
},
"statusSettings" : {
"statusProperties" : {
"targetMaterialKind" : "organic"
},
"appliesEnvironmentStatusEffects" : false,
"minimumLiquidStatusEffectPercentage" : 0.1,
"primaryScriptSources" : [
"/stats/monster_primary.lua"
],
"primaryScriptDelta" : 5,
"stats" : {
"knockbackStunTime" : {
"baseValue" : 0.25
},
"knockbackThreshold" : {
"baseValue" : 10
},
"maxHealth" : {
"baseValue" : 400
},
"protection" : {
"baseValue" : 1.0
},
"healthRegen" : {
"baseValue" : 0.0
}
},
"resources" : {
"stunned" : {
"deltaValue" : -1.0,
"initialValue" : 0.0
},
"health" : {
"maxStat" : "maxHealth",
"deltaStat" : "healthRegen",
"defaultPercentage" : 100
}
}
},
"mouthOffset" : [0, 0],
"feetOffset" : [0, -8],
"alwaysAggressive" : true,
"alwaysDamageOnTouch" : true
},
"familyParameters" : [
[
{
"attackStartDistance" : 100.0,
"attackMaxDistance" : 100.0,
"attackCooldownTime" : 1.5,
"scripts" : [
"/monsters/generated/flying/skills/createFlyingRangedAttack.lua",
"/monsters/generated/flying/circleState.lua",
"/monsters/generated/flying/wanderState.lua",
"/monsters/generated/flying/glideState.lua",
"/monsters/generated/flying/landState.lua"
],
"wanderRiseSpeed" : 0.9,
"wanderRiseTimeRange" : [0.5, 2.0],
"wanderGlideSpeed" : 0.6,
"wanderGlideTimeRange" : [1.0, 4.0],
"wanderFormationOffset" : 2.0,
"wanderSpeedMultiplier" : 0.4,
"wanderEndChance" : 0.2,
"circleWidthRange" : [8.0, 25.0],
"circleHeight" : 10,
"circleOffsetYRange" : [8.0, 25.0],
"circleTiltRadius" : 1.5,
"circleTime" : 5.0,
"landRestTimeRange" : [5.0, 5.0],
"landDisturbDistance" : 10.0,
"landCooldownTimeRange" : [10.0, 30.0],
"glideTime" : 1.0,
"glideCooldownTime" : 10.0,
"glideSinkingSpeed" : 0.8,
"glideSpiralDispersion" : 0.2
}
]
],
"partParameterDescription" : {
"projectileOffset" : [ "override", [5.0, 4] ],
"skills" : [
"merge",
[
"dragonbreath",
"dragonbreath"
]
]
}
}

View file

@ -0,0 +1,9 @@
{
"name" : "dragonbosshead",
"category" : "dragonboss",
"type" : "head",
"frames" : {
"head" : "dragonbosshead.png"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,10 @@
{
"name" : "dragonbosswings",
"category" : "dragonboss",
"type" : "wings",
"frames" : {
"backWings" : "dragonbossbwing.png",
"frontWings" : "dragonbossfwing.png"
}
}

View file

@ -0,0 +1,15 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [34, 34],
"dimensions" : [8, 5],
"names" : [
[ null, "idle.0.0", "idle.0.1", "idle.0.2", null, "walk.0.0", "walk.0.1", "walk.0.2" ],
[ "walk.0.3", "walk.0.4", "walk.0.5", "walk.0.6", "walk.0.7", null, "jump.0.0", "jump.0.1" ],
[ "jump.0.2", "jump.0.3", "jump.0.4", "jump.0.5", "jump.0.6", null, "attack.0.0", "attack.0.1" ],
[ "attack.0.2", "attack.0.3", "attack.0.4", "attack.0.5", "attack.0.6", "attack.0.7", "attack.0.8", "attack.0.9" ],
[ "attack.0.10", "attack.0.11", null, "gibs.0.0", "gibs.0.1", "gibs.0.2", "gibs.0.3", null ]
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View file

@ -0,0 +1,122 @@
{
"npcId" : 6,
"npcName" : "fluffybear",
"aiFunctions" : { "0" : "defaultWander" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 4.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 8, 1.0, 1, 0, 0],
"idle" : [ "idle", 3, 0.5, 1, 0, 0]
},
"walkFrameInfo" : [8, 1.0, 1, 0, 0],
"attackFrameInfo" : [12, 0.5, 0, 0, 0],
"idleFrameInfo" : [3, 0.5, 1, 0, 0],
"jumpFrameInfo" : [7, 0.50, 0, 3, 0],
"jumpStrength" : 0.25,
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-8, 6, 8, -16] ],
"attackBox" : {
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ]
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"idle.0.1" : [ "Default" ],
"idle.0.2" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"walk.0.6" : [ "Default" ],
"walk.0.7" : [ "Default" ],
"jump.0.0" : [ "Default" ],
"jump.0.1" : [ "Default" ],
"jump.0.2" : [ "Default" ],
"jump.0.3" : [ "Default" ],
"jump.0.4" : [ "Default" ],
"jump.0.5" : [ "Default" ],
"jump.0.6" : [ "Default" ],
"attack.0.0" : [ "Default" ],
"attack.0.1" : [ "Default" ],
"attack.0.2" : [ "Default" ],
"attack.0.3" : [ "Default" ],
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ],
"attack.0.6" : [ "Default" ],
"attack.0.7" : [ "Default" ],
"attack.0.8" : [ "Default" ],
"attack.0.9" : [ "Default" ],
"attack.0.10" : [ "Default" ],
"attack.0.11" : [ "Default" ]
},
"damageBox" : {
"idle.0.0" : [ "Default" ],
"idle.0.1" : [ "Default" ],
"idle.0.2" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"walk.0.6" : [ "Default" ],
"walk.0.7" : [ "Default" ],
"jump.0.0" : [ "Default" ],
"jump.0.1" : [ "Default" ],
"jump.0.2" : [ "Default" ],
"jump.0.3" : [ "Default" ],
"jump.0.4" : [ "Default" ],
"jump.0.5" : [ "Default" ],
"jump.0.6" : [ "Default" ],
"attack.0.0" : [ "Default" ],
"attack.0.1" : [ "Default" ],
"attack.0.2" : [ "Default" ],
"attack.0.3" : [ "Default" ],
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ],
"attack.0.6" : [ "Default" ],
"attack.0.7" : [ "Default" ],
"attack.0.8" : [ "Default" ],
"attack.0.9" : [ "Default" ],
"attack.0.10" : [ "Default" ],
"attack.0.11" : [ "Default" ]
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,15 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [24, 11],
"dimensions" : [6, 5],
"names" : [
[ "idle.0.0", null, "idle.1.0", "idle.1.1", null, null ],
[ "idle.2.0", "idle.2.1", null, null, "swimidle.0.0", null ],
[ "walk.0.0", "walk.0.1", "walk.0.2", "walk.0.3", null, null ],
[ "jump.0.0", "jump.0.1", null, "fall.0.0", null, null ],
[ "swim.0.0", "swim.0.1", "swim.0.2", "swim.0.3", "swim.0.4", null ]
]
}
}

BIN
attic/npcs/frog/body/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

57
attic/npcs/frog/frog.npc Normal file
View file

@ -0,0 +1,57 @@
{
"npcId" : 20,
"npcName" : "frog",
"aiFunctions" : { "1" : "defaultWander", "2" : "defaultFollow", "32" : "defaultJump", "33" : "defaultJump", "34" : "defaultJump" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 3.0, "2" : 2.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 4, 0.6, 1, 0, 0],
"idle" : [ "idle", 1, 1.0, 0, 0, 0]
},
"jumpStrength" : 0.25,
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-3, 2, 3, -4] ],
"attackBox" : {
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,11 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [714, 656],
"dimensions" : [12, 1],
"names" : [
[ "walk.0.0", "walk.0.1", "walk.0.2", "walk.0.3", "walk.0.4", "walk.0.5", "walk.0.6", "walk.0.7", "walk.0.8", "walk.0.9", "walk.0.10", "idle.0.0" ]
]
}
}

BIN
attic/npcs/giant/body/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View file

@ -0,0 +1,62 @@
{
"npcId" : 300,
"npcName" : "giant",
"aiFunctions" : { "0" : "defaultWander" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 18 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.png",
"frameInfo" : { "walk" : [ "walk", 11, 2.0, 1, 0, 0],
"idle" : [ "idle", 1, 0.5, 0, 0, 0]
},
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-100, 281, 140, -150] ],
"attackBox" : {
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ]
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"walk.0.6" : [ "Default" ],
"walk.0.7" : [ "Default" ],
"walk.0.8" : [ "Default" ],
"walk.0.9" : [ "Default" ],
"walk.0.10" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,15 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [86, 48],
"dimensions" : [7, 5],
"names" : [
[ null, "walk.0.0", "walk.0.1", "walk.0.2", "walk.0.3", "walk.0.4", "walk.0.5" ],
[ null, "attack.0.0", "attack.0.1", "attack.0.2", "attack.0.3", "attack.0.4", "attack.0.5" ],
[ null, "rangedattack.0.0", "rangedattack.0.1", "rangedattack.0.2", "rangedattack.0.3", "rangedattack.0.4", "rangedattack.0.5" ],
[ null, "idle.0.0", "idle.0.1", "idle.0.2", "idle.0.3", "idle.0.4", "idle.0.5" ],
[ null, "gibs.0.0", "gibs.0.1", "gibs.0.2", "gibs.0.3", null, null, null ]
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,65 @@
{
"npcId" : 7,
"npcName" : "giantcrab",
"aiFunctions" : { "1" : "defaultWander", "2" : "defaultFollow", "32" : "defaultJump", "33" : "defaultJump", "34" : "defaultJump" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 5.0, "2" : 2.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 6, 1.0, 1, 0, 0],
"idle" : [ "idle", 6, 1.0, 1, 0, 0]
},
"jumpStrength" : 0.25,
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-13, 1, 10, -23] ],
"attackBox" : {
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"idle.0.1" : [ "Default" ],
"idle.0.2" : [ "Default" ],
"idle.0.3" : [ "Default" ],
"idle.0.4" : [ "Default" ],
"idle.0.5" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,15 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [204, 204],
"dimensions" : [8, 5],
"names" : [
[ null, "idle.0.0", "idle.0.1", "idle.0.2", null, "walk.0.0", "walk.0.1", "walk.0.2" ],
[ "walk.0.3", "walk.0.4", "walk.0.5", "walk.0.6", "walk.0.7", null, "jump.0.0", "jump.0.1" ],
[ "jump.0.2", "jump.0.3", "jump.0.4", "jump.0.5", "jump.0.6", null, "attack.0.0", "attack.0.1" ],
[ "attack.0.2", "attack.0.3", "attack.0.4", "attack.0.5", "attack.0.6", "attack.0.7", "attack.0.8", "attack.0.9" ],
[ "attack.0.10", "attack.0.11", null, "gibs.0", "gibs.1", "gibs.2", "gibs.3", null ]
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -0,0 +1,85 @@
{
"npcId" : 301,
"npcName" : "giantfluffybear",
"aiFunctions" : { "0" : "defaultWander" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 12 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 8, 1.0, 1, 0, 0],
"attack" : [ "attack", 12, 0.5, 0, 0, 0],
"idle" : [ "idle", 3, 0.5, 1, 0, 0],
"jump" : [ "jump", 7, 0.50, 0, 3, 0]
},
"jumpStrength" : 0.25,
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-36, 36, 36, -102] ],
"attackBox" : {
"attack.4" : [ "Default" ],
"attack.5" : [ "Default" ]
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"idle.0.1" : [ "Default" ],
"idle.0.2" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"walk.0.6" : [ "Default" ],
"walk.0.7" : [ "Default" ],
"jump.0.0" : [ "Default" ],
"jump.0.1" : [ "Default" ],
"jump.0.2" : [ "Default" ],
"jump.0.3" : [ "Default" ],
"jump.0.4" : [ "Default" ],
"jump.0.5" : [ "Default" ],
"jump.0.6" : [ "Default" ],
"attack.0.0" : [ "Default" ],
"attack.0.1" : [ "Default" ],
"attack.0.2" : [ "Default" ],
"attack.0.3" : [ "Default" ],
"attack.0.4" : [ "Default" ],
"attack.0.5" : [ "Default" ],
"attack.0.6" : [ "Default" ],
"attack.0.7" : [ "Default" ],
"attack.0.8" : [ "Default" ],
"attack.0.9" : [ "Default" ],
"attack.0.10" : [ "Default" ],
"attack.0.11" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,12 @@
{
"image" : "1.png",
"frameGrid" : {
"size" : [78, 22],
"dimensions" : [12, 4],
"names" : [
[ null, "idle.0.0", "idle.0.1", "idle.0.2", "idle.0.3", "idle.0.4", "idle.0.5", null, null, null, null, null ],
[ null, "walk.0.0", "walk.0.1", "walk.0.2", "walk.0.3", "walk.0.4", "walk.0.5", "walk.0.6", "walk.0.7", "walk.0.8" ]
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -0,0 +1,67 @@
{
"npcId" : 19,
"npcName" : "grubble",
"aiFunctions" : { "1" : "defaultWander", "2" : "defaultFollow", "32" : "defaultJump", "33" : "defaultJump", "34" : "defaultJump" },
"aiStateFunc" : "passiveCritter",
"hVelocity" : { "0" : 3.0, "2" : 2.0 },
"trackDist" : 10.0,
"aggroDist" : 2.0,
"frames" : "body/1.frames",
"frameInfo" : { "walk" : [ "walk", 9, 1.0, 1, 0, 0],
"idle" : [ "idle", 6, 1.0, 0, 0, 0]
},
"jumpStrength" : 0.25,
"attentionSpan" : 8,
"soundSensitivity" : 2,
"defaultHitbox" : [ "Rect", [-10, 7, 10, -11] ],
"attackBox" : {
},
"defenseBox" : {
},
"immuneBox" : {
},
"weakpointBox" : {
},
"collisionBox" : {
"idle.0.0" : [ "Default" ],
"idle.0.1" : [ "Default" ],
"idle.0.2" : [ "Default" ],
"idle.0.3" : [ "Default" ],
"idle.0.4" : [ "Default" ],
"idle.0.5" : [ "Default" ],
"walk.0.0" : [ "Default" ],
"walk.0.1" : [ "Default" ],
"walk.0.2" : [ "Default" ],
"walk.0.3" : [ "Default" ],
"walk.0.4" : [ "Default" ],
"walk.0.5" : [ "Default" ],
"walk.0.6" : [ "Default" ],
"walk.0.7" : [ "Default" ],
"walk.0.8" : [ "Default" ]
},
"damageBox" : {
},
"animationOffset" : {
},
"projectilePoint" : {
}
}

View file

@ -0,0 +1,193 @@
--------------------------------------------------------------------------------
function init()
self.sensors = sensors.create()
capturepod.onInit()
self.state = stateMachine.create({
"attackState",
"moveState",
"captiveState"
})
self.state.leavingState = function(stateName)
entity.setAnimationState("movement", "idle")
end
self.jumpHoldTime = 0;
entity.setAggressive(true)
entity.setDamageOnTouch(true)
entity.setDeathParticleBurst("deathPoof")
entity.setAnimationState("movement", "idle")
end
--------------------------------------------------------------------------------
function update(dt)
util.trackTarget(entity.configParameter("noticeDistance"))
if self.targetId ~= nil and not attacking() then
self.state.pickState(self.targetId)
end
self.state.update(dt)
self.sensors.clear()
-- Update animation
if mcontroller.onGround() then
entity.setAnimationState("movement", "idle")
else
local velocity = mcontroller.velocity()
if velocity[2] < 0 then
entity.setAnimationState("movement", "fall")
else
entity.setAnimationState("movement", "jump")
end
end
end
--------------------------------------------------------------------------------
function damage(args)
capturepod.onDamage(args)
end
--------------------------------------------------------------------------------
function setSpawnDirection(direction)
local spawnVelocity = entity.configParameter("spawnVelocity")
mcontroller.setVelocity({ spawnVelocity[1] * direction, spawnVelocity[2] })
end
--------------------------------------------------------------------------------
function poSize()
return entity.configParameter("poSize")
end
--------------------------------------------------------------------------------
function attacking()
return self.state.stateDesc() == "attackState"
end
--------------------------------------------------------------------------------
function move(delta, run)
if not mcontroller.onGround() and self.jumpHoldTime > 0 then
mcontroller.controlHoldJump()
self.jumpHoldTime = math.max(0, self.jumpHoldTime - dt)
end
if mcontroller.onGround() then
if delta[2] > entity.configParameter("largeJumpYThreshold") then
self.jumpHoldTime = entity.configParameter("largeHumpHoldTime")
else
self.jumpHoldTime = 0
end
end
mcontroller.controlMove(delta[1], true)
end
--------------------------------------------------------------------------------
moveState = {}
function moveState.enter()
if capturepod.isCaptive() then return nil end
return {
timer = entity.randomizeParameterRange("moveTimeRange"),
direction = util.toDirection(math.random(100) - 50)
}
end
function moveState.update(dt, stateData)
if self.sensors.blockedSensors.collision.any(true) then
stateData.direction = -stateData.direction
end
move({ stateData.direction, 0 }, false)
stateData.timer = stateData.timer - dt
if stateData.timer <= 0 then
return true, entity.randomizeParameterRange("moveCooldownTimeRange")
end
return false
end
--------------------------------------------------------------------------------
attackState = {}
function attackState.enterWith(targetId)
return { timer = 0 }
end
function attackState.update(dt, stateData)
if self.targetPosition == nil then return true end
if self.targetId == nil then
stateData.timer = stateData.timer + dt
if stateData.timer > entity.configParameter("attackSearchTime") then
return true
end
end
local toTarget = world.distance(self.targetPosition, mcontroller.position())
move(toTarget, true)
return false
end
--------------------------------------------------------------------------------
captiveState = {
closeDistance = 4,
runDistance = 12,
}
function captiveState.enter()
if not capturepod.isCaptive() or self.targetId ~= nil then return nil end
return { running = false }
end
function captiveState.update(dt, stateData)
-- Translate owner uuid to entity id
if self.ownerEntityId ~= nil then
if not world.entityExists(self.ownerEntityId) then
self.ownerEntityId = nil
end
end
if self.ownerEntityId == nil then
local playerIds = world.entityQuery(mcontroller.position(), 50, {includedTypes = {"player"}})
for _, playerId in pairs(playerIds) do
if world.entityUniqueId(playerId) == storage.ownerUuid then
self.ownerEntityId = playerId
break
end
end
end
-- Owner is nowhere around
if self.ownerEntityId == nil then
return false
end
local ownerPosition = world.entityPosition(self.ownerEntityId)
local toOwner = world.distance(ownerPosition, mcontroller.position())
local distance = math.abs(toOwner[1])
local movement
if distance < captiveState.closeDistance then
stateData.running = false
movement = 0
elseif toOwner[1] < 0 then
movement = -1
elseif toOwner[1] > 0 then
movement = 1
end
if distance > captiveState.runDistance then
stateData.running = true
end
move({ movement, toOwner[2] }, stateData.running)
return false
end

View file

@ -0,0 +1,11 @@
{
"frameGrid" : {
"size" : [18, 16],
"dimensions" : [8, 2],
"names" : [
[ null, "idle.1", "idle.2", "idle.3", "idle.4", "idle.5", "idle.6", "null" ],
[ null, "jump.1", "jump.2", "jump.3", null, "fall.1", "fall.2", "fall.3" ]
]
}
}

View file

@ -0,0 +1,245 @@
{
"animatedParts" : {
"stateTypes" : {
"movement" : {
"priority" : 0,
"default" : "idle",
"states" : {
"idle" : {
"frames" : 6,
"mode" : "loop"
},
"jump" : {
"frames" : 3,
"mode" : "end"
},
"fall" : {
"frames" : 3,
"mode" : "end"
}
}
}
},
"parts" : {
"body" : {
"partStates" : {
"movement" : {
"idle" : {
"properties" : {
"image" : "<partImage>:idle.<frame>"
}
},
"jump" : {
"properties" : {
"image" : "<partImage>:jump.<frame>"
}
},
"fall" : {
"properties" : {
"image" : "<partImage>:fall.<frame>"
}
}
}
}
}
}
},
"particleEmitters" : {
"deathPoof" : {
"particles" : [
{
"particle" : {
"type" : "animated",
"animation" : "/animations/puff2c/puff2c.animation",
"size" : 1,
"angularVelocity" : 35,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [0, 0],
"finalVelocity" : [0, 0],
"approach" : [1, 1],
"timeToLive" : 0.4,
"layer" : "middle"
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz1/fizz1.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz2/fizz2.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz3/fizz3.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [-8, 8],
"finalVelocity" : [-3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [-4, 2],
"finalVelocity" : [-3, -4]
}
}
},
{
"particle" : {
"type" : "animated",
"animation" : "/animations/fizz4/fizz4.animation",
"size" : 1,
"angularVelocity" : 20,
"fade" : 1,
"destructionTime" : 7,
"position" : [0, 0],
"initialVelocity" : [8, 8],
"finalVelocity" : [3, -4],
"approach" : [15, 15],
"timeToLive" : 3.45,
"layer" : "middle",
"variance" : {
"initialVelocity" : [4, 2],
"finalVelocity" : [3, -4]
}
}
}
]
}
},
"effects" : {
"blink" : {
"type" : "flash",
"time" : 0.25,
"directives" : "fade=ffffff;0.5"
}
},
"sounds" : {
"turnHostile" : [ ],
"deathPuff" : [ "/sfx/npc/enemydeathpuff.ogg" ]
}
}

View file

@ -0,0 +1,9 @@
{
"name" : "body",
"category" : "heckblob",
"type" : "body",
"frames" : {
"body" : "heckblob.png"
}
}

View file

@ -0,0 +1,120 @@
{
"type" : "heckblob",
"categories" : [ "heckblob" ],
"parts" : [ "body" ],
"animation" : "heckblob.animation",
"reversed" : true,
"dropPools" : [ "basicMonsterTreasure" ],
"baseParameters" : {
"scripts" : [
"/monsters/capturepod.lua",
"/monsters/dungeon/heckblob/behavior.lua",
"/scripts/sensors.lua",
"/scripts/stateMachine.lua",
"/scripts/util.lua",
"/scripts/vec2.lua"
],
"metaBoundBox" : [-1.0, -1.0, 1.0, 1.0],
"scale" : 1.0,
"movementSettings" : {
"collisionPoly" : [ [-1.0, -1.0], [1.0, -1.0], [1.0, 1.0], [-1.0, 1.0] ],
"mass" : 1.0,
"walkSpeed" : 3,
"runSpeed" : 6,
"jumpSpeed" : 2,
"flySpeed" : 15,
"airFriction" : 0.5,
"airForce" : 5.0,
"jumpControlForce" : 5
},
"bodyMaterialKind" : "organic",
"knockoutTime" : 0.1,
"knockoutEffect" : "blink",
"knockoutAnimationStates" : {
"movement" : "idle"
},
"deathParticles" : "deathPoof",
"touchDamage" : {
"poly" : [ [-1.0, -1.0], [1.0, -1.0], [1.0, 1.0], [-1.0, 1.0] ],
"damage" : 12,
"teamType" : "enemy",
"damageSourceKind" : "lash",
"statusEffects" : [ ]
},
"statusSettings" : {
"statusProperties" : {
"targetMaterialKind" : "organic"
},
"appliesEnvironmentStatusEffects" : false,
"minimumLiquidStatusEffectPercentage" : 0.1,
"primaryScriptSources" : [
"/stats/monster_primary.lua"
],
"primaryScriptDelta" : 5,
"stats" : {
"knockbackStunTime" : {
"baseValue" : 0.25
},
"knockbackThreshold" : {
"baseValue" : 10
},
"maxHealth" : {
"baseValue" : 2
},
"protection" : {
"baseValue" : 1.0
},
"healthRegen" : {
"baseValue" : 0.0
}
},
"resources" : {
"stunned" : {
"deltaValue" : -1.0,
"initialValue" : 0.0
},
"health" : {
"maxStat" : "maxHealth",
"deltaStat" : "healthRegen",
"defaultPercentage" : 100
}
}
},
"mouthOffset" : [0, 0],
"feetOffset" : [0, -8],
"blockedSensors" : [ [1.25, 0.0] ],
"moveTimeRange" : [1.0, 2.0],
"moveCooldownTimeRange" : [5.0, 10.0],
"largeJumpYThreshold" : 2.0,
"largeHumpHoldTime" : 5,
"noticeDistance" : 30,
"attackSearchTime" : 10,
"poSize" : "medium",
"spawnVelocity" : [2, 30],
"captureHealthFraction" : 0.5
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

View file

@ -0,0 +1,9 @@
{
"name" : "hugedragonbarm",
"category" : "hugebiped",
"type" : "barm",
"frames" : {
"backArm" : "hugedragonbarm.png"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Some files were not shown because too many files have changed in this diff Show more