{
  "format_version": "1.10.0",
  "animation_controllers": {
    "controller.animation.luffy": {
      "states": {
        "default": {
          "transitions": [
            { "gatling": "q.get_equipped_item_name=='luffy_skills' && q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 1 && query.scoreboard('wg:skill') == 0 && query.scoreboard('wg:cooldown') == 0 && q.is_using_item" },
            { "giant_pistol": "q.get_equipped_item_name=='luffy_skills' && q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 1 && query.scoreboard('wg:skill') == 1 && query.scoreboard('wg:cooldown2') == 0 && q.is_using_item" },
            { "jet_gatling": "q.get_equipped_item_name=='luffy_skills' && q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 2 && query.scoreboard('wg:skill') == 0 && query.scoreboard('wg:cooldown') == 0 && q.is_using_item" },
            { "red_hawk": "q.get_equipped_item_name=='luffy_skills' && q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 2 && query.scoreboard('wg:skill') == 1 && query.scoreboard('wg:cooldown2') == 0 && q.is_using_item" },
            { "giant_kick": "q.get_equipped_item_name=='luffy_skills' && q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 3 && query.scoreboard('wg:skill') == 0 && query.scoreboard('wg:cooldown') == 0 && q.is_using_item" },
            { "kaminari": "q.get_equipped_item_name=='luffy_skills' && q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 3 && query.scoreboard('wg:skill') == 1 && query.scoreboard('wg:cooldown2') == 0 && q.is_using_item" },
            { "bajrang_gun": "q.get_equipped_item_name=='luffy_skills' && q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 3 && query.scoreboard('wg:skill') == 2 && query.scoreboard('wg:cooldown3') == 0 && q.is_using_item" },
            { "attack1": "q.get_equipped_item_name=='luffy_skills' && q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') <= 3 && v.attack_time > 0.0" }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill0",
            "/inputpermission set @s movement enabled",
            "/tag @s remove skill_distance"
          ]
        },
        "attack1": {
          "animations": ["timer.0_5"],
          "transitions": [
            { "default": "q.get_equipped_item_name!='luffy_skills'" },
            { "attack2": "v.attack_time > 0.0 && q.any_animation_finished" },
            { "attack1_2": "query.any_animation_finished" }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill1",
            "/execute at @s[tag=luffy] positioned ^^1^1.5 as @s at @e[c=1,r=1.5,tag=!luffy,type=!item,type=!xp_orb] run function one_piece/luffy/hit",
            "/execute at @s[tag=luffy_gear2] positioned ^^1^1.5 as @s at @e[c=1,r=1.5,tag=!luffy_gear2,type=!item,type=!xp_orb] run function one_piece/luffy/hit",
            "/execute at @s[tag=luffy_gear5] positioned ^^1^1.5 as @s at @e[c=1,r=1.5,tag=!luffy_gear5,type=!item,type=!xp_orb] run function one_piece/luffy/hit"
          ]
        },
        "attack1_2": {
          "animations": ["timer.0_1"],
          "transitions": [
            { "attack2": "v.attack_time > 0.0" },
            { "default": "query.any_animation_finished" }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill0"
          ]
        },
        "attack2": {
          "animations": ["timer.0_5"],
          "transitions": [
            { "default": "q.get_equipped_item_name!='luffy_skills'" },
            { "bazooka": "v.attack_time > 0.0 && (q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 1) && query.any_animation_finished" },
            { "jet_bazooka": "v.attack_time > 0.0 && (q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 2) && query.any_animation_finished" },
            { "giant_punch": "v.attack_time > 0.0 && (q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 3) && query.any_animation_finished" },
            { "attack2_2": "query.any_animation_finished" }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill2",
            "/execute at @s[tag=luffy] positioned ^^1^1.5 as @s at @e[c=1,r=1.5,tag=!luffy,type=!item,type=!xp_orb] run function one_piece/luffy/hit",
            "/execute at @s[tag=luffy_gear2] positioned ^^1^1.5 as @s at @e[c=1,r=1.5,tag=!luffy_gear2,type=!item,type=!xp_orb] run function one_piece/luffy/hit",
            "/execute at @s[tag=luffy_gear5] positioned ^^1^1.5 as @s at @e[c=1,r=1.5,tag=!luffy_gear5,type=!item,type=!xp_orb] run function one_piece/luffy/hit"
          ]
        },
        "attack2_2": {
          "animations": ["timer.0_1"],
          "transitions": [
            { "bazooka": "v.attack_time > 0.0 && (q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 1)" },
            { "jet_bazooka": "v.attack_time > 0.0 && (q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 2)" },
            { "giant_punch": "v.attack_time > 0.0 && (q.property('wesl3y:animes') == 9 && q.property('wesl3y:characters') == 3)" },
            { "default": "query.any_animation_finished" }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill0"
          ]
        },
        "bazooka": {
          "animations": ["luffy.bazooka"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill3"
          ]
        },
        "gatling": {
          "animations": ["luffy.gatling"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill4"
          ],
          "on_exit": [
            "/tag @s remove luffy_gatling",
            "/scoreboard players set @s wg:cooldown 25"
          ]
        },
        "giant_pistol": {
          "animations": ["luffy.giant_pistol"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill5"
          ],
          "on_exit": [
            "/scoreboard players set @s wg:cooldown2 30"
          ]
        },
        "jet_bazooka": {
          "animations": ["luffy_gear2.jet_bazooka"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill3"
          ]
        },
        "jet_gatling": {
          "animations": ["luffy_gear2.jet_gatling"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill4"
          ],
          "on_exit": [
            "/tag @s remove luffy_gear2_gatling",
            "/scoreboard players set @s wg:cooldown 30"
          ]
        },
        "red_hawk": {
          "animations": ["luffy_gear2.red_hawk"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill5"
          ],
          "on_exit": [
            "/scoreboard players set @s wg:cooldown2 35"
          ]
        },
        "giant_punch": {
          "animations": ["luffy_gear5.giant_pistol"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill3"
          ]
        },
        "giant_kick": {
          "animations": ["luffy_gear5.giant_kick"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill4"
          ],
          "on_exit": [
            "/scoreboard players set @s wg:cooldown 35"
          ]
        },
        "kaminari": {
          "animations": ["luffy_gear5.kaminari"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.any_animation_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill5"
          ],
          "on_exit": [
            "/scoreboard players set @s wg:cooldown2 40"
          ]
        },
        "bajrang_gun": {
          "animations": ["luffy_gear5.bajrang_gun"],
          "transitions": [
            {
              "default": "q.get_equipped_item_name!='luffy_skills'"
            },
            {
              "default": "query.all_animations_finished"
            }
          ],
          "on_entry": [
            "/event entity @s wesl3y:skill6"
          ],
          "on_exit": [
            "/scoreboard players set @s wg:cooldown3 45"
          ]
        }
      }
    }
  }
}