Quote from: shakume on Sat 15/07/2023 09:02:44Edited to add a link to a quick sketch of what I'm thinking:
OK, so given that description and sketch, I wouldn't use the AGS dialog system for the combat. The UI is too different, for one thing.
The way I would write it, I would have a struct that stores all the details for a boss:
-The name of the boss, any related graphics you need to display
-What the dialog options are in each round (for example as four string arrays, one for each button—or six if you have a third unlockable option for each character)
-What the outcome of each dialog option is, i.e. the effect on HP and any kind of comeback or response the boss has—either a dialog response or animation (if the outcome depends on the combination of Char 1 and Char 2's options, it gets more complicated, but still doable)
-The win condition for this boss
I would make an array of this struct, with one entry for each boss in the game. Then you need to initialize it: set it up with all the data for each boss. You'd normally do this as a function that gets called at game startup.
I would have some variables to store the current state of the combat (which boss you're currently "fighting", the current round, how many hitpoints the boss currently has, whether you have used the special combi option already, etc.; to keep things organized I would add all these variables to a struct, but that's more a personal preference than an architectural requirement), and then I would have a function that does the combat logic: based on the dialog options chosen and the data in the current boss's struct, update the state of the combat. I would also have functions to do whatever the feedback to the player should be (e.g. play animation/music), and to set up the screen appropriately (show the boss's NPC pic, fill in the right text in the option buttons, etc.). Also a function to start the combat and one to end it. Finally you just hook up the button handlers to run these functions when appropriate.
Oh, and about the graphics: I would strongly recommend you make a View for each boss, set up the same way for all of them. That way, you can just save which view to use for each boss (as part of its struct), and then use the same code to display different expressions, animations, etc. (Or if the bosses are already characters, you could use their Normal or Speech view, and just save a pointer to the character in the struct.)
Essentially, this is more like a combat system than a dialog system, so you can search for any posts that explain how to code a combat/battle system.