- Fix the rabbit AI
- Enable invoke_synced_command to also call (some) built-in commands
and give an error message in the case of an unknown command
- Remove some unnecessary implementation details
fixes#1649 . ai.synced_command could easily be used to implement all types of
undeteced cheats so it was removed. As a replacement this commit adds a
[custom_command] synced command that just calls
wesnoth.game_events.on_synced_command which calls a lua handler that
must first be set.
This was discussed both on the wesnoth-dev mailing list and on the
forums and the overall consensus was that it should be off, although
some scenarios will benefit from it. It should be enabled specifically
in such scenarios as they are identified.
Reference:
https://mail.gna.org/public/wesnoth-dev/2014-01/msg00001.html
and links therein
The aspects are:
- recruitment_diversity
- recruitment_instructions
- recruitment_more
- recruitment_randomness
- recruitment_save_gold
All aspects will only work with the new recruitment CA (not committed yet).
See http://wiki.wesnoth.org/AI_Recruitment
As part of a GSoC proposal I added a new aspect so a scenario editor can control advancements in two ways:
1. Define a aspect with a string-value like "Swordsman, Knight", so the units of interesst will always advance to this
2. Use the LUA-Engine and return a function of the form advance(x, y) which will itself return a string-value
like "Swordsman, Knight". Everytime a ai-unit advances advance(x, y) will be called.
The corresponding wikipage (http://wiki.wesnoth.org/AiWML) is going to be updated soon.
If set, AI leaders do not move to the closest keep at the beginning of
the turn. Instead, they participate in the move_to_targets candidate
action (and all other CAs in which they already participated anyway,
of course). The default value is 'no', which leaves the default
behavior unchanged.