75904 Commits

Author SHA1 Message Date
mattsc
0806a2bbe1 AI spread poison CA: take attacks aspect into account 2019-12-11 07:12:10 -08:00
mattsc
d8b25ab149 Fast Micro AI: delete/add the new default AI CAs 2019-12-10 07:01:40 -08:00
mattsc
ecca2c43ba Fast Micro AI: fix re-adding default CAs when deleting the MAI
The high_xp_attack CA is deleted when adding the Fast MAI, but not added back in when deleting the MAI.
2019-12-10 06:42:08 -08:00
mattsc
ec1420fae7 TRoW S15: remove spread_poison CA from enemy sides
This scenario has a custom CA for attacks, so all other attack CAs need to be removed.
2019-12-09 12:59:52 -08:00
mattsc
abd03051f6 TRoW S15: remove custom retreat CA
With the merge of Experimental AI candidate actions into the default AI, the retreat CA is now included by default.
2019-12-09 12:58:41 -08:00
mattsc
a4a9a3ba82 LoW: remove poisoning CAs from two scenarios
With the merge of Experimental AI candidate actions into the default AI, a spread_poison CA is now included by default.
2019-12-09 12:57:08 -08:00
mattsc
6a3015f0e2 battle_calcs.lua: fix bug in relative_damage_map() 2019-12-07 19:08:48 -08:00
mattsc
c93b1db30a AI: do not use village hunt CA in any AI config
The algorithm used in this CA is too simple to work reliably in a general setting, it tends to send whole groups of units toward small numbers of villages, or even individual ones. In its current version, it should not be used at all, not even in the Experimental AI. The recommended way to emphasize village hunting is to set the village_value aspect to a larger-than-default value and let the move-to-targets CA take care of it.

We are, however, leaving the CA code and the macros in place for potential future work.
2019-12-07 14:02:52 -08:00
mattsc
009a9ef2da AI spread poison CA: apply aggression aspect
In the same way as it is done in the combat CA
2019-12-07 08:02:00 -08:00
mattsc
1ba7e9c76c AI spread poison CA: use more complete attack rating
battle_calcs.attack_rating() includes most of the contributions to the previous rating, plus a lot more.
2019-12-07 08:01:43 -08:00
mattsc
2cc8cce0e8 AI: use ai_helper.robust_move_and_attack() in all CAs 2019-12-06 08:18:47 -08:00
mattsc
96dd9c1712 AI castle switch CA: use leader-specific cheapest recruit cost 2019-12-06 08:18:47 -08:00
mattsc
f8a9238e3f ai_helper.get_cheapest_recruit_cost: add optional input 'leader' 2019-12-06 08:18:47 -08:00
mattsc
a227e768f9 ai_helper.get_cheapest_recruit_cost: add extra recruits 2019-12-06 08:18:47 -08:00
mattsc
fd05a01af5 AI: make recruitment work with multi-leader castle switch
Recruiting itself still only handles one leader. This will be taken care of later.
2019-12-06 08:18:47 -08:00
mattsc
917f7ef9a5 AI castle_switch: reconsider CA score when using saved data
If the units previously on the keep moved off, we don't have to use the low score any more.
2019-12-06 08:18:47 -08:00
mattsc
18b5d5159e AI castle switch: bug fix for units on keep check 2019-12-06 08:18:47 -08:00
mattsc
ab2c3bfcc2 AI: enable multiple leaders in castle_switch CA
Previously the CA would already move multiple leaders if all leaders were to be moved, but it would abandon moving any leader after finding one that should not move.
2019-12-06 08:18:47 -08:00
mattsc
64e969af11 AI: ensure all CAs respect passive_leader aspect
Most of the former Experimental AI CAs did already (or don't use the leader in the first place), but not quite all of them.
2019-12-06 08:18:47 -08:00
mattsc
1e01df84ff AI: do not use new grab_villages CA for default AI
The old villages CA is quite a bit better at distributing multiple units across multiple villages. The advantage of the new grab_villages CA is that it has a variable score, sometimes grabbing villages before, and sometimes after attacks. This does not outweigh its shortcomings though.

So for now, the default AI will continue to use the previous CA, and the Experimental AI will use the new one. Thus, the two AIs are not quite identical any more (but still very similar).

I also added a todo comment that the grab_villages CA might be reinstated if it is improved.
2019-12-06 08:18:47 -08:00
mattsc
038dc2d7fe AI: remove old retreat_phase CA from AI configs
It is now superseded by the retreat_injured CA (of the former Experimental AI).
2019-12-06 08:18:47 -08:00
mattsc
1391745c9f AI: consider caution in retreat_injured CA
Not retreating at all for caution <= 0 is the same as for the old retreating CA. The rest is specific to this CA.
2019-12-06 08:18:24 -08:00
mattsc
2d86cb20ce ai_helper.find_path_with_avoid: add 'ignore_enemies' option
Note that we do not add an 'ignore_units' option, as allies and enemies are taken into account in different ways and we want to have a way of ignoring each type individually.
2019-12-06 08:14:56 -08:00
mattsc
07d149cbfb ai_helper.next_hop: let units fan out
... as opposed to lining up if there are allied units in the way.

This changes (fixes) the default behavior. An optional 'no_fan_out' parameter is provided in order to restore the old behavior.
2019-12-06 08:14:57 -08:00
mattsc
34956ac15d AI: ensure all CAs respect [avoid] tags
This is for the candidate actions that were merged into the default AI from the former Experimental AI.
2019-12-06 08:14:56 -08:00
mattsc
620da22082 AI: fix score assignment in castle switch candidate action 2019-12-06 08:14:56 -08:00
mattsc
f5990b7e95 ai_helper.get_attackable_enemies: add optional parameter 'avoid_map' 2019-12-06 08:14:56 -08:00
mattsc
891ca93710 ai_helper.put_labels: add two optional parameters 2019-12-06 08:14:45 -08:00
mattsc
fdb3f2e71a ai_helper.next_hop: add optional parameter 'avoid_map' 2019-11-29 19:22:56 -08:00
mattsc
4e80a8f028 ai_helper.next_hop: add option to use pre-evaluated path 2019-11-29 19:22:56 -08:00
mattsc
bb23781b17 ai_helper: new function find_path_with_avoid()
This lets the AI find paths around areas defined by [avoid] tags, rather than being stopped dead by them. See comments in the code for details.

The relevant custom cost function, custom_cost_with_avoid(), can be accessed directly as well.
2019-11-29 19:22:56 -08:00
mattsc
3e70358d8d AI: ensure all CAs respect unit guardian status
This adds the correct behavior for the castle_switch, move_to_any_enemy and place_healers CAs.  It was already in place for the other former ExpAI CAs (except for recruiting and spread_poison, for which it does not apply).

This automatically also adds this behavior to the Healer Support Micro AI.
2019-11-29 19:22:56 -08:00
mattsc
24af20cf83 Experimental AI: show in MP menu in debug mode only
It is now identical to the default AI, so we only show it in debug mode in the MP computer player selection menu. It will be moved back to be always available when there is new development happening.
2019-11-29 19:22:56 -08:00
mattsc
a38356e61c Experimental AI: add comments that it is now same as default 2019-11-29 19:22:56 -08:00
mattsc
5c285cfde0 AI: copy Experimental AI candidate actions into default AI 2019-11-29 19:22:56 -08:00
mattsc
7bbe5329c1 AI: create copy of the current default AI
... and call it the "1.14 default AI".
2019-11-29 19:22:56 -08:00
mattsc
3bd6613dda AI: Set up macros for Experimental AI candidate actions
In the same way as they are set up for the default AI
2019-11-29 19:22:56 -08:00
gfgtdf
95739dc93b
add bug label to bug template 2019-11-30 02:42:20 +01:00
newfrenchy83
632bb80ba6 Update tests.cbp 2019-11-29 16:28:53 -06:00
newfrenchy83
bfa8bbf889 add tests projectfile to codeblock workspace 2019-11-29 16:28:53 -06:00
Celtic Minstrel
5a27cd5b1b Also correct the dperecation message regarding the previous commit
[ci skip]
2019-11-29 00:36:47 -05:00
Celtic Minstrel
c7e84f487c Correct old names for some deprecated (renamed) unit functions
Fixes #4608
2019-11-29 00:33:36 -05:00
doofus-01
107b9af282
Some dunefolk sprite updates (#4573)
* some dunefolk sprite updates

* some revisions to updates

* revise lvl1 naga sprite to look less like existing fighter

* some more sprite revisions

* some base-frame edits and partial path reorganization

* revised firetrooper base-frame

* little pilot flame for firetrooper torch standing anim

* dunefolk sunderer line base sprites

* finish dunefolk sprite directory reorg
2019-11-28 07:30:59 -08:00
pentarctagon
acb2dd8226
Install python3 for the WML unit tests. 2019-11-28 00:55:04 -06:00
pentarctagon
53e92feedf
Fix team names to match the description of allowing FFA. 2019-11-27 21:32:31 -06:00
sigurdfdragon
6c999dea00 WoV: Update to match the 1.0.5 version on the 1.14 add-on server
Changes:
Make objective notes in S05, 06, 07, & 11 more blunt
S02: Slightly improve dialog
S04: Capitalization fix
S05: Dialog tweak for possible addition of nagas with ranged attack
S09: Improve flow of victory dialog
S09: Change gameplay and difficulty to eliminate tomato surprise
S11: Bump up turn limit
S12: Have saurian elders under player control
S12: Fine-turn enemy recruitment for slightly more clasher line units
2019-11-27 22:25:36 -05:00
newfrenchy83
fa7e5c2dfe fix test projectfiles 2019-11-28 04:53:52 +11:00
Celtic Minstrel
1c6d1ddfa8 Attempt to fix Travis failure 2019-11-26 23:40:47 -05:00
Celtic Minstrel
5b7383cdf2 Fix ai.aspects.avoid always returning an empty table 2019-11-26 23:40:30 -05:00
Celtic Minstrel
cfd23bd850 Fix string AI assets being truncated if they contain spaces 2019-11-26 23:22:06 -05:00