{
	"format_version": "1.10.0",
	"animation_controllers": {
		"controller.animation.shapescape_mb.mammoth_boss.change_phase": {
			"states": {
				"default": {
					"transitions": [
						// Transition to the actual state of the entity, after model is reloaded
						{
							"phase_1": "q.property('shapescape_mb:mammoth_phase') == 1"
						},
						{
							"phase_2": "q.property('shapescape_mb:mammoth_phase') == 2"
						},
						{
							"phase_3": "q.property('shapescape_mb:mammoth_phase') == 3"
						}
					]
				},
				"phase_1": {
					"transitions": [
						// q.is_illager_captain is used before the transition
						{
							"pre_phase_2": "q.is_illager_captain"
						},
						// Fallback transitions
						{
							"phase_2": "q.property('shapescape_mb:mammoth_phase') == 2"
						},
						{
							"phase_3": "q.property('shapescape_mb:mammoth_phase') == 3"
						}
					]
				},
				"pre_phase_2": {
					"animations": ["initialize_phase_2"],
					"transitions": [
						// The actual transition happens when all animations are finished and the
						// factual state of the entity is changed
						{
							"phase_2": "q.property('shapescape_mb:mammoth_phase') == 2 && q.all_animations_finished"
						},
						{
							"phase_3": "q.property('shapescape_mb:mammoth_phase') == 3 && q.all_animations_finished"
						}
					]
				},
				"phase_2": {
					"transitions": [
						// q.is_illager_captain is used before the transition
						{
							"phase_3": "q.is_illager_captain"
						},
						// Fallback transitions
						{
							"phase_3": "q.property('shapescape_mb:mammoth_phase') == 3"
						}
					]
				},
				"phase_3": {
					"animations": ["initialize_phase_3"]
				}
			}
		},
		"controller.animation.shapescape_mb.mammoth_boss.phase_3_shield": {
			"states": {
				"default": {
					"transitions": [
						{
							"particles": "q.is_sheared"
						}
					]
				},
				"particles": {
					"animations": ["a.phase_3_shield"],
					"particle_effects": [
						{
							"effect": "phase_3_shield_0"
						},
						{
							"effect": "phase_3_shield_1"
						}
					],
					"transitions": [
						{
							"default": "!q.is_sheared"
						}
					]
				}
			}
		},
		"controller.animation.shapescape_mb.mammoth_boss.idle_walk": {
			"states": {
				"default": {
					"animations": ["idle"],
					"transitions": [
						{
							"walk": "q.modified_move_speed >= 0.05"
						}
					],
					"blend_transition": 0.2
				},
				"walk": {
					"animations": [{ "walk": "v.smooth_modified_move_speed*1.5" }],
					"transitions": [
						{
							"default": "q.modified_move_speed < 0.05"
						}
					],
					"blend_transition": 0.2
				}
			}
		},
		"controller.animation.shapescape_mb.mammoth_boss.general": {
			"states": {
				"default": {
					"transitions": [
						{
							"spawn": "q.property('shapescape_mb:mammoth_state') == 'spawn'"
						},
						{
							"ready": "q.property('shapescape_mb:mammoth_state') != 'spawn'"
						},
						{
							"death": "q.property('shapescape_mb:mammoth_state') == 'death'"
						}
					]
				},
				"spawn": {
					"animations": ["ac.idle_walk"],
					"transitions": [
						{
							"ready": "q.property('shapescape_mb:mammoth_state') != 'spawn'"
						}
					]
				},
				"ready": {
					"animations": ["ac.idle_walk"],
					"transitions": [
						{
							"attack_right": "q.is_delayed_attacking && q.target_y_rotation >= 0.0"
						},
						{
							"attack_left": "q.is_delayed_attacking"
						},
						{
							"charge": "q.property('shapescape_mb:mammoth_state') == 'charge'"
						},
						{
							"stomp": "q.property('shapescape_mb:mammoth_state') == 'stomp'"
						},
						{
							"magma": "q.property('shapescape_mb:mammoth_state') == 'magma'"
						},
						{
							"earthquake": "q.property('shapescape_mb:mammoth_state') == 'earthquake'"
						},
						{
							"death": "q.property('shapescape_mb:mammoth_state') == 'death'"
						}
					]
				},
				"attack_right": {
					"animations": [{ "attack_right": 1.75 }],
					"transitions": [
						{
							"ready": "!q.is_delayed_attacking"
						},
						{
							"charge": "q.property('shapescape_mb:mammoth_state') == 'charge'"
						},
						{
							"stomp": "q.property('shapescape_mb:mammoth_state') == 'stomp'"
						},
						{
							"magma": "q.property('shapescape_mb:mammoth_state') == 'magma'"
						},
						{
							"earthquake": "q.property('shapescape_mb:mammoth_state') == 'earthquake'"
						},
						{
							"death": "q.property('shapescape_mb:mammoth_state') == 'death'"
						}
					],
					"blend_transition": 0.2
				},
				"attack_left": {
					"animations": [{ "attack_left": 1.75 }],
					"transitions": [
						{
							"ready": "!q.is_delayed_attacking"
						},
						{
							"charge": "q.property('shapescape_mb:mammoth_state') == 'charge'"
						},
						{
							"stomp": "q.property('shapescape_mb:mammoth_state') == 'stomp'"
						},
						{
							"magma": "q.property('shapescape_mb:mammoth_state') == 'magma'"
						},
						{
							"earthquake": "q.property('shapescape_mb:mammoth_state') == 'earthquake'"
						},
						{
							"death": "q.property('shapescape_mb:mammoth_state') == 'death'"
						}
					],
					"blend_transition": 0.2
				},
				"charge": {
					"animations": [
						"charge_sound",
						"rotate_towards_target",
						{ "charge_walk": "q.modified_move_speed" },
						{ "charge_head": "q.modified_move_speed" }
					],
					"transitions": [
						{
							"death": "q.property('shapescape_mb:mammoth_state') == 'death'"
						},
						{
							"ready": "q.property('shapescape_mb:mammoth_state') != 'charge'"
						}
					],
					"blend_transition": 0.5
				},
				"stomp": {
					"animations": ["stomp"],
					"transitions": [
						{
							"death": "q.property('shapescape_mb:mammoth_state') == 'death'"
						},
						{
							"ready": "q.property('shapescape_mb:mammoth_state') != 'stomp'"
						}
					],
					"blend_transition": 0.1
				},
				"magma": {
					"animations": ["magma"],
					"transitions": [
						{
							"death": "q.property('shapescape_mb:mammoth_state') == 'death'"
						},
						{
							"ready": "q.property('shapescape_mb:mammoth_state') != 'magma'"
						}
					],
					"blend_transition": 0.5
				},
				"earthquake": {
					"animations": [
						// Earthquake uses the same animation as magma. This
						// is a weaker version of the magma attack.
						"magma"
					],
					"transitions": [
						{
							"death": "q.property('shapescape_mb:mammoth_state') == 'death'"
						},
						{
							"ready": "q.property('shapescape_mb:mammoth_state') != 'earthquake'"
						}
					],
					"blend_transition": 0.5
				},
				"death": {
					"particle_effects": [
						{
							"effect": "lava_leaks"
						}
					],
					"on_entry": ["v.target_rotation=q.body_y_rotation;"],
					"animations": ["death", "lock_rotation"],
					"transitions": [
						{
							// This transition should never be used and it's just a tool for
							// the debugging or testing purposes.
							"ready": "q.property('shapescape_mb:mammoth_state') != 'death'"
						}
					]
				}
			}
		}
	}
}
