{
  "format_version": "1.10.0",
  "animation_controllers": {
    "controller.animation.silverlabs_nat.bird.landing_check": {
      "initial_state": "default",
      "states": {
        "default": {
          "on_entry": [
            "v.switch_chance = 200;"
          ],
          "transitions": [
            {
              "walking": "query.property('silverlabs_nat:movement_mode') == 'walk'"
            },
            {
              "flying": "query.property('silverlabs_nat:movement_mode') == 'fly'"
            }
          ]
        },
        "walking": {
          "on_entry": [
            "v.switch_delay = query.life_time + Math.random_integer(5, 10);"
          ],
          "transitions": [
            {
              "start_flying": "!q.is_baby && (Math.random_integer(0, (v.switch_chance ?? 1)) == (v.switch_chance ?? 1) && (query.life_time > (v.switch_delay ?? 0))) && !query.property('silverlabs_nat:is_tempted') && !q.is_sitting && !q.is_in_love"
            },
            {
              "flying": "query.property('silverlabs_nat:movement_mode') == 'fly'"
            }
          ]
        },
        "start_flying": {
          "on_entry": [
            "@s silverlabs_nat:bird_set_flying_mode"
          ],
          "transitions": [
            {
              "flying": "query.property('silverlabs_nat:movement_mode') == 'fly'"
            }
          ]
        },
        "flying": {
          "on_entry": [
            "v.switch_delay = query.life_time + Math.random_integer(5, 10);"
          ],
          "transitions": [
            {
              "landing_check": "q.is_baby || (Math.random_integer(0, (v.switch_chance ?? 1)) == (v.switch_chance ?? 1) && (query.life_time > (v.switch_delay ?? 0)) && !q.has_target) || query.property('silverlabs_nat:is_tempted') || q.is_sitting || q.is_in_love"
            },
            {
              "walking": "query.property('silverlabs_nat:movement_mode') == 'walk'"
            }
          ]
        },
        "landing_check": {
          "on_entry": [
            "/scriptevent silverlabs_nat:bird_landing_check"
          ],
          "transitions": [
            {
              "default": "1"
            }
          ]
        }
      }
    },
    "controller.animation.silverlabs_nat.bird.tempt_check": {
      "initial_state": "default",
      "states": {
        "default": {
          "on_entry": [
            "@s silverlabs_nat:not_tempted"
          ],
          "transitions": [
            {
              "tempted": "q.is_interested"
            }
          ]
        },
        "tempted": {
          "on_entry": [
            "@s silverlabs_nat:is_tempted"
          ],
          "transitions": [
            {
              "default": "!q.is_interested"
            }
          ]
        }
      }
    },
    "controller.animation.silverlabs_nat.bird.smooth_landing": {
      "initial_state": "default",
      "states": {
        "default": {
          "transitions": [
            {
              "tempted": "!q.is_on_ground"
            }
          ]
        },
        "tempted": {
          "on_entry": [
            "/effect @s slow_falling 2 1 true"
          ],
          "transitions": [
            {
              "default": "1"
            }
          ]
        }
      }
    }
  }
}
