{
  "format_version": "1.18.20",
  "minecraft:entity": {
    "description": {
      "identifier": "hoh_bht:boss_skeleton",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "animations": {
        "thunder": "animation.hoh_bht.thunder"
      },
      "scripts": {
        "animate": [
          "thunder"
        ]
      }
    },
    "component_groups": {
      "in_powder_snow": {
        "minecraft:is_shaking": {},
        "minecraft:timer": {
          "looping": false,
          "time": 20
        },
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "test": "in_block",
                "subject": "self",
                "operator": "!=",
                "value": "minecraft:powder_snow"
              },
              "event": "got_out_of_powder_snow"
            }
          ]
        }
      },
      "got_out_of_powder_snow_environment_sensor": {
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "all_of": [
                  {
                    "test": "in_water",
                    "subject": "self",
                    "operator": "==",
                    "value": false
                  },
                  {
                    "test": "has_ranged_weapon",
                    "subject": "self",
                    "operator": "==",
                    "value": true
                  }
                ]
              },
              "event": "minecraft:ranged_mode"
            }
          ]
        }
      },
      "minecraft:lightning_immune": {
        "minecraft:damage_sensor": {
          "triggers": {
            "on_damage": {
              "filters": {
                "other_with_families": "lightning"
              }
            },
            "deals_damage": false
          }
        }
      },
      "minecraft:ranged_attack": {
        "minecraft:behavior.ranged_attack": {
          "priority": 0,
          "attack_radius": 50,
          "attack_interval_min": 1.8,
          "attack_interval_max": 4
        },
        "minecraft:follow_range": {
          "value": 64,
          "max": 64
        },
        "minecraft:behavior.nearest_attackable_target": {
          "priority": 1,
          "must_see": true,
          "reselect_targets": true,
          "within_radius": 64,
          "entity_types": [
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "player"
              },
              "max_dist": 64
            },
            {
              "filters": {
                "test": "is_family",
                "subject": "other",
                "value": "wolf"
              },
              "max_dist": 64
            }
          ]
        },
        "minecraft:behavior.random_look_around": {
          "priority": 2
        },
        "minecraft:environment_sensor": {
          "triggers": [
            {
              "filters": {
                "test": "in_block",
                "subject": "self",
                "operator": "==",
                "value": "minecraft:powder_snow"
              },
              "event": "got_in_powder_snow"
            }
          ]
        },
        "minecraft:equip_item": {},
        "minecraft:collision_box": {
          "width": 0.6,
          "height": 1.9
        },
        "minecraft:type_family": {
          "family": [
            "skeleton",
            "undead",
            "monster",
            "mob"
          ]
        },
        "minecraft:breathable": {
          "total_supply": 9999,
          "suffocate_time": 0,
          "breathes_water": true
        },
        "minecraft:health": {
          "value": 80,
          "max": 80
        },
        "minecraft:hurt_on_condition": {
          "damage_conditions": [
            {
              "filters": {
                "test": "in_lava",
                "subject": "self",
                "operator": "==",
                "value": true
              },
              "cause": "lava",
              "damage_per_tick": 4
            }
          ]
        },
        "minecraft:loot": {
          "table": "loot_tables/entities/skeleton.json"
        },
        "minecraft:movement": {
          "value": 0.25
        },
        "minecraft:navigation.walk": {
          "is_amphibious": true,
          "avoid_sun": false,
          "avoid_water": true
        },
        "minecraft:movement.basic": {},
        "minecraft:jump.static": {},
        "minecraft:can_climb": {},
        "minecraft:equipment": {
          "table": "loot_tables/HoH/bht/entities/boss_skeleton_gear.json"
        },
        "minecraft:shooter": {
          "def": "minecraft:arrow"
        },
        "minecraft:persistent": {},
        "minecraft:physics": {},
        "minecraft:pushable": {
          "is_pushable": true,
          "is_pushable_by_piston": true
        },
        "minecraft:conditional_bandwidth_optimization": {}
      }
    },
    "components": {
      "minecraft:boss": {
        "hud_range": 64,
        "name": "entity.hoh_bht:boss_skeleton.name",
        "should_darken_sky": false
      },
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0"
      },
      "minecraft:is_charged": {}
    },
    "events": {
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "minecraft:ranged_attack"
          ]
        }
      },
      "minecraft:ranged_mode": {
        "remove": {
          "component_groups": [
            "minecraft:melee_attack",
            "got_out_of_powder_snow_environment_sensor"
          ]
        },
        "add": {
          "component_groups": [
            "minecraft:ranged_attack"
          ]
        }
      },
      "got_in_powder_snow": {
        "add": {
          "component_groups": [
            "in_powder_snow"
          ]
        }
      },
      "got_out_of_powder_snow": {
        "remove": {
          "component_groups": [
            "in_powder_snow"
          ]
        },
        "add": {
          "component_groups": [
            "got_out_of_powder_snow_environment_sensor"
          ]
        }
      },
      "minecraft:spring_trap": {
        "add": {
          "component_groups": [
            "minecraft:lightning_immune"
          ]
        }
      }
    }
  }
}