Godot Version
4.2
Question
Hello,
INTRO
Despite I’m not the sharpest mind I figured out how to put together the base structure of my little PvE card game. I think everything is encapsulated correctly with signals from the bottom up and function calls from top to down.
there is a player-handler who manage: hand, mana, deck etc. and the end manage the card UI and, THIS IS THE IMPORTANT PART, the card UI takes the data from a custom resource called CardDatabase.
Nothing new here.
QUESTIONS
Now. How can I implement card effects with this structure?
I need the effects to be aware of everything so I think is impossible to implement them directly in the card.
An “effect twin” of the card in the game handler, that is triggered by the CardDatabase is an option? And how can I implement them?
Any other suggestions?
EXAMPLES
Play: deal 1 damage to all units on the board
Play: discard the weakest card in hand, your enemy does the same
Discard: give +2|+0 to an ally in hand