{
	"format_version": "1.19.0",
	"animation_controllers": {
		"controller.animation.player.login": {
			"initial_state": "login_check_1",
			"states": {
				"login_check_1": {
					"on_entry": [
						"/function player/login_check"
					],
					"transitions": [
						{ "login_check_2": "q.property('ldz:is_logging_in') == false" },
						{ "login_buffer": "q.property('ldz:is_logging_in') == true" }
					]
				},
				"login_check_2": {
					"on_entry": [
						"/function player/login_check"
					],
					"transitions": [
						{ "login_check_1": "q.property('ldz:is_logging_in') == false" },
						{ "login_buffer": "q.property('ldz:is_logging_in') == true" }
					]
				},
				"login_buffer": {
					"transitions": [
						{ "is_logged_in": "true" }
					]
				},
				"is_logged_in": {
					"on_entry": [
						"/function player/logged_in"
					],
					"animations": [
						{ "enderman_spawn_clock": "q.property('ldz:difficulty') != 'peaceful'"}
					]
				}
			}
		},

		"controller.animation.player.difficulty": {
			"initial_state": "default",
			"states": {
				"default": {
					"on_entry": [
						"/say default"
					],
					"transitions": [
						{ "peaceful": "q.property('ldz:difficulty') == 'peaceful'" },
						{ "easy": "q.property('ldz:difficulty') == 'easy'" },
						{ "normal": "q.property('ldz:difficulty') == 'normal'" },
						{ "hard": "q.property('ldz:difficulty') == 'hard'" }
					]
				},
				"peaceful": {
					"on_entry": [
						"/say peaceful"
					],
					"transitions": [
						{ "easy": "q.property('ldz:difficulty') == 'easy'" },
						{ "normal": "q.property('ldz:difficulty') == 'normal'" },
						{ "hard": "q.property('ldz:difficulty') == 'hard'" }
					]
				},
				"easy": {
					"on_entry": [
						"/say easy"
					],
					"transitions": [
						{ "peaceful": "q.property('ldz:difficulty') == 'peaceful'" },
						{ "normal": "q.property('ldz:difficulty') == 'normal'" },
						{ "hard": "q.property('ldz:difficulty') == 'hard'" }
					]
				},
				"normal": {
					"on_entry": [
						"/say normal"
					],
					"transitions": [
						{ "peaceful": "q.property('ldz:difficulty') == 'peaceful'" },
						{ "easy": "q.property('ldz:difficulty') == 'easy'" },
						{ "hard": "q.property('ldz:difficulty') == 'hard'" }
					]
				},
				"hard": {
					"on_entry": [
						"/say hard"
					],
					"transitions": [
						{ "peaceful": "q.property('ldz:difficulty') == 'peaceful'" },
						{ "easy": "q.property('ldz:difficulty') == 'easy'" },
						{ "normal": "q.property('ldz:difficulty') == 'normal'" }
					]
				}

			}
		},



		"controller.animation.player.tutorial": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{ "stage_1": "q.property('ldz:tutorial_stage') == 1" },
						{ "stage_2": "q.property('ldz:tutorial_stage') == 2" },
						{ "stage_3": "q.property('ldz:tutorial_stage') == 3" },
						{ "stage_4": "q.property('ldz:tutorial_stage') == 4" },
						{ "stage_5": "q.property('ldz:tutorial_stage') == 5" },
						{ "stage_6": "q.property('ldz:tutorial_stage') == 6" },
						{ "stage_7": "q.property('ldz:tutorial_stage') == 7" },
						{ "stage_8": "q.property('ldz:tutorial_stage') == 8" },
						{ "stage_9": "q.property('ldz:tutorial_stage') == 9" },
						{ "stage_10": "q.property('ldz:tutorial_stage') == 10" }
					]
				},
				"stage_1": {
					"on_entry": [
						"/tag @s add HideEndForceUI"
					],
					"animations": [
						"tutorial_stage_1"
					],
					"transitions": [
						{ "stage_2": "q.property('ldz:tutorial_stage') == 2" },
						{ "default": "q.property('ldz:tutorial_stage') != 1" }
					]
				},
				"stage_2": {
					"on_entry": [
						"/tag @s add HideEndForceUI"
					],
					"animations": [
						"tutorial_stage_2"
					],
					"transitions": [
						{ "stage_3": "q.property('ldz:tutorial_stage') == 3" },
						{ "default": "q.property('ldz:tutorial_stage') != 2" }
					]
				},
				"stage_3": {
					"on_entry": [
						"/tag @s add HideEndForceUI"
					],
					"animations": [
						"tutorial_stage_3"
					],
					"transitions": [
						{ "stage_4_delay": "q.property('ldz:tutorial_stage') == 4" },
						{ "default": "q.property('ldz:tutorial_stage') != 3" }
					]
				},
				"stage_4_delay": {
					"animations": [
						"tutorial_stage_4_delay",
						"anger_sending"
					],
					"transitions": [
						{ "stage_4": "q.all_animations_finished" }
					]
				},
				"stage_4": {
					"on_entry": [
						// Put stuff that should happen to each individual player here
					],
					"animations": [
						"tutorial_stage_4",
						"anger_sending"
					],
					"transitions": [
						{ "stage_5": "q.property('ldz:tutorial_stage') == 5" },
						{ "default": "q.property('ldz:tutorial_stage') != 4" }
					]
				},
				"stage_5": {
					"on_entry": [
						// Put stuff that should happen to each individual player here
					],
					"animations": [
						"tutorial_stage_5",
						"softlock_check_items"
					],
					"transitions": [
						{ "stage_6": "q.property('ldz:tutorial_stage') == 6" },
						{ "default": "q.property('ldz:tutorial_stage') != 5" }
					]
				},
				"stage_6": {
					"on_entry": [
						// Put stuff that should happen to each individual player here
					],
					"animations": [
						"tutorial_stage_6",
						"softlock_check_jail",
						"softlock_check_items"
					],
					"transitions": [
						{ "stage_7_delay": "q.property('ldz:tutorial_stage') == 7" },
						{ "default": "q.property('ldz:tutorial_stage') != 6" }
					]
				},
				"stage_7_delay": {
					"animations": [
						"tutorial_stage_7_delay"
					],
					"transitions": [
						{ "stage_7": "q.all_animations_finished" }
					]
				},
				"stage_7": {
					"on_entry": [
						"/event entity @e[family=portal_room_lever,c=1] set_invisible_to_false",
						"/event entity @e[family=portal_room_lever,c=1] add_bob_arrow",
						"/execute at @e[family=portal_room_lever,c=1] run playsound player.morph.vanilla.teleport @a ~ ~ ~ 1.5",
						"/execute at @e[family=portal_room_lever,c=1] run particle ldz:vanilla_teleport ~ ~-1 ~"
					],
					"animations": [
						"tutorial_stage_7",
						"softlock_check_jail",
						"softlock_check_items"
					],
					"transitions": [
						{ "complete": "q.property('ldz:tutorial_stage') != 7" }
					]
				},
				"stage_8": {
					"on_entry": [
						// Put stuff that should happen to each individual player here
					],
					"animations": [
						"tutorial_stage_8"
					],
					"transitions": [
						{ "stage_9": "q.property('ldz:tutorial_stage') == 9" },
						{ "default": "q.property('ldz:tutorial_stage') != 8" }
					]
				},
				"stage_9": {
					"on_entry": [
						// Put stuff that should happen to each individual player here
					],
					"animations": [
						"tutorial_stage_9"
					],
					"transitions": [
						{ "stage_10": "q.property('ldz:tutorial_stage') == 10" },
						{ "default": "q.property('ldz:tutorial_stage') != 9" }
					]
				},
				"stage_10": {
					"on_entry": [
						// Put stuff that should happen to each individual player here
					],
					"animations": [
						"tutorial_stage_10"
					],
					"transitions": [
						{ "stage_10": "q.property('ldz:tutorial_stage') == 10" },
						{ "default": "q.property('ldz:tutorial_stage') != 10" }
					]
				},
				"complete": {
					"animations": [
						"tutorial_complete"
					],
					"transitions": [
						{ "default": "q.all_animations_finished" }
					]
				}
			}
		},
		"controller.animation.player.jumping": {
			"initial_state": "default",
			"states": {
				"default": {
					"on_entry": [
						"/tag @s remove Jumping"
					],
					"transitions": [
						{ "jumping": "q.is_jumping" }
					]
				},
				"jumping": {
					"on_entry": [
						"/tag @s add Jumping"
					],
					"transitions": [
						{ "default": "!q.is_jumping" }
					]
				}
			}
		},
		"controller.animation.player.death":{
			"states": {
				"default":{
					"transitions": [
						{ "alive":"q.health > 0" },
						{ "dead":"q.health <= 0" }
					]
				},
				"alive":{
					"on_entry": [
						"/function player/respawn"											
					],
					"transitions": [
						{ "dead":"q.health <= 0" }
					]
				},
				"dead":{
					"on_entry": [
						"/function player/drop_force"
					],
					"transitions": [
						{ "alive":"q.health > 0" }
					]					
				}
			}
		},
		"controller.animation.player.morph_chef_camera_shake": {
			"initial_state": "default",
			"states": {
				"default": {
					"on_entry": [
						"/camerashake stop"
					],
					"transitions": [
						{ "chef_full": "q.property('ldz:chef_full')" }
					]
				},
				"chef_full": {
					"animations": [
						"chef_camera_shake"
					],
					"transitions": [
						{ "default": "!q.property('ldz:chef_full')" }
					],
					"on_exit": [
						"/camerashake stop"
					]
				}
			}
		},

		"controller.animation.player.held_morph": {
			"states": {
				"default": {
					"on_entry": [
						"@s set_morph_to_none",
						"/scoreboard objectives add HeldMorph dummy",
						"/scoreboard players set @s HeldMorph 0",
						"/function morph_particle",
						"/effect @s regeneration 0 0 true",
						"/effect @s slowness 0 0 true",
						"/effect @s resistance 0 0 true",
						"/effect @s speed 0 0 true",
						"/inputpermission set @s movement enabled"
					],
					"transitions": [
                        { "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" }
                    ],
					"on_exit": [
						"/scoreboard players set @s ShowForceTimer 10",
						"/playsound player.morph @a ~ ~ ~",
						"@s remove_attack"
					]
                },
				"morph_beast": {
					"on_entry": [
						"@s set_morph_to_beast",
						"/scoreboard players set @s HeldMorph 1",
						"/function morph_particle"
					],
					"animations": [
						"beast_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						//{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~",
						"/effect @s slowness 0"
					]
				},
				"morph_charger": {
					"on_entry": [
						"@s set_morph_to_charger",
						"/scoreboard players set @s HeldMorph 2",
						"/function morph_particle"
					],
					"animations": [
						{ "charger_passive": "!q.property('ldz:charger_active')" },
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        // { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~"
					]
				},
				"morph_chef": {
					"on_entry": [
						"@s set_morph_to_chef",
						"/scoreboard players set @s HeldMorph 3",
						"/function morph_particle"
					],
					"animations": [
						"ctrl.chef_camera_shake",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        // { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" }
                    ],
					"on_exit": [
						"/camerashake stop",
						"/playsound player.morph @a ~ ~ ~"
					]
				},
				"morph_chiller": {
					"on_entry": [
						"@s set_morph_to_chiller",
						"/scoreboard players set @s HeldMorph 4",
						"/function morph_particle"
					],
					"animations": [
						"chiller_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        // { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~"
					]
				},
				"morph_gardener": {
					"on_entry": [
						"@s set_morph_to_gardener",
						"/scoreboard players set @s HeldMorph 5",
						"/function morph_particle"
					],
					"animations": [
						"gardener_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        // { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~"
					]
				},
				"morph_hydro": {
					"on_entry": [
						"@s set_morph_to_hydro",
						"/scoreboard players set @s HeldMorph 6",
						"/function morph_particle"
					],
					"animations": [
						"hydro_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        // { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~",
						"/effect @s water_breathing 0 0 true"
					]
				},
				"morph_lord": {
					"on_entry": [
						"@s set_morph_to_lord",
						"/scoreboard players set @s HeldMorph 7",
						"/function morph_particle"
					],
					"animations": [
						"lord_passive",
						"show_hint",
						"ctrl.stop_punch_sound",
						{ "lord_slowness": "!q.is_sprinting" },
						{ "lord_speed": "q.is_sprinting" }
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        // { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~",
						"/effect @s slowness 0 0 true",
						"/effect @s speed 0 0 true",
						"/effect @s resistance 0 0 true"
					]
				},
				"morph_mystic": {
					"on_entry": [
						"@s set_morph_to_mystic",
						"/scoreboard players set @s HeldMorph 8",
						"/function morph_particle"
					],
					"animations": [
						"mystic_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        // { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" }
                    ],
					"on_exit": [
						"/effect @s regeneration 0 0 true",
						"/playsound player.morph @a ~ ~ ~",
						"@s set_mystic_beam_state_to_off"
					]
				},
				"morph_scorcher": {
					"on_entry": [
						"@s set_morph_to_scorcher",
						"/scoreboard players set @s HeldMorph 9",
						"/function morph_particle"
					],
					"animations": [
						"scorcher_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        // { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~",
						"/effect @s fire_resistance 0 0 true"
					]
				},
				"morph_scourge": {
					"on_entry": [
						"@s set_morph_to_scourge",
						"/scoreboard players set @s HeldMorph 10",
						"/function morph_particle"
					],
					"animations": [
						"scourge_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        // { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~"
					]
				},
				"morph_troll": {
					"on_entry": [
						"@s set_morph_to_troll",
						"/scoreboard players set @s HeldMorph 11",
						"/function morph_particle"
					],
					"animations": [
						"troll_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        // { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~",
						"@s remove_troll_passive"
					]
				},
				"morph_vanilla": {
					"on_entry": [
						"@s set_morph_to_vanilla",
						"/scoreboard players set @s HeldMorph 12",
						"/function morph_particle"
					],
					"animations": [
						"vanilla_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						// { "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~"
					]
				},
				"morph_wraith": {
					"on_entry": [
						"@s set_morph_to_wraith",
						"/scoreboard players set @s HeldMorph 13",
						"/function morph_particle",
						"/tag @s add MorphWraith"
					],
					"animations": [
						"wraith_passive",
						"show_hint",
						"ctrl.stop_punch_sound"
					],
					"transitions": [
						{ "morph_beast": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_beast')" },
                        { "morph_charger": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_charger')" },
                        { "morph_chef": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chef')" },
                        { "morph_chiller": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_chiller')" },
                        { "morph_gardener": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_gardener')" },
                        { "morph_hydro": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_hydro')" },
                        { "morph_lord": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_lord')" },
                        { "morph_mystic": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_mystic')" },
                        { "morph_scorcher": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scorcher')" },
                        { "morph_scourge": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_scourge')" },
                        { "morph_troll": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_troll')" },
						{ "morph_vanilla": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_vanilla')" },
                        // { "morph_wraith": "q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" },
                        { "default": "!q.is_item_name_any('slot.weapon.mainhand', 0, 'ldz:morph_wraith')" }
                    ],
					"on_exit": [
						"/playsound player.morph @a ~ ~ ~",
						"/tag @s remove MorphWraith"
					]
				}
            }
        },
		// CONTROLLER FOR USE BUTTON
		"controller.animation.player.morph_abilities": {
			"states": {
				"default": {
					"on_entry": [
						"@s set_cancel_activated_to_false",
						"@s set_mystic_beam_state_to_off",
						"@s set_lord_beam_state_to_off",
						"@s set_charger_active_to_false"
					],
					"transitions": [
						{ "morph_beast_1_cost":	"q.property('ldz:morph') == 'beast'    && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack') && q.property('ldz:melee_side') == 1" },
						{ "morph_beast_2_cost":	"q.property('ldz:morph') == 'beast'    && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack') && q.property('ldz:melee_side') == 2" },
						{ "morph_charger_cost":	"q.property('ldz:morph') == 'charger'  && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_chef_cost": 	"q.property('ldz:morph') == 'chef'     && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_chiller_cost": "q.property('ldz:morph') == 'chiller'  && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_gardener_cost":"q.property('ldz:morph') == 'gardener' && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_hydro_cost": 	"q.property('ldz:morph') == 'hydro'    && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						
						{ "morph_lord_melee_cost": 	"q.property('ldz:morph') == 'lord' && v.attack_time > 0" },
						{ "morph_lord_summon_cost": "q.property('ldz:morph') == 'lord' && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack') && q.is_sneaking" },
						{ "morph_lord_beam_cost": 	"q.property('ldz:morph') == 'lord' && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack') && !q.is_sneaking" },

						{ "morph_mystic_cost": 	"q.property('ldz:morph') == 'mystic'   && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_scorcher_cost":"q.property('ldz:morph') == 'scorcher' && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_scourge_cost": "q.property('ldz:morph') == 'scourge'  && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_troll_cost": 	"q.property('ldz:morph') == 'troll'    && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_vanilla_cost":	"q.property('ldz:morph') == 'vanilla'  && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" },
						{ "morph_wraith_cost": 	"q.property('ldz:morph') == 'wraith'   && q.is_using_item && v.attack_time == 0 && !q.property('ldz:morph_attack')" }
					]
				},
				"morph_beast_1_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_beast_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_beast_1": "true" }
					]
				},
				"morph_beast_1": {
					"on_entry": [
						"/event entity @s set_melee_side_to_2"
					],
					"animations": [
						{ "beast_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_beast_2_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_beast_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_beast_2": "true" }
					]
				},
				"morph_beast_2": {
					"on_entry": [
						"/event entity @s set_melee_side_to_1"
					],
					"animations": [
						{ "beast_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_charger_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_charger_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_charger_delay": "true" }
					]
				},
				"morph_charger_delay": {
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "morph_charger": "!q.is_using_item && v.attack_time == 0" },
						{ "default": "q.property('ldz:morph') != 'charger'" }
					]
				},
				"morph_charger": {
					"on_entry": [
						"@s set_charger_active_to_true",
						"/effect @s speed 22 2 true",
						"/effect @s resistance 0 0 true",
						"/camerashake add @s 0.1 1000"
					],
					"animations": [
						{ "charger_walk_cost": "!q.is_sprinting && q.is_moving" },
						{ "charger_walk_damage": "!q.is_sprinting && q.is_moving" },
						{ "charger_sprint_cost": "q.is_sprinting && q.is_moving" },
						{ "charger_sprint_damage": "q.is_sprinting && q.is_moving" }
					],
					"transitions": [
						{ "morph_charger_exit": "q.property('ldz:cancel_activated')" },
						{ "default": "q.property('ldz:morph') != 'charger'" },
						{ "default_delay": "(q.is_using_item || v.attack_time > 0)" }
					],
					"on_exit": [
						"@s set_charger_active_to_false",
						"/effect @s speed 0 0 true",
						"/effect @s resistance 0 0 true",
						"/camerashake stop @s"
					]
				},
				"morph_charger_exit": {
					"on_entry": [
						"/execute as @s[m=!creative] run function morph/cost/1"
					],
					"transitions": [
						{ "morph_cancelled": "1" }
					]
				},
				"default_delay": {
					"transitions": [
						{ "default": "!q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_chef_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags"
						//"/tag @s add cost_for_chef_morph",
						//"/function morph/cost/select_cost"
					],
					"animations": [
						{ "chef_activated_cost_check": "!q.property('ldz:chef_full')" }
					],
					"transitions": [
						{ "morph_chef_delay": "q.all_animations_finished || q.property('ldz:chef_full')" }
					]
				},
				"morph_chef_delay": {
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "morph_chef": "!q.property('ldz:cancel_activated')" }
					]
				},
				"morph_chef": {
					"animations": [
						{ "chef_activated": "!q.property('ldz:cancel_activated')" },
						{ "chef_activated_cost": "!q.property('ldz:chef_full')" }
					],
					"transitions": [
						{ "morph_chef_exit": "q.property('ldz:cancel_activated') || (!q.is_using_item && v.attack_time == 0) || q.property('ldz:chef_full')" }
					],
					"on_exit": [
						"/tag @s remove chef_dirty"
					]
				},
				"morph_chef_exit": {
					"transitions": [
						{ "default": "!q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_chiller_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_chiller_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_chiller": "true" }
					]
				},
				"morph_chiller": {
					"animations": [
						{ "chiller_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_gardener_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_gardener_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_gardener": "true" }
					]
				},
				"morph_gardener": {
					"animations": [
						{ "gardener_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_hydro_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_hydro_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_hydro": "true" }
					]
				},
				"morph_hydro": {
					"animations": [
						{ "hydro_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				// lord melee ability
				"morph_lord_melee_cost": {
					"on_entry": [
						"/execute as @s[tag=dev] run say melee",
						"/event entity @s set_morph_use_to_true"
					],
					"transitions": [
						{ "morph_lord_melee_right": "q.property('ldz:melee_side') == 1" },
						{ "morph_lord_melee_left": "q.property('ldz:melee_side') == 2" }
					]
				},
				"morph_lord_melee_right": {
					"on_entry": [
						"/event entity @s set_melee_side_to_2",
						"/playsound player.morph.lord.attack @a ~ ~ ~"
					],
					"animations": [
						{ "lord_melee_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					],
					"on_exit": [
						"/stopsound @a player.morph.lord.attack",
						"/stopsound @a player.morph.lord.claw"
					]
				},
				"morph_lord_melee_left": {
					"on_entry": [
						"/event entity @s set_melee_side_to_1",
						"/playsound player.morph.lord.attack @a ~ ~ ~"
					],
					"animations": [
						{ "lord_melee_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					],
					"on_exit": [
						"/stopsound @a player.morph.lord.attack",
						"/stopsound @a player.morph.lord.claw"
					]
				},
				// lord summon ability
				"morph_lord_summon_cost": {
					"on_entry": [
						"/execute as @s[tag=dev] run say summon",
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_lord_morph_summon",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_lord_summon": "true" }
					]
				},
				"morph_lord_summon": {
					"on_entry": [
						"/particle ldz:lord_roar ^ ^1 ^2",
						"/playsound player.morph.lord.summon @a ~ ~ ~"
					],
					"animations": [
						{ "lord_summon_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					],
					"on_exit": [
						"/stopsound @a player.morph.lord.summon"
					]
				},
				// lord beam ability
				"morph_lord_beam_cost": {
					"on_entry": [
						"/execute as @s[tag=dev] run say beam",
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_lord_morph_beam",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "morph_lord_beam_charge": "q.is_using_item && !q.property('ldz:cancel_activated')" },
						{ "default": "q.property('ldz:morph') != 'lord' || q.property('ldz:morph') == 'none'" }
					]
				},
				"morph_lord_beam_charge": {
					"on_entry": [
						"@s set_lord_beam_state_to_charge",
						"/playsound player.morph.lord.charge @a ~ ~ ~"
					],
					"animations": [
						"lord_charge_delay"
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "morph_lord_exit": "!q.is_using_item" },
						{ "morph_lord_beam": "q.is_using_item && q.all_animations_finished" },
						{ "default": "q.property('ldz:morph') != 'lord' || q.property('ldz:morph') == 'none'" }
					],
					"on_exit": [
						"/stopsound @a player.morph.lord.charge"
					]
				},
				"morph_lord_beam": {
					"on_entry": [
						"@s set_lord_beam_state_to_shoot",
						"/playsound player.morph.lord.mock @a ~ ~ ~"
					],
					"animations": [
						"lord_beam_cost",
						"lord_beam_activated",
						"lord_beam_sfx"
					],
					"transitions": [
						{ "morph_lord_exit": "!q.is_using_item && !q.property('ldz:cancel_activated')" },
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "q.property('ldz:morph') != 'lord' || q.property('ldz:morph') == 'none'" }
					],
					"on_exit": [
						"/stopsound @a player.morph.lord.mock",
						"/stopsound @a player.morph.lord.beam"
					]
				},
				// lord abilities exit states
				"morph_lord_exit": {
					"on_entry": [
						"@s set_lord_beam_state_to_off"
					],
					"animations": [
						"lord_beam_delay"
					],
					"transitions": [
						{ "default": "!q.property('ldz:cancel_activated') && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_mystic_cost": {
					"on_entry": [
						"/stopsound @a[r=13] mob.ender_mystic.charge",
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_mystic_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_mystic_charge_beam": "true" }
					]
				},
				"morph_mystic_charge_beam": {
					"on_entry": [
						"@s set_mystic_beam_state_to_charge"
					],
					"animations": [
						"mystic_charge_beam"
					],
					"transitions": [
						{ "default": "!q.property('ldz:morph_use')" },
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "morph_mystic_shoot_beam": "!q.property('ldz:cancel_activated') && q.all_animations_finished" }
					],
					"on_exit": [
						"/stopsound @a[r=13] mob.ender_mystic.charge"
					]
				},
				"morph_mystic_shoot_beam": {
					"on_entry": [
						"@s set_mystic_beam_state_to_shoot",
						"/function morph/mystic_activated"
					],
					"transitions": [
						{ "default": "!q.property('ldz:cancel_activated') && !q.is_using_item && v.attack_time == 0" }
					],
					"on_exit": [
						"@s set_mystic_beam_state_to_off"
					]
				},
				"morph_scorcher_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_scorcher_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_scorcher": "true" }
					]
				},
				"morph_scorcher": {
					"animations": [
						{ "scorcher_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_scourge_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_scourge_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_scourge": "true" }
					]
				},
				"morph_scourge": {
					"animations": [
						{ "scourge_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_troll_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_troll_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_troll": "true" }
					]
				},
				"morph_troll": {
					"animations": [
						{ "troll_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_vanilla_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_vanilla_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_vanilla": "true" }
					]
				},
				"morph_vanilla": {
					"animations": [
						{ "vanilla_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_wraith_cost": {
					"on_entry": [
						"/function morph/cost/remove_cost_tags",
						"/tag @s add cost_for_wraith_morph",
						"/function morph/cost/select_cost"
					],
					"transitions": [
						{ "morph_wraith": "true" }
					]
				},
				"morph_wraith": {
					"animations": [
						{ "wraith_activated": "!q.property('ldz:cancel_activated')" }
					],
					"transitions": [
						{ "morph_cancelled": "q.property('ldz:cancel_activated')" },
						{ "default": "!q.property('ldz:cancel_activated') && q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					]
				},
				"morph_cancelled": {
					"animations": [
						"cancel_cooldown"	
					],
					"transitions": [
						{ "default": "q.all_animations_finished && !q.is_using_item && v.attack_time == 0" }
					],
					"on_exit": [
						"/event entity @s set_cancel_activated_to_false"
					]
				}
			}
		},

		// CONTROLLER FOR ATTACK BUTTON
		"controller.animation.player.morph_attacks": {
			"states": {
				"default": {
					"on_entry": [
						"@s set_morph_attack_to_false"
					],
					"transitions": [
						{ "morph_beast_attack":		"q.property('ldz:morph') == 'beast'    && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_charger_attack":	"q.property('ldz:morph') == 'charger'  && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_chef_attack":		"q.property('ldz:morph') == 'chef'     && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_chiller_attack":	"q.property('ldz:morph') == 'chiller'  && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_gardener_attack":	"q.property('ldz:morph') == 'gardener' && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_hydro_attack":		"q.property('ldz:morph') == 'hydro'    && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_lord_attack":		"q.property('ldz:morph') == 'lord'     && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_mystic_attack":	"q.property('ldz:morph') == 'mystic'   && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_scorcher_attack":	"q.property('ldz:morph') == 'scorcher' && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_scourge_attack":	"q.property('ldz:morph') == 'scourge'  && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_troll_attack":		"q.property('ldz:morph') == 'troll'    && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_vanilla_attack":	"q.property('ldz:morph') == 'vanilla'  && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" },
						{ "morph_wraith_attack":	"q.property('ldz:morph') == 'wraith'   && v.attack_time > 0 && !q.is_using_item && !q.property('ldz:morph_use')" }
					],
					"on_exit": [
						"@s set_morph_attack_to_true"
					]
				},
				"morph_beast_attack": {
					"animations": [
						"beast_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_charger_attack": {
					"animations": [
						"charger_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_chef_attack": {
					"animations": [
						"chef_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_chiller_attack": {
					"animations": [
						"chiller_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_gardener_attack": {
					"animations": [
						"gardener_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_hydro_attack": {
					"animations": [
						"hydro_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_lord_attack": {
					"animations": [
						"lord_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_mystic_attack": {
					"animations": [
						"mystic_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_scorcher_attack": {
					"animations": [
						"scorcher_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_scourge_attack": {
					"animations": [
						"scourge_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_troll_attack": {
					"animations": [
						"troll_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_vanilla_attack": {
					"animations": [
						"vanilla_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				},
				"morph_wraith_attack": {
					"animations": [
						"wraith_attack_cooldown"
					],
					"transitions": [
						{ "default": "q.all_animations_finished && v.attack_time == 0" }
					]
				}
			}
		},
		"controller.animation.player.morph_attack_old": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{ "attack": "q.property('ldz:morph_attack')" }
					]
				},
				"attack": {
					"transitions": [
						{ "default": "v.attack_time == 0" }
					],
					"on_exit": [
						"@s set_morph_attack_to_false"
					]
				}
			}
		},
		"controller.animation.player.morph_use": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{ "use": "q.property('ldz:morph_use')" }
					]
				},
				"use": {
					"transitions": [
						{ "default": "!q.is_using_item" }
					],
					"on_exit": [
						"@s set_morph_use_to_false"
					]
				}
			}
		},
		"controller.animation.player.stop_vanilla_punch_sound": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{ "stop_sound": "v.attack_time > 0" }
					]
				},
				"stop_sound": {
					"on_entry": [
						"/stopsound @s game.player.attack.nodamage",
						"/stopsound @s game.player.attack.strong"
					],
					"transitions": [
						{ "default": "1" }
					]
				}
			}
		},
		"controller.animation.player.end_force_management": {
			"initial_state": "clock_1",
			"states": {
				"clock_1": {
					"on_entry": [
						"/function end_force/player/manager"
					],
					"transitions": [
						{ "clock_2": "1" }
					]
				},
				"clock_2": {
					"on_entry": [
						"/function end_force/player/manager"
					],
					"transitions": [
						{ "clock_1": "1" }
					]
				}
			}
		},
		"controller.animation.player.held_item": {
			"states": {
				"default": {
					"transitions": [
                        { "end_force_bottle_1": "q.is_item_name_any('slot.weapon.mainhand',0,'ldz:end_force_bottle_1') && q.is_using_item" },
                        { "end_force_bottle_2": "q.is_item_name_any('slot.weapon.mainhand',0,'ldz:end_force_bottle_2') && q.is_using_item" },
                        { "end_force_bottle_3": "q.is_item_name_any('slot.weapon.mainhand',0,'ldz:end_force_bottle_3') && q.is_using_item" },
                        { "end_force_bottle_4": "q.is_item_name_any('slot.weapon.mainhand',0,'ldz:end_force_bottle_4') && q.is_using_item" },
                        { "end_force_bottle_5": "q.is_item_name_any('slot.weapon.mainhand',0,'ldz:end_force_bottle_5') && q.is_using_item" }
                    ]
				},
				"end_force_bottle_1": {
					"on_entry": [
						"/clear @s[m=survival] ldz:end_force_bottle_1 0 1",
						"/clear @s[m=adventure] ldz:end_force_bottle_1 0 1",
						"/playsound player.end_force_bottle.throw @a ~ ~ ~",
						"@s spawn_end_force_bottle_1"
					],
					"animations": [
						"throw_delay"
					],
					"transitions": [
						{ "default": "q.all_animations_finished" }
					]
				},
				"end_force_bottle_2": {
					"on_entry": [
						"/clear @s[m=survival] ldz:end_force_bottle_2 0 1",
						"/clear @s[m=adventure] ldz:end_force_bottle_2 0 1",
						"/playsound player.end_force_bottle.throw @a ~ ~ ~",
						"@s spawn_end_force_bottle_2"
					],
					"animations": [
						"throw_delay"
					],
					"transitions": [
						{ "default": "q.all_animations_finished" }
					]
				},
				"end_force_bottle_3": {
					"on_entry": [
						"/clear @s[m=survival] ldz:end_force_bottle_3 0 1",
						"/clear @s[m=adventure] ldz:end_force_bottle_3 0 1",
						"/playsound player.end_force_bottle.throw @a ~ ~ ~",
						"@s spawn_end_force_bottle_3"
					],
					"animations": [
						"throw_delay"
					],
					"transitions": [
						{ "default": "q.all_animations_finished" }
					]
				},
				"end_force_bottle_4": {
					"on_entry": [
						"/clear @s[m=survival] ldz:end_force_bottle_4 0 1",
						"/clear @s[m=adventure] ldz:end_force_bottle_4 0 1",
						"/playsound player.end_force_bottle.throw @a ~ ~ ~",
						"@s spawn_end_force_bottle_4"
					],
					"animations": [
						"throw_delay"
					],
					"transitions": [
						{ "default": "q.all_animations_finished" }
					]
				},
				"end_force_bottle_5": {
					"on_entry": [
						"/clear @s[m=survival] ldz:end_force_bottle_5 0 1",
						"/clear @s[m=adventure] ldz:end_force_bottle_5 0 1",
						"/playsound player.end_force_bottle.throw @a ~ ~ ~",
						"@s spawn_end_force_bottle_5"
					],
					"animations": [
						"throw_delay"
					],
					"transitions": [
						{ "default": "q.all_animations_finished" }
					]
				}
			}
		},
		"controller.animation.player.interacted_with": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{ "charger": 	"q.property('ldz:interacted_with') == 'charger'" },
						{ "chef": 		"q.property('ldz:interacted_with') == 'chef'" },
						{ "gardener": 	"q.property('ldz:interacted_with') == 'gardener'" },
						{ "hydro": 		"q.property('ldz:interacted_with') == 'hydro'" },
						{ "lord_summoner": 		"q.property('ldz:interacted_with') == 'lord_summoner'" }
					]
				},
				"charger": {
					"on_entry": [
						"/function player/interacted_with_charger"
					],
					"transitions": [
						{ "default": "q.property('ldz:interacted_with') == 'none'" }
					]
				},
				"chef": {
					"on_entry": [
						"/function player/interacted_with_chef"
					],
					"transitions": [
						{ "default": "q.property('ldz:interacted_with') == 'none'" }
					]
				},
				"gardener": {
					"on_entry": [
						"/function player/interacted_with_gardener"
					],
					"transitions": [
						{ "default": "q.property('ldz:interacted_with') == 'none'" }
					]
				},
				"hydro": {
					"on_entry": [
						"/function player/interacted_with_hydro"
					],
					"transitions": [
						{ "default": "q.property('ldz:interacted_with') == 'none'" }
					]
				},
				"lord_summoner": {
					"on_entry": [
						"/function player/interacted_with_lord_summoner"
					],
					"transitions": [
						{ "default": "q.property('ldz:interacted_with') == 'none'" }
					]
				}
			}
		},
		"controller.animation.morph_charger.sfx": {
			"initial_state": "default",
			"states": {	
				"default":{					
					"transitions": [
						{
							"running": "q.property('ldz:charger_active') == true"
						}
					]
				},
				"running": {
					"on_entry": [
						"/function player/sfx_charger_start"	
					],						
					"animations": [
						"charger_running_sfx"
					],
					"transitions": [
						{ "default": "q.property('ldz:charger_active') == false" }
					],
					"on_exit":[
						"/function player/sfx_charger_stop"	
					]
				}
			}
		},
		"controller.animation.player.dynamic_height": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{ "check_height": "q.property('ldz:morph') != 'none' && q.property('ldz:morph') != 'charger'" }
					]
				},
				"check_height": {
					"on_entry": [
						"/scoreboard objectives add CurrentHeight dummy",
						"/scoreboard players add @s CurrentHeight 0"
					],
					"animations": [
						"check_height"
					],
					"transitions": [
						{ "default": "q.property('ldz:morph') == 'none' || q.property('ldz:morph') == 'charger'" }
					],
					"on_exit": [
						"/event entity @s set_height_to_normal",
						"/scoreboard players set @s CurrentHeight 0"
					]
				}
			}
		}
    }
}