#event
event entity @e[tag=tempinteract] interact_succeed:go_to_table


#teleport
execute @e[tag=dummy,scores={turn=1}] ~ ~ ~ function card_interact/table_offset_p1
execute @e[tag=dummy,scores={turn=2}] ~ ~ ~ function card_interact/table_offset_p2
execute @e[tag=dummy,scores={turn=3}] ~ ~ ~ function card_interact/table_offset_p3
execute @e[tag=dummy,scores={turn=4}] ~ ~ ~ function card_interact/table_offset_p4


#add tag
tag @e[tag=tempinteract] add table
tag @e[tag=tempinteract] remove player1
tag @e[tag=tempinteract] remove player2
tag @e[tag=tempinteract] remove player3
tag @e[tag=tempinteract] remove player4




#next turn
execute @e[tag=tempinteract,tag=normalcard] ~ ~ ~ function nextturn/normal
execute @e[tag=tempinteract,tag=globe] ~ ~ ~ function nextturn/skip
execute @e[tag=tempinteract,tag=reverse] ~ ~ ~ function nextturn/reverse
execute @e[tag=dummy,scores={drawstacking=0}] ~ ~ ~ execute @e[tag=tempinteract,tag=plus2] ~ ~ ~ function nextturn/draw_classic
execute @e[tag=dummy,scores={drawstacking=1}] ~ ~ ~ execute @e[tag=tempinteract,tag=plus2] ~ ~ ~ function nextturn/draw_stacking