Behind the scenes progress

I’ve done some more work in the background of the game today. I’ve improved the way the descriptions for the non-creature spells are presented. Now they can use upto 3 lines of text with word-wrap, which makes the display look much better.

The Line of Sight routine has been redone to be much improved, and so far it seems to be working ok and as expected.

I’ve added two new spells, Subversion and Raise Dead. These were easy to add, but did involve adding some more new flags. For example Raise Dead actually moves a piece from the BODY layer to the PIECE layer in the game, then changes the wizard owner (as subversion does), and then turns on the Undead status flag and the Can Attack Undead status flag. So as you can see, it would be possible to make a spell that has a higher chance of working, but which restores any dead body to it’s original owner and doesn’t make the piece undead.

Finally I’ve started work on making the AI use the walls, castles and tree spells and deal with them on the board. First attempts were a bit comical, as the AI turned into a pack of demented lumberjacks and started trying to kill every tree. A few more checks for the defence, attack and movement values being 0 have helped that quite a bit, but there is still no flag to show the AI that magic woods can be ‘ridden’ by anyone. Once that is in it will work much better and let the human wizards go in enemy magic woods too..

Progress is very fast so far, but my motivation and free-time won’t last for ever, which is one reason I’m trying to get as much done now.