#select a card
tag @e[tag=temp] remove temp
tag @r[type=cero:card,tag=deck] add temp
tag @e[tag=temp] remove deck
tag @e[tag=temp] add player1


#teleport card to center
tp @e[tag=temp] 38.5 28 -43.5 0 0

#event
event entity @e[tag=temp] player1
event entity @e[tag=p1_playbutton] clickable_play
event entity @e[tag=p1_keepbutton] clickable_keep

#give texture
scoreboard players set @e[tag=temp] scheduletexture 1


#playsound
execute @a ~ ~ ~ playsound step.grass @s


#add drawing tag
tag @a[tag=turn] add drawing


#announce
tellraw @a {"rawtext": [{"text": "§c"},{"selector": "@a[tag=turn]"},{"text": " is drawing a card"}]}



#make cards unclickable
event entity @e[type=cero:card] stop_clickable


#cardcount
function count_cards



#tp keep/play button
execute @e[tag=p1_playbutton] ~ ~ ~ tp @s ~ 28 ~
execute @e[tag=p1_keepbutton] ~ ~ ~ tp @s ~ 28 ~