{
	"format_version": "1.19.0",
	"minecraft:entity": {
		"description": {
			"identifier": "dotvi:fallan_alatar",
			"is_spawnable": true,
			"is_summonable": true,
			"is_experimental": false
		},
		"component_groups": {
			"minecraft:celebrate": {
				"minecraft:behavior.celebrate": {
					"priority": 5,
					"celebration_sound": "celebrate",
					"sound_interval": {
						"range_min": 2,
						"range_max": 7
					},
					"jump_interval": {
						"range_min": 1,
						"range_max": 3.5
					},
					"duration": 30,
					"on_celebration_end_event": {
						"event": "minecraft:stop_celebrating",
						"target": "self"
					}
				}
			},
			"minecraft:raid_configuration": {
				"minecraft:dweller": {
					"dwelling_type": "village",
					"dweller_role": "hostile",
					"update_interval_base": 60,
					"update_interval_variant": 40,
					"can_find_poi": false,
					"can_migrate": false,
					"first_founding_reward": 0
				},
				"minecraft:behavior.move_to_village": {
					"priority": 6,
					"speed_multiplier": 0.7
				},
				"minecraft:ambient_sound_interval": {
					"value": 2,
					"range": 4,
					"event_name": "ambient.in.raid"
				}
			},
			"dotvi:melee_attack": {
				"minecraft:behavior.melee_attack": {
					"priority": 3,
					"speed_multiplier": 1,
					"track_target": false
				},
				"minecraft:attack": {
					"damage": 12
				},
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 2,
					"within_radius": 25,
					"reselect_targets": true,
					"entity_types": [
						{
							"filters": {
								"any_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									}
								]
							},
							"max_dist": 35
						}
					],
					"must_see": true,
					"must_see_forget_duration": 17
				},
				"minecraft:timer": {
					"looping": false,
					"time": 3,
					"time_down_event": {
						"target": "self",
						"event": "dotvi:attack_shuffle"
					}
				},
				"minecraft:variant": {
					"value": 1
				}
			},
			"dotvi:magic_attack": {
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 2,
					"within_radius": 25,
					"reselect_targets": true,
					"entity_types": [
						{
							"filters": {
								"any_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									}
								]
							},
							"max_dist": 35
						}
					],
					"must_see": true,
					"must_see_forget_duration": 17
				},
				"minecraft:timer": {
					"looping": false,
					"time_down_event": {
						"target": "self",
						"event": "dotvi:attack_shuffle"
					},
					"time": 20
				},
				"minecraft:variant": {
					"value": 3
				},
				"minecraft:behavior.summon_entity": {
					"priority": 0,
					"summon_choices": [
						{
							"min_activation_range": 0,
							"cooldown_time": 3,
							"weight": 5,
							"cast_duration": 2,
							"particle_color": "#FF023800",
							"start_sound_event": "cast.spell",
							"sequence": [
								{
									"shape": "circle",
									"target": "self",
									"base_delay": 1,
									"delay_per_summon": 0.5,
									"num_entities_spawned": 7,
									"size": 5.5,
									"sound_event": "prepare.attack",
									"entity_type": "dotvi:alatarrune_alatine"
								}
							]
						},
						{
							"min_activation_range": 0,
							"cooldown_time": 3,
							"weight": 5,
							"cast_duration": 2,
							"particle_color": "#FF023800",
							"start_sound_event": "cast.spell",
							"sequence": [
								{
									"shape": "circle",
									"target": "self",
									"base_delay": 1,
									"delay_per_summon": 0.25,
									"num_entities_spawned": 5,
									"size": 5.5,
									"sound_event": "prepare.attack",
									"entity_type": "dotvi:alatarrune_voidburn"
								}
							]
						},
						{
							"min_activation_range": 0,
							"cooldown_time": 3,
							"weight": 5,
							"cast_duration": 2,
							"particle_color": "#FF023800",
							"start_sound_event": "cast.spell",
							"sequence": [
								{
									"shape": "circle",
									"target": "self",
									"base_delay": 1,
									"delay_per_summon": 0.07,
									"num_entities_spawned": 5,
									"size": 5.5,
									"sound_event": "prepare.attack",
									"entity_type": "dotvi:alatarrune_clear"
								}
							]
						},
						{
							"min_activation_range": 0,
							"cooldown_time": 5,
							"weight": 5,
							"cast_duration": 2,
							"particle_color": "#FF023800",
							"start_sound_event": "cast.spell",
							"sequence": [
								{
									"shape": "circle",
									"target": "self",
									"base_delay": 1,
									"delay_per_summon": 0.07,
									"num_entities_spawned": 1,
									"size": 1.5,
									"sound_event": "prepare.attack",
									"entity_type": "dotvi:alatarrune_escaton"
								}
							]
						}
					]
				}
			},
			"dotvi:roar_attack": {
				"minecraft:behavior.knockback_roar": {
					"priority": 0,
					"attack_time": 1.62,
					"cooldown_time": 5,
					"knockback_damage": 30,
					"duration": 3,
					"knockback_range": 5,
					"damage_filters": {
						"all_of": [
							{
								"test": "is_family",
								"subject": "other",
								"value": "player"
							}
						]
					},
					"on_roar_end": {
						"target": "self",
						"event": "dotvi:attack_shuffle"
					},
					"knockback_horizontal_strength": 6,
					"knockback_vertical_strength": 6
				},
				"minecraft:timer": {
					"looping": false,
					"time": 3,
					"time_down_event": {
						"target": "self",
						"event": "dotvi:attack_shuffle"
					}
				}
			}
		},
		"components": {
			"minecraft:experience_reward": {
				"on_death": 10
			},
			"minecraft:type_family": {
				"family": [
					"evocation_illager",
					"monster",
					"illager",
					"mob",
					"disciple",
					"cultist",
					"disciplevoli"
				]
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0
			},
			"minecraft:nameable": {},
			"minecraft:loot": {
				"table": "loot_tables/entities/fallan_alatar.json"
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:collision_box": {
				"width": 0.6,
				"height": 1.9
			},
			"minecraft:movement": {
				"value": 0.35
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": true,
				"can_pass_doors": true,
				"can_open_doors": true,
				"avoid_water": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:can_climb": {},
			"minecraft:behavior.float": {
				"priority": 0
			},
			"minecraft:behavior.send_event": {
				"priority": 3,
				"event_choices": [
					{
						"min_activation_range": 0,
						"max_activation_range": 16,
						"cooldown_time": 5,
						"cast_duration": 3,
						"particle_color": "#FFB38033",
						"weight": 3,
						"filters": {
							"all_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "sheep"
								},
								{
									"test": "is_color",
									"subject": "other",
									"value": "blue"
								}
							]
						},
						"start_sound_event": "cast.spell",
						"sequence": [
							{
								"base_delay": 2,
								"event": "wololo",
								"sound_event": "prepare.wololo"
							}
						]
					}
				]
			},
			"minecraft:behavior.random_stroll": {
				"priority": 8,
				"speed_multiplier": 0.6
			},
			"minecraft:behavior.nearest_attackable_target": {
				"priority": 2,
				"entity_types": [
					{
						"filters": {
							"any_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "player"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "snowgolem"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "irongolem"
								},
								{
									"test": "is_family",
									"subject": "other",
									"value": "wandering_trader"
								}
							]
						},
						"max_dist": 20
					},
					{
						"filters": {
							"all_of": [
								{
									"test": "is_family",
									"subject": "other",
									"value": "villager"
								},
								{
									"test": "has_component",
									"subject": "other",
									"operator": "!=",
									"value": "minecraft:is_baby"
								}
							]
						},
						"max_dist": 20
					}
				],
				"must_see": true
			},
			"minecraft:behavior.look_at_player": {
				"priority": 9,
				"look_distance": 3,
				"probability": 1
			},
			"minecraft:behavior.look_at_entity": {
				"priority": 10,
				"look_distance": 8,
				"filters": {
					"test": "is_family",
					"subject": "other",
					"value": "mob"
				}
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 1
			},
			"minecraft:persistent": {},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:follow_range": {
				"value": 64
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:knockback_resistance": {
				"value": 50
			},
			"minecraft:scale": {
				"value": 1.2
			},
			"minecraft:health": {
				"value": 1500
			},
			"minecraft:boss": {
				"name": "Alatar, Evoker of Envy",
				"hud_range": 5
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"cause": "entity_explosion",
						"deals_damage": false
					}
				]
			},
			"minecraft:behavior.avoid_mob_type": {
				"priority": 3,
				"entity_types": [
					{
						"filters": {
							"all_of": [
								{
									"test": "is_family",
									"value": "player",
									"operator": "equals"
								}
							]
						}
					}
				],
				"max_dist": 3,
				"sprint_speed_multiplier": 1.1
			},
			"minecraft:on_death": {
				"target": "self",
				"event": "dotvi:on_death"
			}
		},
		"events": {
			"minecraft:spawn_for_raid": {
				"add": {
					"component_groups": [
						"minecraft:raid_configuration"
					]
				}
			},
			"minecraft:start_celebrating": {
				"add": {
					"component_groups": [
						"minecraft:celebrate"
					]
				}
			},
			"minecraft:stop_celebrating": {
				"remove": {
					"component_groups": [
						"minecraft:celebrate"
					]
				}
			},
			"dotvi:on_death": {
				"run_command": {
					"command": [
						"function defeattriggers/discipleslain"
					]
				}
			},
			"dotvi:attack_shuffle": {
				"remove": {
					"component_groups": [
						"dotvi:melee_attack",
						"dotvi:magic_attack",
						"dotvi:roar_attack"
					]
				},
				"randomize": [
					{
						"weight": 1,
						"add": {
							"component_groups": [
								"dotvi:melee_attack"
							]
						}
					},
					{
						"weight": 5,
						"add": {
							"component_groups": [
								"dotvi:magic_attack"
							]
						}
					}
				]
			},
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": [
						"dotvi:melee_attack"
					]
				}
			}
		}
	}
}