Wednesday, November 8, 2023

Combat Cycle

I managed to get some quality code put together this evening. It's one of those "expect it to work, but need to code it parts" which I've ignored till now, but needed to fix at some point - which became now.

The combat cycle was separate from the normal game time cycle. I needed to at least sort of, combine the two together - though at different scales. I already had the combat happening in ticks or sorts, where actions would put a delay on the characters until they were ready to activate again and with some recycling of code and making use of hooks that were already there, I managed to connect it together. That also means that buffs and effects that were active prior to combat, or ones picked up while in combat have a reference point on which to increment now.

The long and short, is that while I'm sure there's bugs to fix in what I wrote tonight, the real-time normal mode and the turn based combat mode are now connected, and that means that effects have something to reference and go off with - and that's good progress for a night! Tomorrow, I'll try to connect those effects ticking over to something that the game will show up between activations, so that you can see when someone gets hurt/healed by a damage/heal-over-time or when something else generally happens along those lines.

No comments:

Post a Comment

Character and Item Stats

It feels like I've renamed a thousand thousand properties in classes, updated a myriad of methods across the database, the editor and th...