I'm working on a traditional turn based combat and I want to modify different parts of an action individually to simulate power-ups.
I have an Action class which is a Reference and uses a resource to be constructed this resource holds the action methods depending on the subclass of Action and other multiples parameters.
My idea was to duplicate and modifying the data resource but it may not be a good idea because I also want to remove the power-ups, and to save the game I need to create a new resource file with ResourceSaver right?
Another idea is to have a dictionary outside the Action class with the names of the actions and specifying what power-ups are active on that specific action, then in the Actions methods I apply these changes.
Can you think of a better way to solve this problem or a solution to these problems?
I also have a doubt about where to construct the Actions Is it better to construct them when the battle starts or construct them just before using them?
I'm using Godot 3.4 but if you know of a good way of accomplish this with lambdas or something in godot 4 let me now.