75884 Commits

Author SHA1 Message Date
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
Steve Cotton
63ebe48d64
Select the correct item in a filtered and sorted generator (#4585)
In the load-game dialog, this makes deleting a file select the next
visible game save, thus it fixes #4125.

Credit and many thanks to DisherProject for the inspiration and hard
work of debugging where to fix this.
2019-11-25 18:48:47 +01:00
Steve Cotton
e50fd80d53
Convert some fail-on-success unit tests to pass-on-success (#4597) 2019-11-25 14:28:03 +01:00
Iris Morelle
3fb3decdb0 Drop addon_info.order
Nothing uses it anymore, and the reason for its existence isn't valid
anymore either since we get first upload ts from the server.
2019-11-24 23:59:00 -03:00
Nils Kneuper
00c1f03406 updated Portuguese (Brazil) translation 2019-11-24 12:28:34 +01:00
nemaara
c1638915b4 DiD S3: add another easter egg 2019-11-24 01:56:50 -05:00
Celtic Minstrel
b7a358c4af Fix a typo 2019-11-23 15:25:06 -05:00
Celtic Minstrel
859ab37254 Lua: Fix deprecate_api changing the behaviour of tables with an __index metamethod 2019-11-23 14:44:25 -05:00
Celtic Minstrel
3734bce276 Lua: Replace uses of deprecated (moved) sides functions 2019-11-23 14:41:03 -05:00
Celtic Minstrel
930e39422a Lua side proxy now has starting_location member (replaces wesnoth.get_starting_location()) 2019-11-23 14:37:41 -05:00
Celtic Minstrel
81ee0f0349 Make AI aspect handling in Lua more robust
There should never again be a bug where aspects of one type return nil instead of their value.

If support for a new type isn't explicitly added either in lua_object or in impl_ai_aspect_get, it'll raise a runtime error instead of returning nil.
2019-11-23 14:15:30 -05:00
Celtic Minstrel
7fb2c86c3b Add alternate mode of access to WFL map (currently only in FormulaAI)
This also hides the map's terrain from the string conversion.
2019-11-23 01:04:27 -05:00
Celtic Minstrel
153680400d Unify the Lua and WFL interfaces to the movement type
See changelog for details.
2019-11-23 00:59:36 -05:00
Celtic Minstrel
0ecae9de17 Fix ai.aspects table not containing string aspects 2019-11-22 23:10:16 -05:00
Steve Cotton
63bb076b97
Support running multiple expected-to-pass unit tests (#4582)
This allows batching all of the tests that are expected to return status zero,
which is currently 161 tests, and running the batch with a single instance of
Wesnoth.  It doesn't include the changes to the run_wml_tests script to use
this new feature.

Timing on my PC:
* 4 seconds to run a single test on a debug build
* 90 seconds to run the whole batch of 161 on a debug build
* 1.2 seconds to run a single test on a release build
* 31.2 seconds to run the whole batch of 161 on a release build
2019-11-22 23:14:53 +01:00
jostephd
4b3a7c0800
core.lua: Link to #4584 in a comment near the new warning 2019-11-22 19:19:53 +00:00
mattsc
74c7c17ec8 Experimental AI: fix AI setup max_score values
The return scores were changed in commit 4999b20bd1, but the max_score values in the configurations have not been updated yet. As the relative ranking was not changed, this should not have any effect on gameplay.
2019-11-21 21:11:34 -08:00
mattsc
31b04e345f
Merge pull request #4581 from mattsc/ca_filter_own
AI: add [filter_own] to all default and Exp AI candidate actions
2019-11-21 20:26:24 -08:00
mattsc
1816ee5249 AI: add [filter_own] to all Experimental AI candidate actions 2019-11-21 19:15:11 -08:00
Elvish_Hunter
1c590a7efe SoF: shut 'unknown unit referred to by id' wmllint warnings
This fixes the warnings listed in #4494 and is part of #4381
2019-11-21 23:08:18 +01:00
mattsc
997e08c5d3 Experimental AI: fix bug in move_to_any_enemy CA
Previously, if the best move found for a unit was its own position, the entire CA would be blacklisted and no other unit would be moved.
2019-11-21 13:04:26 -08:00