fail if [kill] contains [filter], re #4316 (#7717)

This commit is contained in:
Toom 2023-07-16 20:47:44 +03:00 committed by GitHub
parent d6e6ab5382
commit 9f53c4fd11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,10 @@ local location_set = wesnoth.require "location_set"
local kill_recursion_preventer = location_set.create()
function wesnoth.wml_actions.kill(cfg)
if wml.get_child(cfg, "filter") then
wml.error "Tag [filter] may not be used in [kill]"
end
local number_killed = 0
local secondary_unit = wml.get_child(cfg, "secondary_unit")
local killer_loc = {0, 0}