Today I have added Magic Fire and Gooey Blob:
Like the original, Gooey Blob will spread and cover pieces that don’t belong to it’s owner. They can also be rescued by killing the covering blob. Unlike Gooey Blob, Magic Fire will try to attack a piece, but will kill the piece completely if it wins. The growth routine is pretty simple and is a direct translation from the original code after being disassembled by a few people. I think the ‘grow and make the original piece die’ chance is not quite the same, but the rest of it is identical.
As you can see in the screenshot, I’ve added a quick blur glow to the fire gfx, which is a bit of a placeholder for the moment.
The growth options are all held in the piece data text files, so pieces can have a different chance of growing, dying, attacking, etc.. They can also grow a piece that is not the same as the current one, so for example you could have a bees nest which has a chance of creating a bee creature. 🙂
Most of the time today was spent on getting the AI to use the spells properly and to react to them on the board. Because they can grow the AI needs to be coded to realise that standing next to a growing piece is not a good idea! At the same time a wizard shouldn’t be so scared of blobs more than a square away that they would run away in a panic. They need to know that they cannot move and attack them. That is what I tried to today, even though it’s a bit tricky. I had to do a few changes (without hardcoding for specific spells), to make the AI treat them properly. It still needs some work, but that’s for another day.
Like much of Chaos, one little thing here can have unforeseen consequences later on due to the way things interact. It certainly takes longer than you think for getting the logic right!
I’ve also fixed a few display user interface bugs with text not being removed at the start of a new turn and with removing highlighting in a computers turn and messing up his movement. I’ve still got a few issues to fix with wizards mounting a piece with a magic bow and not shooting, and not doing anything in a magic tree. But for today the Magic Fire and Gooey Blob are pretty much done. Mutation and Teleport next I think..