{
	"settings": {
		"is_borderless": false,
		"is_cloneable": false,
		"is_initial_spawning_enabled": true,
		"is_void_button_visible": true,
		"void_filter": []
	},
	"elements": {
		"Activator": {
			"display": "Activator",
			"class": "magic"
		},
		"Counter": {
			"custom_props": {
				"count": {
					"type": "number",
					"value": 0
				}
			},
			"is_static": true,
			"display": [
				"Counter: ",
				{
					"type": "bind",
					"target": {
						"id": "Counter",
						"name": "count",
						"precision": 0
					}
				}
			]
		},
		"Reward": {
			"display": "Reward",
			"class": "gold"
		},
		"Water": {
			"display": "Water",
			"class": "water"
		}
	},
	"classes": {
		"magic": {
			"background_color": {
				"type": "RGBA",
				"red": 150,
				"green": 50,
				"blue": 255,
				"alpha": 1.0
			}
		},
		"gold": {
			"background_color": {
				"type": "RGBA",
				"red": 255,
				"green": 215,
				"blue": 0,
				"alpha": 1.0
			},
			"color": {
				"type": "RGBA",
				"red": 0,
				"green": 0,
				"blue": 0,
				"alpha": 1.0
			}
		}
	},
	"events": {
		"on_start": [
			"Activator",
			"Counter"
		],
		"on_join": [],
		"on_leave": []
	},
	"functions": {
		"test_func": {
			"args": {
				"arg1": {
					"type": "number"
				},
				"arg2": {
					"type": "string"
				},
				"arg3": {
					"type": "array"
				}
			},
			"result": [
				{
					"type": "set",
					"target": {
						"id": "Counter",
						"name": "count"
					},
					"value": {
						"type": "computed",
						"expression": "g(arg('arg2'), 'count') + arg('arg1')"
					}
				},
				{
					"type": "spawn",
					"element": "Water",
					"quantity": {
						"type": "computed",
						"expression": "g('Counter', 'count') * 2"
					}
				},
				{
					"type": "run_reaction",
					"reaction": {
						"type": "arg",
						"name": "arg3"
					}
				}
			]
		}
	},
	"reactions": [
		{
			"reagents": [
				"Activator",
				"Counter"
			],
			"spawn_style": "short",
			"result": [
				{
					"type": "call",
					"function": "test_func",
					"args": {
						"arg1": {
							"type": "computed",
							"expression": "g('Counter', 'count') + 1"
						},
						"arg2": "Counter",
						"arg3": [
							"Reward",
							"Reward"
						]
					}
				},
				"Activator"
			]
		}
	]
}
