[size=75]Continuing the Battle AI discussion threads (links to the other topics here).[/size]
[size=150]Battle AI Part 4 - SPELL CASTING[/size]
4.A. SPELL CASTING – CREATURES
-
Archangels – rules to follow
-
Master Genies – rules to follow
-
Pit Lords – rules to follow
-
Ogre Magi – rules to follow
-
Elementals (Protection from elements) – rules to follow
-
Faerie Dragons. They represent a special case, as their attacks fall under the rules of any shooter of a hero with Golden Bow (i.e.: nearby enemy doesn’t block the ability to cast, so that also shouldn’t affect their choice between cast & melee). But we could already say that as Basic rule we can have “always cast, looking for maximum damage” BUT “avoid hitting friendly creatures (in case of area spells)”. The Advanced rule would calculate MPA and try to block shooters if melee is chosen (see 3.B. MELLE rule #1). The Expert rules would add bonuses in case of blocking shooters but also vulnerabilities in case melee moves within the range of more enemies (but these are all similar with the general rules for range creatures).
… (WoG creatures to follow)
4.B. SPELL CASTING – HEROES
This is probably the topic on which most “ink” will flow in the future. I haven’t really started to analyze this yet, but as very Basic rules, we could consider the following in the beginning:
- AI should cast every turn as soon as possible
- If at least 5 targets applicable, cast one of the top 5-10 mass buff/debuff spells (if available; list to be defined, but would probably include Prayer, Haste, Slow, Bless and a couple of others).
- Else go for the most damage inflicting spell (include nearby hexes in damage calculation of area spells)
- Else go for another spell (hierarchy to be defined until the implementation of the Advanced Rules)
- Do not re-cast a spell if still effective on (at least one of) the target creatures
But – as said – I didn’t analyze this properly to see if even these basic rules are good enough. Advanced/Expert rules to follow.
Same as for other threads, if you have thoughts/suggestions, feel free to share then, no need to wait until I find time to fill in the gaps above.