You should set up some instance variables on those cards so you have more control over what's happening particularly the level of the card. I don't know your upgrade mechanic and how outcomes are created but if for example you want to combine 2 cards you could only allow if a lvl 1 is selected to click on another lvl 1 card, then combine into a lvl 2 so destroy both then create a new lvl 2 card and pick the frame at random 3 or 4.
I did not think about assigning the cards instance variables. I was trying to do it by comparing the animation and frame lol. In hindsight that would make controlling their behaviors cleaner.
The main problem still is that you don't sepect on cards to merge and upgrade rather my intent is to have a phase of play happen where it checks for cards of the same level and type that are touching to them merge and upgrade them. The combat system I'm trying to replicate uses action points as a resource. Moving a card to a new position costs an action point and so does playing a card. Everytime you play a card or merge two cards from a character's abilities that character gains energy. When energy is full you gain a special card that is their ultimate ability. High level cards also sometimes have additional effects such as preventing the target from using their attacks, specials, or ultimate cards depending. Or inflicting a status effect or granting buffs.
The reason I like this combat system so much is because you have so many choices each turn to tackle enemies as combat plays out in the form of a very simple puzzle.
Anyways, I'll try to give them variables and see if I can get them behaving the way I want them to later after work.