this adds borders to the 2p dark forecast survival map, it also removes
the big empty space in the upper third of the map.
This also renames the mask files to map files, becasue they are actually
just normal maps, and the [terrain_mask] just replaces the current map
with these.
In the previous version, the leader would sometimes leave the keep for
truly suicidal attacks. This commit adds an extra layer of analysis to
evaluate whether an attack position is safe enough.
This evaluation is too expensive to be done for all units for the
purpose of this AI, or even to be done for the leader more than once,
so this is separated out into its own candidate action that is only
evaluated once everything else is done.
Attackers and targets can now also be selected through the default
attacks aspect. [filter] and [filter_second] inside the [micro_ai] tag
have priority though, if either of them is given.
This can either be an [avoid] tag inside the [micro_ai] tag itself, or
the [avoid] tag of the default AI (e.g. as defined in the side
definition). If both are given, the former has priority.
This is a multiplicative factor determining how much more the AI values
leaders than non-leader units. The parameter was already included in
the fast_attack_utils code with a default value of 2. This commit only
makes it configurable from the [micro_ai] tag.
These can be used to limit the attackers and attack targets in the same
way as the ‘attacks’ facet does with [filter_own] and [filter_enemy]
for the default AI combat candidate action.
This does not affect the move-to-targets candidate action of the Fast
Micro AI.
This is done in this way to keep computational overhead as low as
possible.
Also add an optional key attack_hidden_enemies. This can be used to
attack also hidden enemies; or to speed up the AI a little when no
hidden enemies are present.
wesnoth.get_locations includes border hexes, so they need to be
excluded specifically. Previously this could cause error messages and
the CA to be blacklisted.
The problem is due to a dog adjacent to a sheep being excluded from the
dog_move CA (so that it can act further later on in case the sheep
moves again). It is fixed by adding another CA at the end that simply
takes all moves away from all dogs once all other CAs are done.
Hexes occupied by allied units were previously not excluded properly by
the AI, which could lead to error messages and the candidate action to
be blacklisted.
If the move of the attacker toward the target is interrupted by an
ambush, the attack action previously caused an error, because the
attacker did not get to its target.
In this case, it can happen that there are no goals (e.g. if there are
also no villages or if the AI has no leader). Previously, this
situation caused an error message.
If the lurker move is interrupted by an ambush, the attack action
previously sometimes caused an error, because the lurker might not get
to its target.
Somehow the combination of “” and new lines caused the string to be
terminated prematurely when it was extracted into the .pot file. Fixed
by removing the “”.
Previously, only terrain with C or K in the terrain code passed the
SLF. Now we check whether the hex is a castle instead, independent of
the terrain code.