{
  "format_version": "1.13.0",
  "minecraft:entity": {
    "description": {
      "identifier": "add:infernal_skeleton2",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false,
      "scripts": {
        "animate": [
          "escudo"
        ]
      },
      "animations": {
        "escudo": "controller.animation.escudo"
      }
    },
    "component_groups": {
      "minecraft:power3": {
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "invisibility",
              "amplifier": 1,
              "visible": true,
              "ambient": false,
              "duration": 999999
            }
          ]
        },
        "minecraft:damage_sensor": {
          "triggers": [
            {
              "on_damage": {
                "filters": {
                  "any_of": [
                    {"test": "has_component", "subject": "other", "value": "looting"}
                  ]
                },
                "event": "minecraft:robarpoder3",
                "target": "self"
              }
            }
          ]
        }
      },
      "minecraft:robar3": {
        "minecraft:damage_sensor": {
          "triggers": [
            {
              "on_damage": {
                "filters": {
                  "any_of": [
                    {"test": "has_component", "subject": "other", "value": "looting"}
                  ]
                },
                "event": "minecraft:robarpoder3",
                "target": "other"
              }
            }
          ]
        }
      },
      "minecraft:power1": {
        "minecraft:damage_sensor": {
          "triggers": [
            {
              "on_damage": {
                "filters": {
                  "any_of": [
                    {"test": "has_component", "subject": "other", "value": "looting"}
                  ]
                },
                "event": "minecraft:robarpoder1",
                "target": "self"
              }
            }
          ]
        }
      },
      "minecraft:robar1": {
        "minecraft:damage_sensor": {
          "triggers": [
            {
              "on_damage": {
                "filters": {
                  "any_of": [
                    {"test": "has_component", "subject": "other", "value": "looting"}
                  ]
                },
                "event": "minecraft:robarpoder1",
                "target": "other"
              }
            }
          ]
        }
      },
      "minecraft:sinpoder": {       
        "minecraft:spell_effects": {
          "remove_effects": [
            "speed",
            "regeneration",
            "invisibility"
          ]
        }
      },
      "minecraft:skeleton3": {
        "minecraft:timer": {
	       "looping": false,
	       "random_interval": false,
		    "time": 20.0,
		    "time_down_event": {
		      "event": "minecraft:power3"
          }
        },
        "minecraft:behavior.ranged_attack": {
          "attack_interval_min": 1,
          "attack_interval_max": 1,
          "attack_radius": 15
        },
        "minecraft:movement": {
          "value": 0.30
        },
        "minecraft:boss": {
          "should_darken_sky": false,
          "name": "§c精英骷髅",
          "hud_range": 4
        },
        "minecraft:health": {
          "value": 180,
          "max": 200
        },
        "minecraft:attack": {
          "damage": 5,
          "effect_name": "blindness",
          "effect_duration": 5
        },
        "minecraft:shooter": {
          "type": "Arrow",
          "def": "minecraft:arrow"
        }
      },
      "minecraft:skeleton2": {
        "minecraft:timer": {
	       "looping": false,
	       "random_interval": false,
		    "time": 20.0,
		    "time_down_event": {
		      "event": "minecraft:power3"
          }
        },
        "minecraft:behavior.ranged_attack": {
          "attack_interval_min": 1,
          "attack_interval_max": 2,
          "attack_radius": 18
        },
        "minecraft:spell_effects": {
          "add_effects": [
            {
              "effect": "regeneration",
              "amplifier": 1,
              "visible": true,
              "ambient": false,
              "duration": 999999
            }
          ]
        },
        "minecraft:health": {
          "value": 175,
          "max": 180
        },
        "minecraft:attack": {
          "damage": 5,
          "effect_name": "weakness",
          "effect_duration": 3
        },
        "minecraft:boss": {
          "should_darken_sky": false,
          "name": "§c精英骷髅",
          "hud_range": 3
        },
        "minecraft:shooter": {
          "type": "Arrow",
          "def": "add:infernal_arrow2"
        }
      },
      "minecraft:escudo": {
        "minecraft:is_saddled": {
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "filters": {
              "test": "is_brightness",
              "operator": "<",
              "value": 0.49
            },
            "event": "minecraft:sinescudo"
          }
        }
      },
      "minecraft:sinescudo": {
        "minecraft:environment_sensor": {
          "triggers": {
            "filters": {
              "test": "is_brightness",
              "operator": ">",
              "value": 0.49
            },
            "event": "minecraft:escudo"
          }
        }
      },
      "minecraft:lightning_immune": {
        "minecraft:damage_sensor": {
          "triggers": {
            "on_damage": { "filters": { "other_with_families": "lightning" } },
            "deals_damage": false
          }
        }
      },
      "minecraft:ranged_attack": {
        "minecraft:behavior.ranged_attack": {
          "attack_interval_min": 1,
          "attack_interval_max": 2,
          "attack_radius": 15
        },
        "minecraft:shooter": {
          "type": "Arrow",
          "def": "add:infernal_arrow2"
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "filters": {
              "test": "is_underwater",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "event": "minecraft:melee_mode"
          }
        }
      },
      "minecraft:melee_attack": {
        "minecraft:behavior.melee_attack": {
          "priority": 4,
          "target_dist": 1.2,
          "speed_multiplier": 1.25,
          "track_target": true
        },
        "minecraft:attack": {
          "damage": 5,
          "effect_name": "poison",
          "effect_duration": 2
        },
        "minecraft:environment_sensor": {
          "triggers": {
            "filters": {
              "test": "in_water",
              "subject": "self",
              "operator": "==",
              "value": false
            },
            "event": "minecraft:ranged_mode"
          }
        }
      }
    },

    "components": {
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(90,3)) : 0"
      },
      "minecraft:spell_effects": {
        "add_effects": [
          {
            "effect": "resistance",
            "amplifier": 1,
            "visible": false,
            "ambient": false,
            "duration": 999999
          }
        ]
      },
      "minecraft:collision_box": {
        "width": 0.6,
        "height": 1.9
      },
      "minecraft:type_family": {
        "family": [ "skeleton", "undead", "monster", "mob" ]
      },
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0,
        "breathes_water": true
      },
      "minecraft:health": {
        "value": 55,
        "max": 60
      },
      "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/iskeleton.json"
      },
      "minecraft:movement": {
        "value": 0.25
      },
      "minecraft:navigation.walk": {
        "is_amphibious": true,
        "avoid_sun": true,
        "avoid_water": true
      },
      "minecraft:movement.basic": {
      },
      "minecraft:boss": {
        "should_darken_sky": false,
        "name": "§c精英骷髅",
        "hud_range": 3
      },
      "minecraft:jump.static": {
      },
      "minecraft:can_climb": {
      },
      "minecraft:nameable": {
      },
      "minecraft:equipment": {
        "table": "loot_tables/entities/skeleton_gear.json"
      },
      "minecraft:shooter": {
        "type": "Arrow",
        "def": "add:infernal_arrow2"
      },
      "minecraft:environment_sensor": {
        "triggers": {
          "filters": {
            "test": "is_underwater",
            "subject": "self",
            "operator": "==",
            "value": true
          },
          "event": "minecraft:melee_mode"
        }
      },
      "minecraft:behavior.ranged_attack": {
        "attack_interval_min": 1,
        "attack_interval_max": 3,
        "attack_radius": 15
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 1
      },
      "minecraft:behavior.nearest_attackable_target": {
        "priority": 2,
        "reselect_targets": true,
        "entity_types": [
          {
            "filters": {
              "test": "is_family",
              "subject": "other",
              "value": "player"
            },
            "max_dist": 16
          },
          {
            "filters": {
              "test": "is_family",
              "subject": "other",
              "value": "irongolem"
            },
            "max_dist": 16
          },
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "baby_turtle"
                },
                {
                  "test": "in_water",
                  "subject": "other",
                  "operator": "!=",
                  "value": true
                }
              ]
            },
            "max_dist": 16
          }
        ],
        "must_see": true
      },
      "minecraft:behavior.flee_sun": {
        "priority": 2,
        "speed_multiplier": 1
      },
      "minecraft:behavior.avoid_mob_type": {
        "priority": 4,
        "entity_types": [
          {
            "filters": {
              "test": "is_family",
              "subject": "other",
              "value": "wolf"
            },
            "max_dist": 6,
            "walk_speed_multiplier": 1.2,
            "sprint_speed_multiplier": 1.2
          }
        ]
      },
      "minecraft:behavior.random_stroll": {
        "priority": 5,
        "speed_multiplier": 1
      },
      "minecraft:behavior.look_at_player": {
        "priority": 6,
        "look_distance": 8
      },
      "minecraft:behavior.random_look_around": {
        "priority": 6
      },
      "minecraft:physics": {
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      }
    },

    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 280,
            "remove": {},
            "add": {
              "component_groups": [
                "minecraft:ranged_attack",
                "minecraft:escudo",
                "minecraft:power1"
              ]
            }
          },
          {
            "weight": 140,
            "remove": {
            },
            "add": {
              "component_groups": [
                "minecraft:skeleton2",
                "minecraft:ranged_attack",
                "minecraft:escudo"
              ]

            }
          },
          {
            "weight": 80,
            "remove": {
            },
            "add": {
              "component_groups": [
                "minecraft:skeleton3",
                "minecraft:ranged_attack",
                "minecraft:escudo"
              ]
            }
          }
        ]
      },
      "minecraft:power3": {
        "add": {
          "component_groups": [
            "minecraft:power3"
          ]
        }
      },
      "minecraft:robarpoder1": {
        "add": {
          "component_groups": [
            "minecraft:robar1",
            "minecraft:sinpoder"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:power1"
          ]
        }
      },
      "minecraft:robarpoder3": {
        "add": {
          "component_groups": [
            "minecraft:robar3",
            "minecraft:sinpoder"
          ]
        },
        "remove": {
          "component_groups": [
            "minecraft:power3"
          ]
        }
      },
      "minecraft:spring_trap": {
        "add": { "component_groups": [ "minecraft:lightning_immune" ] }
      },

      "minecraft:melee_mode": {
        "remove": { "component_groups": [ "minecraft:ranged_attack" ] },
        "add": { "component_groups": [ "minecraft:melee_attack" ] }
      },
      "minecraft:ranged_mode": {
        "remove": { "component_groups": [ "minecraft:melee_attack" ] },
        "add": { "component_groups": [ "minecraft:ranged_attack" ] }
      },
      "minecraft:escudo": {
        "remove": { "component_groups": [ "minecraft:sinescudo" ] },
        "add": { "component_groups": [ "minecraft:escudo" ] }
      },
      "minecraft:skeletonl2": {
        "add": { "component_groups": [ "minecraft:skeleton2" ] }
      },
      "minecraft:skeletonl3": {
        "add": { "component_groups": [ "minecraft:skeleton3" ] }
      },
      "minecraft:sinescudo": {
        "remove": { "component_groups": [ "minecraft:escudo" ] },
        "add": { "component_groups": [ "minecraft:sinescudo" ] }
      }
    }
  }
}
