persea-old/fixtures/mama-kitty.entity.json
2020-06-20 01:36:41 -05:00

614 lines
18 KiB
JSON

{
"traits": {
"alive": {
"params": {
"deathActions": {
"type": "actions",
"traversals": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "playSound"
},
{
"type": "invoke",
"args": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "deathSound"
}
]
}
]
}
]
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "killAllChildren"
},
{
"type": "invoke",
"args": []
}
]
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "transition"
},
{
"type": "invoke",
"args": [
{
"type": "literal",
"value": {
"opacity": 0,
"visibleScaleX": 0.3,
"visibleScaleY": 3
}
},
{
"type": "literal",
"value": 0.2
}
]
}
]
}
]
}
},
"state": {
"life": 500,
"maxLife": 500
}
},
"animated": {
"params": {
"animations": {
"idle": {
"offset": [
0,
-8
],
"uri": "/kitty.animation.json"
}
}
}
},
"audible": {
"params": {
"sounds": {
"deathSound": {
"uri": "/ded.sound.json"
}
}
}
},
"behaved": {
"params": {
"routines": {
"type": "routines",
"routines": {
"initial": {
"type": "routine",
"routine": {
"type": "actions",
"traversals": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "direction"
}
],
"value": {
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Math"
},
{
"type": "key",
"key": "floor"
},
{
"type": "invoke",
"args": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Math"
},
{
"type": "key",
"key": "randomNumber"
},
{
"type": "invoke",
"args": [
{
"type": "literal",
"value": 0
},
{
"type": "literal",
"value": 4
}
]
}
]
}
]
}
]
}
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "moveFor"
},
{
"type": "invoke",
"args": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Math"
},
{
"type": "key",
"key": "Vector"
},
{
"type": "key",
"key": "fromDirection"
},
{
"type": "invoke",
"args": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "direction"
}
]
}
]
}
]
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Math"
},
{
"type": "key",
"key": "randomNumber"
},
{
"type": "invoke",
"args": [
{
"type": "literal",
"value": 0.25
},
{
"type": "literal",
"value": 2.5
}
]
}
]
}
]
}
]
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "isAnimating"
}
],
"value": {
"type": "literal",
"value": false
}
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Timing"
},
{
"type": "key",
"key": "wait"
},
{
"type": "invoke",
"args": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Math"
},
{
"type": "key",
"key": "randomNumber"
},
{
"type": "invoke",
"args": [
{
"type": "literal",
"value": 1
},
{
"type": "literal",
"value": 4
}
]
}
]
}
]
}
]
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "direction"
}
],
"value": {
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Math"
},
{
"type": "key",
"key": "floor"
},
{
"type": "invoke",
"args": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Math"
},
{
"type": "key",
"key": "randomNumber"
},
{
"type": "invoke",
"args": [
{
"type": "literal",
"value": 0
},
{
"type": "literal",
"value": 4
}
]
}
]
}
]
}
]
}
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Timing"
},
{
"type": "key",
"key": "wait"
},
{
"type": "invoke",
"args": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Math"
},
{
"type": "key",
"key": "randomNumber"
},
{
"type": "invoke",
"args": [
{
"type": "literal",
"value": 0.5
},
{
"type": "literal",
"value": 3
}
]
}
]
}
]
}
]
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "isAnimating"
}
],
"value": {
"type": "literal",
"value": true
}
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "spawnAt"
},
{
"type": "invoke",
"args": [
{
"type": "literal",
"value": "kitteh"
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "Utility"
},
{
"type": "key",
"key": "makeArray"
},
{
"type": "invoke",
"args": [
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "x"
}
]
},
{
"type": "traversal",
"steps": [
{
"type": "key",
"key": "entity"
},
{
"type": "key",
"key": "y"
}
]
}
]
}
]
}
]
}
]
}
]
}
}
}
}
}
},
"collider": {
"params": {
"collidesWithGroups": [
"default",
"environmental",
"projectile"
]
}
},
"directional": {
"params": {
"directionCount": 4
},
"state": {
"direction": 2
}
},
"emitter": {},
"existent": {
"state": {
"name": "Mama Kitty"
}
},
"layered": {},
"listed": {},
"lootable": {
"params": {
"table": [
{
"perc": 70,
"json": {
"uri": "/yarn-ball.entity.json"
}
},
{
"perc": 80,
"json": {
"uri": "/yarn-ball.entity.json"
}
},
{
"perc": 90,
"json": {
"uri": "/yarn-ball.entity.json"
}
}
]
}
},
"mobile": {
"state": {
"speed": 40
}
},
"physical": {},
"positioned": {},
"roomed": {},
"shaped": {
"params": {
"shape": {
"type": "rectangle",
"position": [
0,
0
],
"size": [
16,
8
]
}
}
},
"visible": {
"state": {
"visibleScale": [
2,
2
]
}
},
"vulnerable": {
"params": {
"types": [
"bio"
]
}
},
"spawner": {
"params": {
"spawns": {
"kitteh": {
"uri": "/kitty.entity.json"
}
}
},
"state": {
"maxSpawns": 10
}
}
}
}