{
  "format_version": "1.10.0",
  "animation_controllers": {
    "controller.animation.entity.elite_illager.ct": {
      "states": {
        "default": {
          "transitions": [
            {
              "attack": "q.property('attack:state') == 'basic1' && q.scoreboard('stun') == 0 && q.scoreboard('has_skill') == 0"
            }
             ],
          "on_entry": [
            "/tag @s remove cantBlock",
            "/tag @s remove stunImmune",
            "/event entity @s[scores={stun=0}] cooldownAttack",
            "/scoreboard players set @s[scores={basic_attack=4..}] basic_attack 0"
            ],
          "on_exit": [
              "/scoreboard players add @s basic_attack 1"
              ]
        },
        "attack": {
          "transitions": [
            {
              "default": "q.scoreboard('stun') > 0"
            },
            {
              "basic2": "q.any_animation_finished"
            }
            ],
            "animations": [
              "elite_illager.basic1"
              ],
            "on_entry": [
              "/tag @s add cantBlock",
              "/scoreboard players set @s block 0",
              "/event entity @s[scores={stun=0}] movement:walk",
              "/scoreboard players set @s ba_attacking 1",
              "/tag @s add basicAttack",
              "/scoreboard players set @s ba_reset 40",
              "/playanimation @s animation.elite_illager.basic1"
              ],
            "on_exit": [
              "/scoreboard players set @s ba_attacking 0",
              "/tag @s remove basicAttack"
              ]
        },
        "basic2": {
          "transitions": [
            {
              "default": "q.scoreboard('stun') > 0"
            },
            {
              "basic3": "q.any_animation_finished"
            }
            ],
            "animations": [
              "elite_illager.basic2"
              ],
            "on_entry": [
              "/event entity @s attack_state:basic2",
              "/scoreboard players set @s ba_attacking 1",
              "/tag @s add basicAttack",
              "/scoreboard players set @s ba_reset 40",
              "/playanimation @s animation.elite_illager.basic2"
              ],
            "on_exit": [
              "/scoreboard players set @s ba_attacking 0",
              "/tag @s remove basicAttack"
              ]
        },
        "basic3": {
          "transitions": [
            {
              "default": "q.scoreboard('stun') > 0"
            },
            {
              "basic4": "q.any_animation_finished"
            }
            ],
            "animations": [
              "elite_illager.basic3"
              ],
            "on_entry": [
              "/event entity @s attack_state:basic3",
              "/scoreboard players set @s ba_attacking 1",
              "/tag @s add basicAttack",
              "/scoreboard players set @s ba_reset 40",
              "/playanimation @s animation.elite_illager.basic3"
              ],
            "on_exit": [
              "/scoreboard players set @s ba_attacking 0",
              "/tag @s remove basicAttack"
              ]
        },
        "basic4": {
          "transitions": [
            {
              "default": "q.scoreboard('stun') > 0 || q.any_animation_finished"
            }
            ],
            "animations": [
              "elite_illager.basic4"
              ],
            "on_entry": [
              "/event entity @s attack_state:basic4",
              "/scoreboard players set @s ba_attacking 1",
              "/tag @s add basicAttack",
              "/scoreboard players set @s ba_reset 40",
              "/playanimation @s animation.elite_illager.basic4"
              ],
            "on_exit": [
              "/scoreboard players set @s ba_attacking 0",
              "/tag @s remove basicAttack"
              ]
        }
      }
    },
    "controller.animation.entity.elite_illager.charged_attack": {
      "states": {
        "default": {
          "transitions": [
            {
              "attack": "q.property('attack:state') == 'charged' && q.scoreboard('stun') == 0 && q.scoreboard('has_skill') == 0"
            }
             ],
          "on_entry": [
            "/tag @s remove cantBlock",
            "/event entity @s[scores={stun=0}] cooldownAttack"
            ]
        },
        "attack": {
          "transitions": [
            {
              "default": "q.scoreboard('stun') > 0 || q.any_animation_finished"
            }
            ],
            "animations": [
              "elite_illager.charged_attack"
              ],
            "on_entry": [
              "/tag @s add cantBlock",
              "@s movement:stop",
              "/event entity @s attack_state:charged",
              "/scoreboard players set @s has_skill 1",
              "/tag @s add hasSkill",
              "/playanimation @s animation.elite_illager.charged_attack"
              ],
            "on_exit": [
              "/event entity @s attack_state:idle",
              "/event entity @s[scores={stun=0}] movement:walk",
              "/scoreboard players set @s has_skill 0",
              "/tag @s remove hasSkill"
              ]
        }
      }
    },
    "controller.animation.entity.elite_illager.skill_attack": {
      "states": {
        "default": {
          "transitions": [
            {
              "attack": "q.property('attack:state') == 'skill' && q.scoreboard('stun') == 0 && q.scoreboard('has_skill') == 0"
            }
             ],
          "on_entry": [
            "/tag @s remove cantBlock",
            "/event entity @s[scores={stun=0}] cooldownAttack"
            ]
        },
        "attack": {
          "transitions": [
            {
              "default": "q.scoreboard('stun') > 0 || q.any_animation_finished"
            }
            ],
            "animations": [
              "elite_illager.skill_attack"
              ],
            "on_entry": [
              "/tag @s add cantBlock",
              "@s movement:stop",
              "/event entity @s attack_state:skill",
              "/scoreboard players set @s has_skill 1",
              "/tag @s add hasSkill",
              "/playanimation @s animation.elite_illager.skill_attack"
              ],
            "on_exit": [
              "/event entity @s attack_state:idle",
              "/event entity @s[scores={stun=0}] movement:walk",
              "/scoreboard players set @s has_skill 0",
              "/tag @s remove hasSkill"
              ]
        }
      }
    }
  }
}