{
	"format_version": "1.10.0",
	"animation_controllers": {
		"controller.animation.manalabs_zombie.doc_zombie.death": {
			"initial_state": "default",
			"states": {
				"default": {
					"transitions": [
						{
							"last_dmg_player": "q.health == 1 && q.property('manalabs_zombie:last_dmg_player')"
						},
						{
							"death": "q.health == 1"
						}
					]
				},
				"last_dmg_player": {
					"on_entry": ["/tag @s add MANALABS_LAST_DMG_PLAYER"],
					"transitions": [
						{
							"death": "1.0"
						}
					]
				},
				"death": {
					"on_entry": ["v.death_anim_time = q.life_time;", "@s manalabs_zombie:dead"],
					"transitions": [
						{
							"despawn": "q.life_time - v.death_anim_time > 3.5"
						}
					]
				},
				"despawn": {
					"on_entry": [
						"/execute as @s[tag=MANALABS_LAST_DMG_PLAYER] run summon manalabs_zombie:xp_entity ~ ~ ~ ~ ~ manalabs_zombie:xp_value_100",
						"/execute as @s[tag=MANALABS_LAST_DMG_PLAYER] run loot spawn ~ ~ ~ loot \"manalabs/zombie/doc_zombie.loot\"",
						"@s manalabs_zombie:despawn"
					]
				}
			}
		}
	}
}
