{
  "format_version": "1.10.0",
  "animation_controllers": {
	"controller.animation.fly_ride": {
	  "states": {
		"default": {
		  "transitions": [
			{ 
			  "flying": "query.has_rider"
			}
		  ]
		},
		"flying": {
		  "animations": [
		    {"fly": "query.ground_speed < 4"},
		    {"fly2": "!query.is_on_ground && query.ground_speed > 4"}
		  ],
		  "transitions": [
			{
			  "default": "!query.has_rider"
			}
		  ],
		  "on_exit": [
		    "/event entity @s wesl3y:despawn"
		  ]
		}
	  }
	},
    "controller.animation.is_death": {
      "states": {
        "default": {
          "transitions": [
            {
              "moving": "query.is_alive"
            },
            {
              "no_moving": "!query.is_alive"
            }
          ]
        },
        "moving": {
          "transitions": [
            {
              "default": "!query.is_alive"
            }
          ],
          "on_entry": [
            "/tag @s add is_alive"
          ],
          "on_exit": [
            "/tag @s remove is_alive"
          ]
        },
        "no_moving": {
          "transitions": [
            {
              "default": "query.is_alive"
            }
          ],
          "on_entry": [
            "/tag @s remove is_alive",
            "/function remove_tag"
          ],
          "on_exit": [
            "/tag @s add is_alive"
          ]
        }
      }
    },
    "controller.animation.is_moving": {
      "states": {
        "default": {
          "transitions": [
            {
              "moving": "query.ground_speed > 0.1"
            },
            {
              "no_moving": "query.ground_speed < 0.1"
            }
          ]
        },
        "moving": {
          "transitions": [
            {
              "default": "query.ground_speed < 0.1"
            }
          ],
          "on_entry": [
            "/tag @s add is_moving"
          ],
          "on_exit": [
            "/tag @s remove is_moving"
          ]
        },
        "no_moving": {
          "transitions": [
            {
              "default": "query.ground_speed > 0.1"
            }
          ],
          "on_entry": [
            "/tag @s remove is_moving"
          ],
          "on_exit": [
            "/tag @s add is_moving"
          ]
        }
      }
    },
    "controller.animation.is_on_ground": {
      "states": {
        "default": {
          "transitions": [
            {
              "ground": "query.is_on_ground"
            },
            {
              "no_ground": "!query.is_on_ground"
            }
          ]
        },
        "ground": {
          "transitions": [
            {
              "default": "!query.is_on_ground"
            }
          ],
          "on_entry": [
            "/tag @s add ground",
            "/tag @s remove no_ground"
          ]
        },
        "no_ground": {
          "transitions": [
            {
              "default": "query.is_on_ground"
            }
          ],
          "on_entry": [
            "/tag @s add no_ground",
            "/tag @s remove ground"
          ]
        }
      }
    },
    "controller.animation.is_sneaking": {
      "states": {
        "default": {
          "transitions": [
            {
              "ground": "query.is_sneaking"
            },
            {
              "no_ground": "!query.is_sneaking"
            }
          ]
        },
        "ground": {
          "transitions": [
            {
              "default": "!query.is_sneaking"
            }
          ],
          "on_entry": [
            "/tag @s add is_sneaking"
          ]
        },
        "no_ground": {
          "transitions": [
            {
              "default": "query.is_sneaking"
            }
          ],
          "on_entry": [
            "/tag @s remove is_sneaking"
          ]
        }
      }
    },
    "controller.animation.is_sneaking_skill": {
      "states": {
        "default": {
          "transitions": [
            {
              "2skills": "query.equipped_item_any_tag('slot.weapon.mainhand','2skills') && q.is_sneaking"
            },
            {
              "3skills": "query.equipped_item_any_tag('slot.weapon.mainhand','3skills') && q.is_sneaking"
            },
            {
              "4skills": "query.equipped_item_any_tag('slot.weapon.mainhand','4skills') && q.is_sneaking"
            },
            {
              "5skills": "query.equipped_item_any_tag('slot.weapon.mainhand','5skills') && q.is_sneaking"
            },
            {
              "6skills": "query.equipped_item_any_tag('slot.weapon.mainhand','6skills') && q.is_sneaking"
            }
          ]
        },
        "2skills": {
          "animations": [
            "timer.0_5"
          ],
          "transitions": [
            {
              "default": "q.all_animations_finished"
            }
          ],
          "on_entry": [
            "/scoreboard players set @s[scores={wg:skill=1..}] wg:skill -1",
            "/scoreboard players add @s wg:skill 1"
          ]
        },
        "3skills": {
          "animations": [
            "timer.0_5"
          ],
          "transitions": [
            {
              "default": "q.all_animations_finished"
            }
          ],
          "on_entry": [
            "/scoreboard players set @s[tag=luffy,scores={wg:skill=1..}] wg:skill -1",
            "/scoreboard players set @s[tag=luffy_gear2,scores={wg:skill=1..}] wg:skill -1",
            "/scoreboard players set @s[scores={wg:skill=2..}] wg:skill -1",
            "/scoreboard players add @s wg:skill 1"
          ]
        },
        "4skills": {
          "animations": [
            "timer.0_5"
          ],
          "transitions": [
            {
              "default": "q.all_animations_finished"
            }
          ],
          "on_entry": [
            "/scoreboard players set @s[scores={wg:skill=3..}] wg:skill -1",
            "/scoreboard players add @s wg:skill 1"
          ]
        },
        "5skills": {
          "animations": [
            "timer.0_5"
          ],
          "transitions": [
            {
              "default": "q.all_animations_finished"
            }
          ],
          "on_entry": [
            "/scoreboard players set @s[scores={wg:skill=4..}] wg:skill -1",
            "/scoreboard players add @s wg:skill 1"
          ]
        },
        "6skills": {
          "animations": [
            "timer.0_5"
          ],
          "transitions": [
            {
              "default": "q.all_animations_finished"
            }
          ],
          "on_entry": [
            "/scoreboard players set @s[scores={wg:skill=5..}] wg:skill -1",
            "/scoreboard players add @s wg:skill 1"
          ]
        }
      }
    },
    "controller.animation.is_sprinting": {
      "states": {
        "default": {
          "transitions": [
            {
              "yamamoto": "q.is_sprinting && q.property('wesl3y:animes') == 3 && (q.property('wesl3y:characters') == 1 || q.property('wesl3y:characters') == 2)"
            }
          ]
        },
        "yamamoto": {
          "animations": ["timer.1_0"],
          "transitions": [
            {
              "default": "query.all_animations_finished"
            }
          ],
          "on_entry": [
            "/playanimation @s animation.sprint wesl3y",
            "/particle wesl3y:sprint ~~0.5~",
            "/tag @s add sprint",
            "/summon wesl3y:impulse ^^^-2 ~~ wesl3y:dash"
          ],
          "on_exit": [
            "/tag @s remove sprint"
          ]
        }
      }
    },
    "controller.animation.projetil": {
      "states": {
        "default": {
          "transitions": [
            {
              "a": "(1.0)"
            }
          ]
        },
        "a": {
          "transitions": [
            {
              "default": "(1.0)"
            }
          ],
          "on_entry": [
            "/execute unless block ~~~ air run event entity @s wesl3y:explode"
          ]
        }
      }
    }
  }
}