{
	"type": "origins:multiple",
	"callback":
	{
		"type": "origins:action_on_callback",
		"entity_action_added": {
			"type": "origins:and",
			"actions": [
				{
					"type": "origins:execute_command",
					"command": "scale delay set 0 @s"
				}
			]
		}
	},
	"model":
	{
		"type": "origins:model_color",
		"red": 0.1,
		"green": 0.1,
		"blue": 0.1
	},
	"basehealth": 
	{
		"type": "origins:attribute",
		"update_health": true,
		"modifiers": {
			"attribute": "minecraft:generic.max_health",
			"operation": "multiply_total",
			"value": -0.75
		}
	},
	"immunities": 
	{
		"type":"origins:modify_damage_taken",
		"modifier":{
			"value": -1,
			"operation":"multiply_total"
		},
		"damage_condition":	{
			"type": "origins:name",
			"name": "drown"
		}
	},
	"no_collision": 
	{
		"type": "origins:prevent_entity_collision"
	},
	"motion":
	{
		"type": "origins:action_over_time",
		"interval": 2,
		"entity_action": {
			"type": "origins:if_else_list",
			"actions": [
				{
					"condition": {
						"type": "origins:resource",
						"comparison": "==",
						"resource": "*:*_freedom",
						"compare_to": 0
					},
					"action": {
						"type": "origins:execute_command",
						"command": "tp @s @e[tag=ordnance,limit=1,sort=nearest,distance=..6]"
					}
				},
				{
					"condition": {
						"type": "origins:resource",
						"comparison": "==",
						"resource": "*:*_freedom",
						"compare_to": 1
					},
					"action": {
						"type": "origins:execute_command",
						"command": "tp @s @e[tag=ordtarget,limit=1,sort=nearest,distance=..10]"
					}
				}
			]
		}
	},
	"antigrav":
	{
		"type": "origins:modify_falling",
		"velocity": 0.01,
		"take_fall_damage": false
	},
	"death": 
	{
		"type": "origins:resource",
		"min": 0,
		"max": 5,
		"start_value": 5,
		"hud_render": {
			"should_render": false
		}
	},
	"freedom": 
	{
		"type": "origins:resource",
		"min": 0,
		"max": 1,
		"start_value": 0,
		"hud_render": {
			"should_render": false
		}
	},
	"kill_friends":
	{
		"type": "origins:action_when_damage_taken",
		"cooldown": 0,
		"entity_action":{
			"type": "origins:execute_command",
			"command": "kill @e[tag=ordrone,distance=..1]"
		}
	},
	"timer": 
	{
		"type": "origins:action_over_time",
		"interval": 60,
		"entity_action": {
			"type": "origins:if_else_list",
			"actions": [
				{
					"condition": {
						"type": "origins:resource",
						"comparison": ">",
						"resource": "*:*_death",
						"compare_to": 0
					},
					"action": {
						"type": "origins:and",
						"actions": [
							{
								"type": "origins:execute_command",
								"command": "resource change @p[tag=ordnance,sort=nearest,limit=1,distance=..15] ordnance:ordnance_passives_barrier 1"
							},
							{
								"type": "origins:if_else_list",
								"actions": [
									{
										"condition":{
											"type": "origins:and",
											"conditions":[
												{
													"type": "origins:resource",
													"comparison": "==",
													"resource": "*:*_freedom",
													"compare_to": 1
												},
												{
													"type": "origins:health",
													"comparison": ">",
													"compare_to": 0
												}
											]
										},
										"action": {
											"type": "origins:and",
											"actions": [
												{
													"type": "origins:chance",
													"action":{
														"type": "origins:execute_command",
														"command": "execute as @e[tag=ordtarget,distance=..2,sort=nearest,limit=1] run playsound minecraft:entity.vex.charge master @a ~ ~ ~ 1 1"
													},
													"chance": 0.65
												},
												{
													"type": "origins:execute_command",
													"command": "damage @e[tag=ordtarget,distance=..2,sort=nearest,limit=1] 6 minecraft:magic"
												},
												{
													"type": "origins:execute_command",
													"command": "execute as @e[tag=ordtarget,distance=..2,sort=nearest,limit=1] run particle minecraft:block redstone_block ~ ~1 ~ .1 .1 .1 1 8"
												},
												{
													"type": "origins:execute_command",
													"command": "resource set @e[tag=ordtarget,distance=..2,sort=nearest,limit=1] ordnance:invisible_ordnance_targeted 4"
												},
												{
													"type": "origins:execute_command",
													"command": "execute as @e[tag=ordtarget,distance=..2] run resource change @e[tag=ordrone,distance=..3,limit=1] ordnance:weapons/weaponry_friendrone_death -1"
												}
											]
										}
									}
								]
							}
						]
					}
				},
				{
					"condition": {
						"type": "origins:and",
						"conditions": [
							{
								"type": "origins:resource",
								"comparison": "==",
								"resource": "*:*_death",
								"compare_to": 0
							}
						]
					},
					"action": {
						"type": "origins:and",
						"actions": [
							{
								"type": "origins:execute_command",
								"command": "playsound minecraft:entity.allay.death master @a ~ ~ ~ 1 1"
							},
							{
								"type": "origins:execute_command",
								"command": "execute at @s run particle minecraft:explosion ^ ^ ^ 1 0 1 0 20 normal @a"
							},
							{
								"type": "origins:execute_command",
								"command": "kill @s"
							},
							{
								"type": "origins:execute_command",
								"command": "tp @s ~ ~-300 ~"
							}
						]
					}
				}
			]
		}
	}
}