mattsc e7bd4bc4ef Default AI: fix bug causing units with max_moves=0 not to attack
The support parameter in the attack evaluation quantifies how much
power the AI can bring to an attack hex. This is supposed to include
the attacking unit itself. However, in some circumstances (such as when
the unit cannot move for one reason or another) this unit is not
accounted for. If no other units can get to this hex either, support is
(erroneously) set to zero, resulting in an attack score of zero, which
in turn results in no attack. Skipping the multiplication of the score
by support in this case does not affect comparison with other attacks
here, as this is by definition the only attack possible on the given
hex.

Note that the '!is_surrounded' conditional is also covered by 'support
!= 0' and can therefore be deleted.

This fixes bug #23720.
2016-09-06 16:45:50 -07:00
2016-09-05 13:43:58 -04:00
2016-09-01 21:53:01 +11:00

About

The Battle for Wesnoth is a Free, 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

The game's source code and artwork, sound, and music assets are provided under the terms of the GNU General Public License version 2, or (at your option) any later version. Note that for artwork, sound, and music, we interpret "preferred form of the work for making modifications" as the modifiable form that the author chooses to ship us for the source tree. For convenience, a reference copy of the GNU GPL version 2 is provided in the COPYING file in this distribution.

Some portions of the source code can be used under different license terms, whenever stated as such in the source.

Installing

See INSTALL 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.

http://www.wesnoth.org/

A (translated) description of how to play the game can be found in doc/manual/manual.*.html, or online at:

http://manual.wesnoth.org/

The official Battle for Wesnoth Forums (with over 400,000 posts from more than 20,000 registered members) can be found at:

http://forums.wesnoth.org/

Description
韦诺之战
Readme 10 GiB
Languages
INI 51.6%
C++ 35.9%
Lua 5.7%
Python 4.3%
Emacs Lisp 1%
Other 1.1%