I was following mobile RPG series from HeartBeast. Good tutorial and the basic run okay.
but beyond that, how to structure the "mechanics" that I would like to implement, and to be as generic as possible (for better scaling option)
I think about something similar to Slay The Spire, where there are some common RPG mechanic like poison, stun etc.
they also implement relic that "interrupt" the base mechanic of the turn-based combat. For example there is a relic that heals you after deal a killing blow, add damage on first attack you use, prevenet the first damage that dealt to you in combat, heal after combat, obtain block if (condition) and so on.
I think relic runs individually for each their own effect, but at the same time checks and interrupt the existing loop.
how to structure it so that, by the time I add more relics to the game, it doesn't break the existing loop, so I just create more function or script for the new relic, without a need to overhaul the combat loop? I can't seem to imagine the loop and seems like I need to keep revisiting the turn-based code everytime I add a new relics / interrupt
An example of your idea would be appreciated, thanks!