[wesnoth-commits] [wesnoth/wesnoth] 5fe283: Lua AIs: use wesnoth.label instead of wml_action_m...
GitHub
noreply at github.com
Thu Nov 8 15:32:01 UTC 2018
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 5fe283d06c23eb246e5bcf0790ce4d057e833503
https://github.com/wesnoth/wesnoth/commit/5fe283d06c23eb246e5bcf0790ce4d057e833503
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-24 (Wed, 24 Oct 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
M data/ai/micro_ais/cas/ca_wolves_multipacks_functions.lua
Log Message:
-----------
Lua AIs: use wesnoth.label instead of wml_action_metatable
Commit: e3b86f56481434b52e403e27cb68db4887c173d8
https://github.com/wesnoth/wesnoth/commit/e3b86f56481434b52e403e27cb68db4887c173d8
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-24 (Wed, 24 Oct 2018)
Changed paths:
M data/ai/lua/patrol.lua
Log Message:
-----------
Lua AIs: increase deprecation level of old ai/lua/patrol.lua
Commit: 41bd835f761dc601bb1b12a66651ab9d583c9ebb
https://github.com/wesnoth/wesnoth/commit/41bd835f761dc601bb1b12a66651ab9d583c9ebb
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-24 (Wed, 24 Oct 2018)
Changed paths:
M data/ai/lua/patrol.lua
Log Message:
-----------
Old patrol.lua: deprecation message should not be translatable
Commit: cd8af9660770fcba3e6e0bf7915826ccfcbdaf7d
https://github.com/wesnoth/wesnoth/commit/cd8af9660770fcba3e6e0bf7915826ccfcbdaf7d
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-26 (Fri, 26 Oct 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper.find_best_move: return nil instead of {} if no move found
This is done for consistency with similar functions in mainline. In principle this breaks backward compatibility. However, while it is theoretically possible for this to happen, this function will generally always return at least the hex the unit is on, so it is very unlikely that this actually makes a difference somewhere.
Commit: 5c7353741299bba26557d65d71cf0210d25410f3
https://github.com/wesnoth/wesnoth/commit/5c7353741299bba26557d65d71cf0210d25410f3
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-26 (Fri, 26 Oct 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
M data/ai/micro_ais/cas/ca_coward.lua
M data/ai/micro_ais/cas/ca_protect_unit_move.lua
Log Message:
-----------
ai_helper.lua: deprecate some functions
Commit: a831edda6b03da40410b3e7083a20e5c6f887c4a
https://github.com/wesnoth/wesnoth/commit/a831edda6b03da40410b3e7083a20e5c6f887c4a
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-27 (Sat, 27 Oct 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
M data/ai/lua/ca_grab_villages.lua
M data/ai/lua/ca_move_to_any_enemy.lua
M data/ai/lua/generic_recruit_engine.lua
Log Message:
-----------
ai_helper.get_closest_enemy: change return values
This is done for consistency with similar functions in mainline, and so that the function actual returns what it name says. This breaks backward compatibility, but note that the only practical difference for that is the order in which the arguments are returned, as both 'closest_enemy' and 'location' contain the enemy location in .x/.y format.
Commit: ae22b2e08f009983c3bbc1275a9673e27180a054
https://github.com/wesnoth/wesnoth/commit/ae22b2e08f009983c3bbc1275a9673e27180a054
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-29 (Mon, 29 Oct 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper: new function get_avoid_map()
The goal is to add [avoid] tag capabilitiy to most Micro AIs.
Commit: 10b0631143a5f103891d729f331bed4c2c949e2c
https://github.com/wesnoth/wesnoth/commit/10b0631143a5f103891d729f331bed4c2c949e2c
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-29 (Mon, 29 Oct 2018)
Changed paths:
M data/ai/micro_ais/cas/ca_fast_attack_utils.lua
M data/ai/micro_ais/cas/ca_fast_combat.lua
M data/ai/micro_ais/cas/ca_fast_combat_leader.lua
M data/ai/micro_ais/cas/ca_fast_move.lua
M data/ai/micro_ais/cas/ca_hang_out.lua
M data/ai/micro_ais/cas/ca_healer_move.lua
Log Message:
-----------
Micro AIs: use ai_helper.get_avoid_map()
There are no functionality changes in this commit, it's simply switching over to the new ai_helper function. Changes to the MAI functionalities will be added separately.
Commit: df4065c06155b869b053ad5abdcd2f4cbdd1a066
https://github.com/wesnoth/wesnoth/commit/df4065c06155b869b053ad5abdcd2f4cbdd1a066
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-30 (Tue, 30 Oct 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper: new function get_reachmap()
This is a generalized version of ai_helper.get_reachable_unocc(). It can include or exclude hexes with own units with moves > 0. It also allows passing an optional location set 'avoid_map' with hexes to be excluded.
In principle, this makes get_reachable_unocc() unnecessary, but we keep that function for backward compatibility.
Commit: f11700119aa651e3bfd2a37bd8cf7338ab4b6b7c
https://github.com/wesnoth/wesnoth/commit/f11700119aa651e3bfd2a37bd8cf7338ab4b6b7c
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-10-31 (Wed, 31 Oct 2018)
Changed paths:
M data/ai/micro_ais/cas/ca_hang_out.lua
M data/ai/micro_ais/cas/ca_healer_move.lua
Log Message:
-----------
Micro AIs: use ai_helper.get_reachmap()
There are no functionality changes in this commit, it's simply switching over to the new ai_helper function. Changes to the MAI functionalities will be added separately.
Commit: 7579d181c0ef4c24b1e40f4c723e58eda0d3b9c3
https://github.com/wesnoth/wesnoth/commit/7579d181c0ef4c24b1e40f4c723e58eda0d3b9c3
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-01 (Thu, 01 Nov 2018)
Changed paths:
M data/ai/micro_ais/cas/ca_goto.lua
M data/ai/micro_ais/mai-defs/misc.lua
Log Message:
-----------
Goto Micro AI: add [avoid] tag functionality
This includes both adding an [avoid] tag to the MAI itself, and taking the default AI [avoid] tag into account. If both are given, the former takes precedence over the latter.
Commit: abaa2dcc84d496e16b5ccd447d05567b939576da
https://github.com/wesnoth/wesnoth/commit/abaa2dcc84d496e16b5ccd447d05567b939576da
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-01 (Thu, 01 Nov 2018)
Changed paths:
M data/ai/micro_ais/cas/ca_swarm_move.lua
M data/ai/micro_ais/cas/ca_swarm_scatter.lua
M data/ai/micro_ais/mai-defs/animals.lua
Log Message:
-----------
Swarm Micro AI: add [avoid] tag functionality
This includes both adding an [avoid] tag to the MAI itself, and taking the default AI [avoid] tag into account. If both are given, the former takes precedence over the latter.
Commit: d7418ab8e2e7c86af2e355363e673797663cfe7b
https://github.com/wesnoth/wesnoth/commit/d7418ab8e2e7c86af2e355363e673797663cfe7b
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-01 (Thu, 01 Nov 2018)
Changed paths:
M data/ai/micro_ais/cas/ca_wolves_move.lua
M data/ai/micro_ais/cas/ca_wolves_wander.lua
Log Message:
-----------
Wolves Micro AI: take default AI [avoid] tag into account
Commit: 873bf2f390c9d54a3398c8626a709f2c9302b783
https://github.com/wesnoth/wesnoth/commit/873bf2f390c9d54a3398c8626a709f2c9302b783
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-01 (Thu, 01 Nov 2018)
Changed paths:
M data/ai/micro_ais/cas/ca_wolves_multipacks_attack.lua
M data/ai/micro_ais/cas/ca_wolves_multipacks_wander.lua
M data/ai/micro_ais/mai-defs/animals.lua
Log Message:
-----------
Multipack Wolves MAI: add [avoid] tag functionality
This includes both adding an [avoid] tag to the MAI itself, and taking the default AI [avoid] tag into account. If both are given, the former takes precedence over the latter.
Commit: 8676d3eaf1e016c0f7e1ebb110596190b9e70505
https://github.com/wesnoth/wesnoth/commit/8676d3eaf1e016c0f7e1ebb110596190b9e70505
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-02 (Fri, 02 Nov 2018)
Changed paths:
M data/ai/lua/generic_recruit_engine.lua
Log Message:
-----------
ExpAI recruiting: add optional 'enemy_types' parameter
Ths is the enemy type list to be considered if the AI has no information about the enemies to expect, that is, if no enemy units are on the map and no enemy recruit lists can be found. It can be used to prepare AI recruiting for enemy sides that get added later during a scenario.
Commit: dcf951434e62b5dfae1e167d6e57d649838ef7c6
https://github.com/wesnoth/wesnoth/commit/dcf951434e62b5dfae1e167d6e57d649838ef7c6
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-05 (Mon, 05 Nov 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
M data/ai/micro_ais/cas/ca_bottleneck_move.lua
M data/ai/micro_ais/cas/ca_coward.lua
M data/ai/micro_ais/cas/ca_herding_dog_move.lua
M data/ai/micro_ais/cas/ca_herding_f_herding_area.lua
M data/ai/micro_ais/cas/ca_herding_herd_sheep.lua
M data/ai/micro_ais/cas/ca_herding_sheep_runs_dog.lua
M data/ai/micro_ais/cas/ca_hunter.lua
M data/ai/micro_ais/cas/ca_messenger_f_next_waypoint.lua
M data/ai/micro_ais/cas/ca_messenger_move.lua
M data/ai/micro_ais/cas/ca_patrol.lua
M data/ai/micro_ais/cas/ca_protect_unit_finish.lua
M data/ai/micro_ais/cas/ca_protect_unit_move.lua
M data/ai/micro_ais/cas/ca_return_guardian.lua
M data/ai/micro_ais/cas/ca_stationed_guardian.lua
M data/ai/micro_ais/cas/ca_zone_guardian.lua
M data/ai/micro_ais/mai-defs/animals.lua
M data/ai/micro_ais/mai-defs/bottleneck.lua
M data/ai/micro_ais/mai-defs/escort.lua
M data/ai/micro_ais/mai-defs/guardian.lua
M data/ai/micro_ais/mai-defs/patrol.lua
M data/ai/micro_ais/mai-defs/protect.lua
Log Message:
-----------
Micro AIs: support named locations for [micro_ai] tag keys
Commit: 5e0df80ad01876b803aba11871e0180b96f8fa3c
https://github.com/wesnoth/wesnoth/commit/5e0df80ad01876b803aba11871e0180b96f8fa3c
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-05 (Mon, 05 Nov 2018)
Changed paths:
M data/ai/lua/retreat.lua
Log Message:
-----------
ExpAI retreating: take healthy trait into account
Commit: e3b2cbfc252e1f6f935b82329c00ee7dd767870f
https://github.com/wesnoth/wesnoth/commit/e3b2cbfc252e1f6f935b82329c00ee7dd767870f
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-05 (Mon, 05 Nov 2018)
Changed paths:
M data/ai/lua/generic_recruit_engine.lua
Log Message:
-----------
ExpAI recruiting: consider all villages not owned by allies
Instead of only the unowned villages.
Commit: 0c57ae16e4e25cfb36ee51b5675dda0bebc793fd
https://github.com/wesnoth/wesnoth/commit/0c57ae16e4e25cfb36ee51b5675dda0bebc793fd
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-05 (Mon, 05 Nov 2018)
Changed paths:
M data/ai/lua/battle_calcs.lua
M data/ai/lua/ca_high_xp_attack.lua
M data/ai/lua/ca_spread_poison.lua
M data/ai/lua/generic_recruit_engine.lua
M data/ai/lua/retreat.lua
M data/ai/micro_ais/cas/ca_bottleneck_move.lua
M data/ai/micro_ais/cas/ca_fast_attack_utils.lua
Log Message:
-----------
Lua AIs: do not use hard-coded values for modifiable parameters
Commit: e379cf7333a9c6b1723ab5ce2bdd91f658f63b71
https://github.com/wesnoth/wesnoth/commit/e379cf7333a9c6b1723ab5ce2bdd91f658f63b71
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-06 (Tue, 06 Nov 2018)
Changed paths:
M data/ai/lua/generic_recruit_engine.lua
Log Message:
-----------
Generic recruit engine: replace slow location filters
Commit: c1343227e291ff6c3564c825c5120e89aa5d8bc0
https://github.com/wesnoth/wesnoth/commit/c1343227e291ff6c3564c825c5120e89aa5d8bc0
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-06 (Tue, 06 Nov 2018)
Changed paths:
M data/ai/lua/generic_recruit_engine.lua
Log Message:
-----------
Generic recruit engine: cache pathfinding data
This results in a significant speed-up starting from the second recruit each turn.
Commit: 8bca955ad52cc0789a0545795821dda21238fa7d
https://github.com/wesnoth/wesnoth/commit/8bca955ad52cc0789a0545795821dda21238fa7d
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-07 (Wed, 07 Nov 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
Log Message:
-----------
ai_helper: new function get_healing_locations()
Commit: 1856377d3532f39365cadb08b08004226c408e50
https://github.com/wesnoth/wesnoth/commit/1856377d3532f39365cadb08b08004226c408e50
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-07 (Wed, 07 Nov 2018)
Changed paths:
M data/ai/lua/battle_calcs.lua
M data/ai/lua/ca_spread_poison.lua
M data/ai/micro_ais/cas/ca_fast_attack_utils.lua
M data/ai/micro_ais/cas/ca_healer_move.lua
Log Message:
-----------
Lua AIs: distinguish between healing locations and villages
There are rating contributions for hexes which heal (not all of which are villages) and others for hexes that provide income (villages). Previously only villages were considered for both types of hexes.
Commit: e7e9a6fe459b5265b452af00f0364172b5fcffc7
https://github.com/wesnoth/wesnoth/commit/e7e9a6fe459b5265b452af00f0364172b5fcffc7
Author: mattsc <mattsc000 at gmail.com>
Date: 2018-11-08 (Thu, 08 Nov 2018)
Changed paths:
M data/ai/lua/ai_helper.lua
M data/ai/lua/battle_calcs.lua
M data/ai/lua/ca_grab_villages.lua
M data/ai/lua/ca_high_xp_attack.lua
M data/ai/lua/ca_move_to_any_enemy.lua
M data/ai/lua/ca_spread_poison.lua
M data/ai/lua/generic_recruit_engine.lua
M data/ai/lua/patrol.lua
M data/ai/lua/retreat.lua
M data/ai/micro_ais/cas/ca_bottleneck_move.lua
M data/ai/micro_ais/cas/ca_coward.lua
M data/ai/micro_ais/cas/ca_fast_attack_utils.lua
M data/ai/micro_ais/cas/ca_fast_combat.lua
M data/ai/micro_ais/cas/ca_fast_combat_leader.lua
M data/ai/micro_ais/cas/ca_fast_move.lua
M data/ai/micro_ais/cas/ca_goto.lua
M data/ai/micro_ais/cas/ca_hang_out.lua
M data/ai/micro_ais/cas/ca_healer_move.lua
M data/ai/micro_ais/cas/ca_herding_dog_move.lua
M data/ai/micro_ais/cas/ca_herding_f_herding_area.lua
M data/ai/micro_ais/cas/ca_herding_herd_sheep.lua
M data/ai/micro_ais/cas/ca_herding_sheep_runs_dog.lua
M data/ai/micro_ais/cas/ca_hunter.lua
M data/ai/micro_ais/cas/ca_messenger_f_next_waypoint.lua
M data/ai/micro_ais/cas/ca_messenger_move.lua
M data/ai/micro_ais/cas/ca_patrol.lua
M data/ai/micro_ais/cas/ca_protect_unit_finish.lua
M data/ai/micro_ais/cas/ca_protect_unit_move.lua
M data/ai/micro_ais/cas/ca_return_guardian.lua
M data/ai/micro_ais/cas/ca_stationed_guardian.lua
M data/ai/micro_ais/cas/ca_swarm_move.lua
M data/ai/micro_ais/cas/ca_swarm_scatter.lua
M data/ai/micro_ais/cas/ca_wolves_move.lua
M data/ai/micro_ais/cas/ca_wolves_multipacks_attack.lua
M data/ai/micro_ais/cas/ca_wolves_multipacks_functions.lua
M data/ai/micro_ais/cas/ca_wolves_multipacks_wander.lua
M data/ai/micro_ais/cas/ca_wolves_wander.lua
M data/ai/micro_ais/cas/ca_zone_guardian.lua
M data/ai/micro_ais/mai-defs/animals.lua
M data/ai/micro_ais/mai-defs/bottleneck.lua
M data/ai/micro_ais/mai-defs/escort.lua
M data/ai/micro_ais/mai-defs/guardian.lua
M data/ai/micro_ais/mai-defs/misc.lua
M data/ai/micro_ais/mai-defs/patrol.lua
M data/ai/micro_ais/mai-defs/protect.lua
Log Message:
-----------
Merge pull request #3655 from mattsc/lua_ai_changes
Lua AI changes
Compare: https://github.com/wesnoth/wesnoth/compare/23d313949d4e...e7e9a6fe459b
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the Commits
mailing list