{
  "format_version": "1.10.0",
  "animation_controllers": {
    "controller.animation.silverlabs_nat.red_panda.sleep_stand": {
      "initial_state": "init",
      "states": {
        "init": {
          "transitions": [
            {
              "wake_up": "query.property('silverlabs_nat:red_panda_energy') >= 10"
            },
            {
              "fall_asleep": "query.property('silverlabs_nat:red_panda_energy') < 10 && !query.property('silverlabs_nat:red_panda_jolt_awake') && !q.is_moving && !q.is_in_water_or_rain"
            }
          ]
        },
        "wake_up": {
          "on_entry": [
            "@s silverlabs_nat:awake"
          ],
          "transitions": [
            {
              "awake": "1"
            }
          ]
        },
        "awake": {
          "animations": [
            "duration"
          ],
          "transitions": [
            {
              "fall_asleep": "query.property('silverlabs_nat:red_panda_energy') < 10 && !query.property('silverlabs_nat:red_panda_jolt_awake') && !q.is_moving && !q.is_in_water_or_rain"
            },
            {
              "awake_2": "q.anim_time >= 1"
            }
          ]
        },
        "awake_2": {
          "on_entry": [
            "@s silverlabs_nat:decrement_energy"
          ],
          "transitions": [
            {
              "standing": "math.random_integer(0, 20) == 0"
            },
            {
              "awake": "1"
            }
          ]
        },
        "standing": {
          "on_entry": [
            "@s silverlabs_nat:start_standing"
          ],
          "on_exit": [
            "@s silverlabs_nat:stop_standing"
          ],
          "animations": [
            "duration"
          ],
          "transitions": [
            {
              "awake": "q.anim_time >= math.die_roll(3, 0.5, 4) || q.is_moving"
            }
          ]
        },
        "fall_asleep": {
          "on_entry": [
            "@s silverlabs_nat:sleeping"
          ],
          "transitions": [
            {
              "sleeping": "1"
            }
          ]
        },
        "sleeping": {
          "animations": [
            "duration"
          ],
          "transitions": [
            {
              "wake_up": "query.property('silverlabs_nat:red_panda_energy') >= 960 || query.property('silverlabs_nat:red_panda_jolt_awake')"
            },
            {
              "sleeping_2": "q.anim_time >= 1"
            }
          ]
        },
        "sleeping_2": {
          "on_entry": [
            "@s silverlabs_nat:increment_energy"
          ],
          "transitions": [
            {
              "sleeping": "1"
            }
          ]
        }
      }
    }
  }
}
