Here you can see a Computer controlled wizard casting Dark Power on an enemy Golden Dragon..
Notice also the wizards running about with spangly, shiny, super-weapons! Yes, I have put in the code and the new gfx to let you cast Magic Shield, Magic Armour, Magic Knife, Magic Sword, Magic Wings & Magic Bow. 🙂
I had to add a bit more shading detail to Magic Armour as it was looking too flat otherwise, and it is one of my favourite gfx in Chaos. I would love to do all the gfx with this amount of detail or more, but I’m afraid I’m not a good enough artist to do on the creatures..
To implement the new spells.. first of all I added a spell option to enable a spell to change a target piece’s gfx to another one in the list of pieces available. This lets me change the wizard gfx, but it could also be used to disguise a strong piece with a weaker creature’s image (thinking of evil spells here!). With this in place I was able to add more spell options to change individual stats like combat, defence, movement, etc.. Like the originals, the combat and defence options refer back to the original pieces values to stop you casting two magic knifes and getting a +4 combat advantage.
All these wizard spells also let the wizard attack undeads, although that side of the code in terms of creature attacking is not in there yet. I’ve made the magic bow arrow gfx appear white with a slight glow to separate it from the normal arrows.
The AI can now also use these new wizard spells, although I might have to tweak the values used after analysing more games. At the moment though, the AI will be more likely to cast spells like shield, armour, wings or bow if it is under threat. Similarly, it is more likely to cast knife, sword, wings or bow if feeling strong. I think this does reflect how human players would play and hopefully will feel more natural. The AI will also not cast a spell like knife when it already has sword.. Oh, and having the same spell more than once will make it more likely to be cast (more chance of getting one to work).
I had to do a bit of work to get the AI wizards to shoot properly when moving around, mounting and firing, or standing still and firing from the ground or when riding a creature. This part of the code wasn’t there at all before, and it took a while, but it seems to be working ok. Now, they are just totally evil with their new weapons.
What else? Oh, I’ve made the wizards be more likely to ride pieces when under threat rather than trying to hide in the open. I think I’ve fixed the spell information bug Kreezer mentioned and I fixed a couple of other rare bugs in there too.