Follow-up Comment #1, bug #15850 (project wesnoth):
I attached hereunder a test case to be played in the AI arena.
>From the three poisoned mages, 2 can only reach the same village.
After the first mage has taken it, the second mage can't move, hence he is
requested to move to his current location (with move_partial()).
The third mage does not move to heal while a village in range is free due to
the fact that the previous move_partial() call ended in error.
While the behavior is compliant with the documentation in the wiki
("Evaluation of the candidate actions should have no side effects - candidate
action changes the game state only when is executed. If a candidate action is
selected for execution but fails to change the game state (e.g. by trying to
do an illegal move/attack/recruit), then it will be blacklisted until the end
of turn."), this is not the most flexible behavior.
If the feature request is rejected, the only way to deal with this problem
would be to store for each unit that has found a village to heal the location
of the village and for each new unit that should heal in the turn, check all
reachable villages and check with other units if they are not already set a
target for a move. That would be quite cumbersome.
(file #8927)
_______________________________________________________
Additional Item Attachment:
File name: ai_arena.diff Size:4 KB
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?15850>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs