If Fall from Heaven were a standalone game ...

And then you need the AI to handle it.

True. I have no idea how the AI would decide which plot to pick if it didn't know anything about what picking the plot did. You can force them to cast a spell via python, but not which plot to pick.
 
In FfH for Vanilla civ spells could target tiles and specific units. Unfortunately, this spell interface often froze up.

I think that targeted spells should be reimplemented, but that it should be done in C++ this time. It seems to me like it shouldn't be too hard to let spells target tiles the same way ranged attacks do, and that it should be possible to have a popup like the one that lest you choose which transport to use if there are more than one available on the tile to let you select targets. Since the AI can understand these, it doesn't seem like teaching them to use targeted spells would be that difficult. Teaching them to understand targeting code in python seems much more difficult. Of course, it is far beyond my ability either way.
 
I came up with a way to make this work for the AI... Instead of trying to make the AI understand how to pick a plot and a unit, we only need to make the AI apply the spell to a certain unit. So for instance, enchant blade could, if you were human, trigger a popup letting you pick a unit on the plot to give them Enchanted Blade. However, for the AI, the code would just give the best unit on the plot Enchanted Blade. ("best" according to some function that calculates the best unit). The same would be true for plot-picking spells like Slow... it would give a unit within one tile range the Slow promotion, whereas the human would have a choice.

I could maybe do this via python. But someone else interested would have to do it in C++.
 
Back
Top Bottom