{
	"format_version": "1.20.40",
	"animation_controllers": {
		"controller.animation.shapescape_mb.endershulk_boss.spawn_delay": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"spawn_delay": "q.is_baby"
						}
					]
				},
				"spawn_delay": {
					"on_entry": ["variable.start_endershulk = q.life_time + 2.0;", "/playsound shapescape_mb.endershulk_boss.summon @a[r=25] ~ ~ ~ 5 1"],
					"transitions": [
						{
							"start": "(variable.start_endershulk < q.life_time)"
						}
					]
				},
				"start": {
					"on_entry": ["@s shapescape_mb:start"],
					"transitions": [
						{
							"exit": "1.0"
						}
					]
				},
				"exit": {}
			}
		},
		"controller.animation.shapescape_mb.endershulk_boss.death": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"death": "q.health == 1"
						}
					]
				},
				"death": {
					"on_entry": ["@s shapescape_mb:death", "variable.death = q.life_time + 5;"],
					"transitions": [
						{
							"despawn": "(variable.death < q.life_time)"
						}
					],
					"on_exit": ["/function shapescape/mb/endershulk_boss/death"]
				},
				"despawn": {
					"on_entry": ["@s shapescape_mb:despawn"]
				}
			}
		},
		"controller.animation.shapescape_mb.endershulk_boss.lose_target": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"lose_target": "!q.has_target"
						}
					]
				},
				"lose_target": {
					"on_entry": ["@s shapescape_mb:cooldown"],
					"transitions": [
						{
							"find_target": "q.has_target"
						}
					]
				},
				"find_target": {
					"on_entry": ["@s shapescape_mb:cooldown"],
					"transitions": [
						{
							"default": "1.0"
						}
					]
				}
			}
		},
		"controller.animation.shapescape_mb.endershulk_boss.liquid_blocks": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"teleportation": "q.is_in_water || q.is_in_lava"
						}
					]
				},
				"teleportation": {
					"on_entry": ["/tp ~ ~1.5 ~"],
					"transitions": [
						{
							"default": "1.0"
						}
					]
				}
			}
		},
		"controller.animation.shapescape_mb.endershulk_boss.states": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"opening": "1.0"
						}
					]
				},
				"opening": {
					"on_entry": ["@s shapescape_mb:set_property_state_opening", "variable.open = q.life_time + 1.5;"],
					"transitions": [
						{
							"open": "(variable.open < q.life_time)"
						}
					]
				},
				"open": {
					"on_entry": ["@s shapescape_mb:set_property_state_open"]
				}
			}
		},
		"controller.animation.shapescape_mb.endershulk_boss.ranged_attack": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"ranged_attack_preparation": "q.property('shapescape_mb:choose_attack') == 'ranged_attack_preparation'"
						}
					]
				},
				"ranged_attack_preparation": {
					"on_entry": ["variable.ranged_attack_preparation = q.life_time + 2.5;"],
					"transitions": [
						{
							"ranged_attack_execute_1": "(variable.ranged_attack_preparation < q.life_time)"
						}
					]
				},
				"ranged_attack_execute_1": {
					"on_entry": ["/playsound shapescape_mb.endershulk_boss.ranged_attack @a[r=25] ~ ~ ~ 5 1", "@s shapescape_mb:ranged_attack_execute_1", "variable.ranged_attack_execute_1 = q.life_time + 1.0;"],
					"transitions": [
						{
							"ranged_attack_execute_2": "(variable.ranged_attack_execute_1 < q.life_time)"
						}
					]
				},
				"ranged_attack_execute_2": {
					"on_entry": ["@s shapescape_mb:ranged_attack_execute_2", "/playsound shapescape_mb.endershulk_boss.ranged_attack @a [r=25] ~ ~ ~ 5 1", "variable.ranged_attack_execute_2 = q.life_time + 1.0;"],
					"transitions": [
						{
							"ranged_attack_execute_3": "(variable.ranged_attack_execute_2 < q.life_time)"
						}
					]
				},
				"ranged_attack_execute_3": {
					"on_entry": ["@s shapescape_mb:ranged_attack_execute_3", "/playsound shapescape_mb.endershulk_boss.ranged_attack @a [r=25] ~ ~ ~ 5 1", "variable.ranged_attack_execute_3 = q.life_time + 1.0;"],
					"transitions": [
						{
							"ranged_attack_execute_4": "(variable.ranged_attack_execute_3 < q.life_time)"
						}
					]
				},
				"ranged_attack_execute_4": {
					"on_entry": ["@s shapescape_mb:ranged_attack_execute_4", "/playsound shapescape_mb.endershulk_boss.ranged_attack @a[r=25] ~ ~ ~ 5 1", "variable.ranged_attack_execute_4 = q.life_time + 1.0;"],
					"transitions": [
						{
							"cooldown": "(variable.ranged_attack_execute_4 < q.life_time)"
						}
					]
				},
				"cooldown": {
					"on_entry": ["@s shapescape_mb:cooldown"],
					"transitions": [
						{
							"default": "q.property('shapescape_mb:choose_attack') == 'idle'"
						}
					]
				}
			}
		},
		"controller.animation.shapescape_mb.endershulk_boss.teleportation": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"disappeared": "q.property('shapescape_mb:choose_attack') == 'disappeared'"
						},
						{
							"appearing": "q.property('shapescape_mb:choose_attack') == 'appearing'"
						}
					]
				},
				"disappeared": {
					"on_entry": ["variable.disappeared_to_tp_to_player = q.life_time + 2;"],
					"transitions": [
						{
							"tp_to_player": "(variable.disappeared_to_tp_to_player < q.life_time)"
						}
					]
				},
				"tp_to_player": {
					"on_entry": ["@s shapescape_mb:set_property_teleport_to_player", "variable.tp_to_player = q.life_time + 1;"],
					"transitions": [
						{
							"cooldown": "(variable.tp_to_player < q.life_time)"
						}
					]
				},
				"appearing": {
					"on_entry": ["variable.appearing_after_tp_away_from_player = q.life_time + 2;"],
					"transitions": [
						{
							"tp_away_from_player": "(variable.appearing_after_tp_away_from_player < q.life_time)"
						}
					]
				},
				"tp_away_from_player": {
					"on_entry": ["@s shapescape_mb:set_property_teleport_away_from_player", "variable.tp_away_from_player = q.life_time + 1;"],
					"transitions": [
						{
							"cooldown": "(variable.tp_away_from_player < q.life_time)"
						}
					]
				},
				"cooldown": {
					"on_entry": ["@s shapescape_mb:cooldown"],
					"transitions": [
						{
							"default": "1.0"
						}
					]
				}
			}
		},
		"controller.animation.shapescape_mb.endershulk_boss.resist_suffocation": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"resist": "q.property('shapescape_mb:boss_class') == 'epic'"
						},
						{
							"resist": "q.property('shapescape_mb:boss_class') == 'legendary'"
						},
						{
							"resist": "q.property('shapescape_mb:boss_class') == 'impossible'"
						}
					]
				},
				"resist": {
					"on_entry": ["/effect @s water_breathing 1 0 true"],
					"transitions": [
						{
							"default": "q.state_time >= 0.9"
						}
					]
				}
			}
		}
	}
}