
Since there were weapons included that weren't shown, it was possible for the best weapon selection to be a hidden one (in which case, the initial selection would be wrong, and it was possible for the returned index to point to a hidden, disabled weapon. This resolves both issues by excluding these disabled attacks from the weapon choices list altogether. They aren't considered when calculating the best attack either. mouse_handler::fill_weapon_choices is also used in mouse_handler::attack_enemy_, but I don't foresee this change should cause any issues there, since you aren't supposed to be able to actually attack with disabled weapons anyway. (cherry-picked from commit 00e58f12f9a57b2e25dd4f67efb1255b177e173b)
About
The Battle for Wesnoth is an Open Source, turn-based tactical strategy game with a high fantasy theme, featuring both singleplayer and online/hotseat multiplayer combat. Fight a desperate battle to reclaim the throne of Wesnoth, or take hand in any number of other adventures.
License
Please see the wiki for information regarding The Battle for Wesnoth's licensing:
https://wiki.wesnoth.org/Wesnoth:Copyrights
Installing
See INSTALL.md for instructions on how to build the game from source code.
More Information
For extensive documentation about all aspects of the game, see the official Battle for Wesnoth web site.
A (translated) description of how to play the game can be found in doc/manual/manual.*.html, or online at:
https://wiki.wesnoth.org/WesnothManual
The official Battle for Wesnoth Forums (with over 400,000 posts from more than 20,000 registered members) can be found at: