mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 20:26:41 +00:00
Fixed bug #13295. enemy_units formula now ignores incapacitated units,
such as statues in the 'Caves of The Basilisk'
This commit is contained in:
parent
531fefdc25
commit
e03e86bb4e
@ -19,6 +19,8 @@ Version 1.7.0-svn:
|
||||
via floating popups on the specified hex
|
||||
* Added run_file FormulaAI function to allow running .fai scripts directly
|
||||
from in-game console
|
||||
* Fixed bug #13295: made enemy_units formula return only those units which
|
||||
are not incapacitated (for example, it now ignores stoned units )
|
||||
* Graphics:
|
||||
* New type of animation : "recruiting" used by leaders when recruiting
|
||||
units
|
||||
|
@ -2334,7 +2334,9 @@ variant formula_ai::get_value(const std::string& key) const
|
||||
std::vector<variant> vars;
|
||||
for(unit_map::const_iterator i = get_info().units.begin(); i != get_info().units.end(); ++i) {
|
||||
if(current_team().is_enemy(i->second.side())) {
|
||||
vars.push_back(variant(new unit_callable(*i)));
|
||||
if (!i->second.incapacitated()) {
|
||||
vars.push_back(variant(new unit_callable(*i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
return variant(&vars);
|
||||
|
Loading…
x
Reference in New Issue
Block a user