humus-old/resource/rock-projectile.entity.json
2019-09-22 18:45:52 -05:00

1 line
3.7 KiB
JSON

{"traits":{"behaved":{"params":{"routines":{"type":"routines","routines":{"initial":{"type":"routine","routine":{"type":"actions","traversals":[{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"setDoesNotCollideWith"},{"type":"invoke","args":[{"type":"traversal","steps":[{"type":"key","key":"wielder"}]}]}]},{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"setPosition"},{"type":"invoke","args":[{"type":"traversal","steps":[{"type":"key","key":"wielder"},{"type":"key","key":"position"}]}]}]},{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"isVisible"}],"value":{"type":"literal","value":true}},{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"direction"}],"value":{"type":"traversal","steps":[{"type":"key","key":"wielder"},{"type":"key","key":"direction"}]}},{"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":"literal","value":0.5}]}]},{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"destroy"},{"type":"invoke","args":[]}]}]}},"reflect":{"type":"routine","routine":{"type":"actions","traversals":[{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"isColliding"}],"value":{"type":"literal","value":false}},{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"isDamaging"}],"value":{"type":"literal","value":false}},{"type":"traversal","steps":[{"type":"key","key":"Flow"},{"type":"key","key":"parallel"},{"type":"invoke","args":[{"type":"actions","traversals":[{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"transition"},{"type":"invoke","args":[{"type":"literal","value":{"opacity":0,"speed":0}},{"type":"literal","value":0.2}]}]},{"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":"sub"},{"type":"invoke","args":[{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"position"}]},{"type":"traversal","steps":[{"type":"key","key":"obstacle"},{"type":"key","key":"position"}]}]}]},{"type":"literal","value":0.2}]}]}]}]}]},{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"destroy"},{"type":"invoke","args":[]}]}]}}}}},"state":{"isBehaving":false}},"collider":{"params":{"collisionStartActions":{"type":"actions","traversals":[{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"context"},{"type":"key","key":"add"},{"type":"invoke","args":[{"type":"literal","value":"obstacle"},{"type":"traversal","steps":[{"type":"key","key":"other"}]}]}]},{"type":"traversal","steps":[{"type":"key","key":"entity"},{"type":"key","key":"currentRoutine"}],"value":{"type":"literal","value":"reflect"}}]},"isSensor":true}},"damaging":{"params":{"damageSpecs":[{"affinity":0,"knockback":500,"lock":1,"power":50,"variance":0.1}]}},"directional":{"params":{"directionCount":4}},"existent":{"state":{"name":"Rock (projectile)"}},"layered":{},"listed":{},"mobile":{"state":{"speed":200}},"physical":{},"pictured":{"params":{"images":{"initial":{"offset":[0,0],"size":[12,12],"uri":"/rock.png"}}}},"positioned":{},"roomed":{},"shaped":{"params":{"shape":{"type":"rectangle","position":[0,0],"size":[12,12]}}},"visible":{"state":{"isVisible":false}}}}