I want to make a trading card game like Yu-Gi-Oh or Magic. I have a lot of cards in my game and even the user can make new cards. Cards are objects and they have attributes like HP and Mana ,etc but they also has special power which is another object and has different types some of them activate when a card is played into the field, some of them activate at death and etc. One way is simply hardcoding all the different cards in different classes but This way, I cannot implement a user-built card. I am going to use enums for the essential cards but I don't know what to do for user defined cards.
Is there any standard way to implement things like this?
I am very new to Java and OOP. I think maybe Databases could help but I don't know what should I use or search to find the appropriate choice for this matter.