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



#event
event entity @e[tag=temp] table
tp @e[tag=temp] 39.0 25.5 -39.0 45 0

#texture
execute @e[tag=temp] ~ ~ ~ function givecardtexture


#tableorder score
scoreboard players add @e[scores={tableorder=0..}] tableorder 1
scoreboard players set @e[tag=temp] tableorder 0



#tellraw
function announcecard_opening


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


#remove temp tag
tag @e[tag=temp] remove temp


#cardcount
function count_cards



