mattsc
f761493c75
Lua AIs: no need to set variables to nil explicitely
...
This is mostly done for consistency across the Lua AI code
(cherry-picked from commit 0e7c09f7b549bb43aec248bad04fcf0bffef17d5)
2018-10-07 03:24:40 +00:00
mattsc
08825afce5
Lua AIs: remove inclusions of unused libraries
...
(cherry-picked from commit 8a996c55b968b14b04a551db46b7ab3de735696f)
2018-10-07 03:24:39 +00:00
mattsc
3906d78abd
Lua AIs: avoid using __cfg for accessing weapon specials
...
(cherry-picked from commit aa59ac54557bc24615cb3f990bcd1dbf6f5d1ea9)
2018-10-07 03:24:39 +00:00
mattsc
fbbbcfc67e
Lua AIs: replace print() by std_print()
...
(cherry-picked from commit 3f54908b0ba69173442107105889caeb891b922d)
2018-10-07 03:24:36 +00:00
mattsc
25b2024ee8
Lua AIs: use unit methods instead of wesnoth functions
...
(cherry-picked from commit a6866390dfa64097fa4cb099b39736c3e2220ce4)
2018-10-07 03:24:36 +00:00
mattsc
0c707294cb
Experimental AI recruiting: use math.huge instead of 9e99
...
(cherry-picked from commit a6c0012689b39d74e2d9578f17010a048ef7d296)
2018-10-07 03:21:29 +00:00
mattsc
f1eacc51ad
Experimental AI: clear recruit cache when no recruit action found
...
(cherry-picked from commit f810504306f7b97bd5e532793b36591ada8ba671)
2018-10-07 03:21:29 +00:00
mattsc
9b6f933ded
Fix Experimental AI not working without enemy units
...
An example are the first two turns of Dark Forecast.
(cherry-picked from commit a65605c54726a391cc05d1bb75761966a8088cac)
2018-10-07 03:21:29 +00:00
mattsc
1c88a6d8c8
Do not load helper.lua where it is not used any more
...
(cherry-picked from commit 4b6681a300f29eab3b5adcf3b12df8bc6ad455dd)
2018-10-07 03:21:10 +00:00
mattsc
cb1bc56478
Remove unnecessary inclusions of helper.set_wml_action_metatable {}
...
(cherry-picked from commit 1684e2f5daa6b84906186b101c83a6a017b07581)
2018-10-07 03:21:10 +00:00
mattsc
4586e04eca
Lua code: replace deprecated helper.child_range() calls
...
(cherry-picked from commit 7c137e1a336559acdd6f797192a9516135480b2e)
2018-10-07 03:21:09 +00:00
mattsc
58529e95f8
Lua code: replace deprecated helper.get_child() calls
...
(cherry-picked from commit f0bb40590fe1a9c2c6683157f9aa93b631848251)
2018-10-07 03:21:08 +00:00
Celtic Minstrel
6efc5ae090
Replace helper.distance_between -> wesnoth.map.distance_between ( fixes #1686 )
2017-05-11 04:14:03 -04:00
Celtic Minstrel
8d4cf3cf62
Shorten requires where possible
2017-05-03 02:42:25 -04:00
mattsc
f2406ac829
Experimental AI: correctly deal with hidden and petrified units
2016-10-19 07:37:19 -07:00
mattsc
3d0c29b7fc
Experimental AI: do not let AI try to recruit on fogged/shrouded hexes
...
The engine will refuse to recruit on shrouded hexes, which will result
in part or all of the rest of the AI actions to be disabled. Fogged
hexes may cause problems also if there is an enemy unit on them.
This fixes at least part of bug #25112 .
2016-09-24 19:17:39 -07:00
mattsc
3f2df87bed
Recruit rushers AIs: adapt syntax to recent AI changes
...
This caused an error message and recruiting to be abandoned when the
recruit rushers Micro AI was used for two different sides in the same
scenario. It was only presents since the AI refactoring done during
1.13.4+dev and did not affect any release.
2016-07-27 19:58:22 -07:00
Celtic Minstrel
c79874086d
MicroAIs: Update all to use the new [args] syntax
...
Except for Protect Unit, all of them seem to still work correctly.
2016-03-27 15:13:21 -04:00
mattsc
496a58d343
Experimental AI: use checked versions of the AI actions
...
So that only valid actions are executed and useful error messages are
produced if something goes wrong.
2014-02-28 07:04:54 -08:00
mattsc
3e6e7caa74
Put 'done_eval_messages()' behind 'if print_eval()' condition
...
... so that they only get printed when this sort of debug output is
selected.
2013-10-31 20:54:00 -07:00
mattsc
d355adbacb
Clean up time stamps and debug output code
2013-10-31 20:31:37 -07:00
Alarantalara
c859d0d17b
Keep villages unreachable by recruited unit
...
If the recruited unit cannot reach the target village, try again later
2013-10-31 23:14:36 -04:00
Alarantalara
33c1e493b2
Handle more damage specials for Lua recruiting
2013-10-31 23:14:35 -04:00
mattsc
b826e5ead5
Micro AIs: make recruit_rushers work with new external CA method
...
The previous code did not allow to get the ai table to the execution
function.
2013-10-30 09:42:41 -07:00
mattsc
7e0a05ed6e
Experimental AI: consistently use underscores in AI ids and file names
...
This is the last step of making everything use consistent syntax.
2013-07-10 20:37:30 -07:00