diff --git a/data/ai/lua/ai_helper.lua b/data/ai/lua/ai_helper.lua index 6a53305e6ab9..08c76b746f71 100644 --- a/data/ai/lua/ai_helper.lua +++ b/data/ai/lua/ai_helper.lua @@ -901,12 +901,20 @@ end function ai_helper.get_units_with_moves(filter) -- Note: the order of the filters and the [and] tags are important for speed reasons - return wesnoth.get_units { { "and", { formula = "moves > 0" } }, { "and", filter } } + return wesnoth.get_units { + { "and", { formula = "moves > 0" } }, + { "not", { status = "petrified" } }, + { "and", filter } + } end function ai_helper.get_units_with_attacks(filter) -- Note: the order of the filters and the [and] tags are important for speed reasons - return wesnoth.get_units { { "and", { formula = "attacks_left > 0 and size(attacks) > 0" } }, { "and", filter } } + return wesnoth.get_units { + { "and", { formula = "attacks_left > 0 and size(attacks) > 0" } }, + { "not", { status = "petrified" } }, + { "and", filter } + } end function ai_helper.get_visible_units(viewing_side, filter)