{
    "format_version": "1.19.0",
    "animation_controllers": {
        "controller.animation.card.behavior": {
            "states": {
                "default": {
                    "transitions": [
                        {"clickedoncard": "query.health(1) == 7"},
                        {"selectcolor": "query.health(1) == 8"}
                    ]
                },
                "clickedoncard": {
                    "on_entry": [
                        "/execute @a[tag=turn] ~ ~ ~ playsound random.click @s",
                        "/tag @s add tempcerocard",
                        "/execute @e[tag=dummy,scores={hastodraw=0}] ~ ~ ~ tag @e[tag=tempcerocard] add tempcero",
                        "/execute @e[tag=dummy,scores={hastodraw=1..}] ~ ~ ~ tag @e[tag=tempcerocard] add tempcerostack",
                        "/execute @e[tag=tempcero] ~ ~ ~ function card_interact/interact",
                        "/execute @e[tag=tempcerostack] ~ ~ ~ function card_interact/interact_drawstack",
                        "/tag @s remove tempcero",
                        "/tag @s remove tempcerostack",
                        "/tag @s remove tempcerocard"
                    ],
                    "transitions": [
                        {
                            "default": "1"
                        }
                    ]
                },
                "selectcolor": {
                    "on_entry": [
                        "/function card_interact/selectcolor"
                    ],
                    "transitions": [
                        {
                            "default": "1"
                        }
                    ]
                }
            }
        }
    }
}