{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "dungeon:boss_spider",
      "runtime_identifier": "minecraft:spider",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "animations": {
        "action_common": "controller.animation.boss_common_actions",
        "action_specific": "controller.animation.boss_spider_actions"
      },
      "scripts": {
        "animate": [
          "action_common",
          "action_specific"
        ]
      }
    },
    "component_groups": {
      "dungeon:normal": {
        "minecraft:variant": {
          "value": 0
        },
        "minecraft:timer": {
          "looping": false,
          "time": [
            1,
            3
          ],
          "randomInterval": true,
          "time_down_event": {
            "event": "dungeon:special_action",
            "target": "self"
          }
        }
      },
      "dungeon:special_attack1": {
        "minecraft:variant": {
          "value": 1
        },
        "minecraft:behavior.summon_entity": {
          "priority": 2,
  
          "summon_choices": [
            {
              "min_activation_range": 0.0,
              "max_activation_range": 32.0,
              "cooldown_time": 3.0,
              "weight": 3,
              "cast_duration": 0.5,
              "particle_color": "#62d64259",
              "start_sound_event": "cast.spell",
              "sequence": [
                {
                  "shape": "circle",
                  "target": "self",
                  "base_delay": 0,
                  "delay_per_summon": 0.5,
                  "num_entities_spawned": 3,
                  "entity_type": "minecraft:spider",
                  "size": 1,
                  "entity_lifespan": -1
                }
              ]
            }
          ]
        },
        "minecraft:damage_sensor": {
          "triggers": [
            {
              "on_damage": {
                "filters": {
                  "test": "has_damage",
                  "subject": "self",
                  "value": "attack"
                }
              },
              "deals_damage": false
            }
          ]
        }
      },
      "dungeon:special_attack2": {
        "minecraft:variant": {
          "value": 2
        },
        "minecraft:mob_effect": {
          "effect_range": 5,
          "effect_time": 3,
          "mob_effect": "fatal_poison",
          "entity_filter": {
            "any_of": [
              { "test": "is_family", "subject": "other", "value": "player" }
            ]
          }
        },
        "minecraft:behavior.knockback_roar": {
          "priority": 3,
          "attack_time": 1,
          "cooldown_time": 0,
          "duration": 3,
          "knockback_damage": 1,
          "knockback_range": 16,
          "knockback_strength": 2
        }
      },
      "dungeon:special_attack3": {
        "minecraft:variant": {
          "value": 3
        },
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "invisibility",
              "duration": 5,
              "display_on_screen_animation": true
            }
          ]
        }
      },
      "dungeon:ability_timer": {
        "minecraft:timer": {
          "looping": false,
          "time": [
            4,
            4
          ],
          "randomInterval": false,
          "time_down_event": {
            "event": "dungeon:reset",
            "target": "self"
          }
        }
      }
    },
    "components": {
      "minecraft:type_family": {
        "family": [
          "spider",
          "monster",
          "mob",
          "arthropod"
        ]
      },
      "minecraft:timer": {
        "looping": false,
        "time": [
          1,
          4
        ],
        "randomInterval": true,
        "time_down_event": {
          "event": "dungeon:special_action",
          "target": "self"
        }
      },
      "minecraft:loot": {
        "table": "loot_tables/entities/epic.json"
      },
      "minecraft:collision_box": {
        "width": 1.4,
        "height": 0.9
      },
      "minecraft:health": {
        "value": 400,
        "max": 400
      },
      "minecraft:fire_immune": true,
      "minecraft:movement": {
        "value": 0.3
      },
      "minecraft:knockback_resistance": {
        "value": 100,
        "max": 100
      },
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "fall",
          "deals_damage": false
        }
      },
      "minecraft:navigation.climb": {
        "can_path_over_water": true
      },
      "minecraft:movement.basic": {},
      "minecraft:jump.static": {},
      "minecraft:can_climb": {},
      "minecraft:attack": {
        "damage": 8
      },
      "minecraft:behavior.float": {
        "priority": 1
      },
      "minecraft:behavior.mount_pathing": {
        "priority": 5,
        "speed_multiplier": 1.25,
        "target_dist": 0.0,
        "track_target": true
      },
      "minecraft:behavior.look_at_player": {
        "priority": 6,
        "look_distance": 30.0,
        "probability": 1
      },
      "minecraft:behavior.leap_at_target": {
        "priority": 3,
        "yd": 4.0,
        "must_be_on_ground": false
      },
      "minecraft:behavior.melee_attack": {
        "priority": 4,
        "speed_multiplier": 0.75,
        "track_target": true,
        "reach_multiplier": 0.8
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 2,
        "within_radius": 40,
        "reselect_targets": true,
        "must_see_forget_duration": 100.0,
        "entity_types": [
          {
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "player"
                }
              ]
            },
            "max_dist": 35
          }
        ],
        "must_see": false
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1
      },
      "minecraft:physics": {},
      "minecraft:scale": {
        "value": 2
      },
      "minecraft:boss": {
        "name": "The Spider Queen",
        "hud_range": 30
      }
    },
    "events": {
      "dungeon:special_action": {
        "remove": {
          "component_groups": [
            "dungeon:normal"
          ]
        },
        "randomize": [
          {
            "add": {
              "component_groups": [
                "dungeon:special_attack1"
              ]
            }
          },
          {
            "add": {
              "component_groups": [
                "dungeon:special_attack2"
              ]
            }
          },
          {
            "add": {
              "component_groups": [
                "dungeon:special_attack3"
              ]
            }
          }
        ]
      },
      "dungeon:reset": {
        "remove": {
          "component_groups": [
            "dungeon:ability_timer",
            "dungeon:special_attack1",
            "dungeon:special_attack2",
            "dungeon:special_attack3"
          ]
        },
        "add": {
          "component_groups": [
            "dungeon:normal"
          ]
        }
      },
      "dungeon:start_timer": {
        "add": {
          "component_groups": [
            "dungeon:ability_timer"
          ]
        }
      }
    }
  }
}