Notes |
|
(0003136)
|
Tow
|
2012-09-30 11:34
|
|
Duplicate to 0001114 — it is related to handling shooting towers, not an AI issue.
Fixed in r2960. |
|
|
(0003141)
|
Zamolxis
|
2012-09-30 13:40
(edited on: 2012-09-30 13:41) |
|
Strange that it's duplicate, because the text on my Console was saying something else (really about the towers).
But nevertheless, it was fun to see such Console message... :-) Who coded it like this, and when is it supposed to appear? Perhaps when AI tries to make a non-casting creature/object to cast a spell?
|
|
|
(0003144)
|
Tow
|
2012-09-30 14:09
|
|
> Strange that it's duplicate, because the text on my Console was saying something else (really about the towers).
It is because you used StupidAI, and here is the BattleAI — their output is different.
The bug happens, when AI asks about tile accessibility for current stack, if the current stack is towers.
> Who coded it like this, and when is it supposed to appear? Perhaps when AI tries to make a non-casting creature/object to cast a spell?
It was me.
Algorithm is:
1) Get list of spells the hero can cast (first log), erase the ones we don't know how to work (second log).
2) Create list of all possible {spell, target} pairs. (third log)
3) If the list is empty (no possible casts), abort casting. (no log unfortunately)
4) Select the best cast and attempt it.
AI didn't try any casting here. (If it would, it would give an explicit message.) After collecting a list of possible casts, it checked for it size. If it is zero it aborts casting and starts thinking about stack. Which was the turret. |
|
|
|
Thanks for all the details. I didn't realize the Stupid/BattleAI could be the reason the messages are different.
One question though: did the defending castle have a hero with Ballistics? Otherwise I'm not sure the approach is correct. Heroes cannot cast before the turrets unless they have Ballistics. Unless it's a logic restricted to AI vs AI battles only which speeds up the calculation of casualties. |
|
|
(0003146)
|
Tow
|
2012-09-30 15:35
|
|
> One question though: did the defending castle have a hero with Ballistics?
It's the Artillery skill that gives control over turrets. Yes, there was a hero with garrison, all seems legit. :)
AI uses the same engine procedures to check if casting spell is possible at given moment, so there should not be any bugs. (though... we never know.)
> Unless it's a logic restricted to AI vs AI battles only which speeds up the calculation of casualties.
We don't have such technique, all battles are played using the same rules. |
|
|
|
Thanks. And good to know there aren't different rules for AI. |
|