Forceofaqua consider using Dictionaries and Arrays to pull from them (I am guessing you are familiar with these). I am currently working on a similar pet project but I also am learning, so consider this an untested hypothesis.
Say you have an array that stores everything you need for a card. You can store a resource (like say, the card's art) and then a name, a string for text and some values. Then you can also assign it a type and if it has a type, it uses its values for whatever function you need. After that, it's just a lot of math. Ok, it's probably more than that, but that's a start.
var _GoblinExample = {
"Name": "Goblin Example",
"Art": "res://insertfilepathhere.png", ### you could just use a saved resource too.
"Attack": 1,
"Health": 2.
"Text": "This goblin is a beginner example.",
}
Once you have a dictionary of the card data, you can nest those into a dictionary that serves as a MASTER list.
const _MASTERLIST = {_GoblinExample,_MageExample,_SoldierExample}
You have a second array with the card names that pulls from the MASTER to be your COLLECTION. (unless it's like poker then skip to the next step)
During a round, you have a third array that pulls from the COLLECTION to make a DECK.
Then your final array pulls from the DECK to make your HAND.
After that, code your card objects to use the data within to populate your cards (and you can even use, say the name you pulled all the way back from the MASTER LIST as a key to pull your values from the Dictionary.
Note: you can't compare values between Dictionaries in Godot, nor can you erase elements from them because this will throw up errors. Hence why they are perfect for a Master List because you won't be changing these base values - and they're just a reference in the end anyways, as you'll like up things like attack power or defense within the array, which you can edit all day and not have problems, provided the code works.
ANYONE who wants to optimize this, feel free. I'd be intrigued to see what more experienced devs have to teach here.
In case you need the Docs:
Dictionaries - Official Docs