AI Hooked Up!

I got the AI decision code hooked up to actual moves today! That was a pretty big step, as I could actually test out how combat feels, instead of guessing.

So far, I think it's moving in the right direction. I had a few moments where the AI surprised me, and made me smile. My very first encounter was with a dogman, and I charged it full-tilt, and it actually ran away. Even though I knew it was the element of randomness I added, it felt like it was a creature freaked out by my brash move.

Other times, the AI seemed truly addle-brained, randomly advancing and retreating with no apparent cohesion. I'll need to tweak values so that randomness is toned down, or at least seems more logical.

There's also a problem with engaging a scared enemy (like a looter or wounded creature). I can hardly close to attack range if the creature is bent on retreating, meaning there's this constant rhythm of entering combat and exiting combat with no attacks traded. I say "problem" because it feels more frustrating than fun, so I'll explore some options for fixing that.

In the process of the above, a lot of code got moved around. Functions had to be moved from one place to another to accommodate things like creatures leaving the battlefield mid-battle, and sending the right messages to the message window.

Overall, today was a good day for tangible progress. It still doesn't look different, but it feels different, and I'm excited to add some of the more "special" moves to see how it feels when the enemy uses them on me.

That's it for this week. Have a good weekend, all!